Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use tusd datastorages #7499

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,5 @@ require (
)

replace github.com/go-micro/plugins/v4/store/nats-js => github.com/kobergj/plugins/v4/store/nats-js v1.2.1-0.20231020092801-9463c820c19a

replace github.com/cs3org/reva/v2 => github.com/butonic/reva/v2 v2.0.0-20231205112716-b643432e6672
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,8 @@ github.com/bombsimon/logrusr/v3 v3.1.0/go.mod h1:PksPPgSFEL2I52pla2glgCyyd2OqOHA
github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/butonic/reva/v2 v2.0.0-20231205112716-b643432e6672 h1:86ZSMr1/7kc0aLi5rcPo0pEsbB5VDI9MTKiKIRpKuOs=
github.com/butonic/reva/v2 v2.0.0-20231205112716-b643432e6672/go.mod h1:zcrrYVsBv/DwhpyO2/W5hoSZ/k6az6Z2EYQok65uqZY=
github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
github.com/bytecodealliance/wasmtime-go/v3 v3.0.2 h1:3uZCA/BLTIu+DqCfguByNMJa2HVHpXvjfy0Dy7g6fuA=
github.com/bytecodealliance/wasmtime-go/v3 v3.0.2/go.mod h1:RnUjnIXxEJcL6BgCvNyzCCRzZcxCgsZCi+RNlvYor5Q=
Expand Down Expand Up @@ -1017,8 +1019,6 @@ github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c=
github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME=
github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781 h1:BUdwkIlf8IS2FasrrPg8gGPHQPOrQ18MS1Oew2tmGtY=
github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva/v2 v2.16.1-0.20231201122033-a389ddc645c4 h1:61AwMfov2OxrUElWXXKHZfBsuxgNIVwZVQW4PlJoqnM=
github.com/cs3org/reva/v2 v2.16.1-0.20231201122033-a389ddc645c4/go.mod h1:zcrrYVsBv/DwhpyO2/W5hoSZ/k6az6Z2EYQok65uqZY=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
Expand Down
2 changes: 1 addition & 1 deletion services/graph/pkg/service/v0/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func (g Graph) PostUser(w http.ResponseWriter, r *http.Request) {
if g.roleService != nil && g.config.API.AssignDefaultUserRole {
// All users get the user role by default currently.
// to all new users for now, as create Account request does not have any role field
if _, err = g.roleService.AssignRoleToUser(r.Context(), &settings.AssignRoleToUserRequest{
if _, err := g.roleService.AssignRoleToUser(r.Context(), &settings.AssignRoleToUserRequest{
AccountUuid: *u.Id,
RoleId: ocissettingssvc.BundleUUIDRoleUser,
}); err != nil {
Expand Down
5 changes: 5 additions & 0 deletions services/proxy/pkg/middleware/accesslog.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/go-chi/chi/v5/middleware"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
"go.opentelemetry.io/otel/trace"
)

// AccessLog is a middleware to log http requests at info level logging.
Expand All @@ -19,15 +20,19 @@ func AccessLog(logger log.Logger) func(http.Handler) http.Handler {
wrap := middleware.NewWrapResponseWriter(w, r.ProtoMajor)
next.ServeHTTP(wrap, r)

spanContext := trace.SpanContextFromContext(r.Context())

logger.Info().
Str("proto", r.Proto).
Str(log.RequestIDString, requestID).
Str("traceid", spanContext.TraceID().String()).
Str("remote-addr", r.RemoteAddr).
Str("method", r.Method).
Int("status", wrap.Status()).
Str("path", r.URL.Path).
Dur("duration", time.Since(start)).
Int("bytes", wrap.BytesWritten()).
Int("content-length", int(r.ContentLength)).
Msg("access-log")
})
}
Expand Down
8 changes: 7 additions & 1 deletion services/settings/pkg/store/metadata/assignments.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"

"github.com/cs3org/reva/v2/pkg/appctx"
"github.com/cs3org/reva/v2/pkg/errtypes"
"github.com/gofrs/uuid"
settingsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/settings/v0"
Expand All @@ -16,6 +17,7 @@ import (
func (s *Store) ListRoleAssignments(accountUUID string) ([]*settingsmsg.UserRoleAssignment, error) {
s.Init()
ctx := context.TODO()
ctx = appctx.WithLogger(ctx, &s.Logger.Logger)
assIDs, err := s.mdc.ReadDir(ctx, accountPath(accountUUID))
switch err.(type) {
case nil:
Expand All @@ -41,6 +43,7 @@ func (s *Store) ListRoleAssignments(accountUUID string) ([]*settingsmsg.UserRole
a := &settingsmsg.UserRoleAssignment{}
err = json.Unmarshal(b, a)
if err != nil {
s.Logger.Error().Err(err).Str("data", string(b)).Msg("could not parse json")
return nil, err
}

Expand All @@ -53,6 +56,7 @@ func (s *Store) ListRoleAssignments(accountUUID string) ([]*settingsmsg.UserRole
func (s *Store) WriteRoleAssignment(accountUUID, roleID string) (*settingsmsg.UserRoleAssignment, error) {
s.Init()
ctx := context.TODO()
ctx = appctx.WithLogger(ctx, &s.Logger.Logger)
// as per https://github.com/owncloud/product/issues/103 "Each user can have exactly one role"
err := s.mdc.Delete(ctx, accountPath(accountUUID))
switch err.(type) {
Expand All @@ -78,13 +82,15 @@ func (s *Store) WriteRoleAssignment(accountUUID, roleID string) (*settingsmsg.Us
if err != nil {
return nil, err
}
return ass, s.mdc.SimpleUpload(ctx, assignmentPath(accountUUID, ass.Id), b)
err = s.mdc.SimpleUpload(ctx, assignmentPath(accountUUID, ass.Id), b)
return ass, err
}

// RemoveRoleAssignment deletes the given role assignment from the existing assignments of the respective account.
func (s *Store) RemoveRoleAssignment(assignmentID string) error {
s.Init()
ctx := context.TODO()
ctx = appctx.WithLogger(ctx, &s.Logger.Logger)
accounts, err := s.mdc.ReadDir(ctx, accountsFolderLocation)
switch err.(type) {
case nil:
Expand Down
6 changes: 6 additions & 0 deletions services/settings/pkg/store/metadata/bundles.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"errors"
"fmt"

"github.com/cs3org/reva/v2/pkg/appctx"
"github.com/cs3org/reva/v2/pkg/errtypes"
"github.com/gofrs/uuid"
settingsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/settings/v0"
Expand All @@ -17,6 +18,7 @@ import (
func (s *Store) ListBundles(bundleType settingsmsg.Bundle_Type, bundleIDs []string) ([]*settingsmsg.Bundle, error) {
s.Init()
ctx := context.TODO()
ctx = appctx.WithLogger(ctx, &s.Logger.Logger)

if len(bundleIDs) == 0 {
bIDs, err := s.mdc.ReadDir(ctx, bundleFolderLocation)
Expand Down Expand Up @@ -61,6 +63,8 @@ func (s *Store) ListBundles(bundleType settingsmsg.Bundle_Type, bundleIDs []stri
func (s *Store) ReadBundle(bundleID string) (*settingsmsg.Bundle, error) {
s.Init()
ctx := context.TODO()
ctx = appctx.WithLogger(ctx, &s.Logger.Logger)

b, err := s.mdc.SimpleDownload(ctx, bundlePath(bundleID))
switch err.(type) {
case nil:
Expand All @@ -79,6 +83,7 @@ func (s *Store) ReadBundle(bundleID string) (*settingsmsg.Bundle, error) {
func (s *Store) ReadSetting(settingID string) (*settingsmsg.Setting, error) {
s.Init()
ctx := context.TODO()
ctx = appctx.WithLogger(ctx, &s.Logger.Logger)

ids, err := s.mdc.ReadDir(ctx, bundleFolderLocation)
switch err.(type) {
Expand Down Expand Up @@ -114,6 +119,7 @@ func (s *Store) ReadSetting(settingID string) (*settingsmsg.Setting, error) {
func (s *Store) WriteBundle(record *settingsmsg.Bundle) (*settingsmsg.Bundle, error) {
s.Init()
ctx := context.TODO()
ctx = appctx.WithLogger(ctx, &s.Logger.Logger)

b, err := json.Marshal(record)
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions services/settings/pkg/store/metadata/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"log"
"sync"

"github.com/cs3org/reva/v2/pkg/appctx"
"github.com/cs3org/reva/v2/pkg/storage/utils/metadata"
"github.com/gofrs/uuid"
olog "github.com/owncloud/ocis/v2/ocis-pkg/log"
Expand Down Expand Up @@ -99,6 +100,8 @@ func NewMetadataClient(cfg config.Metadata) MetadataClient {
// we need to lazy initialize the MetadataClient because metadata service might not be ready
func (s *Store) initMetadataClient(mdc MetadataClient) error {
ctx := context.TODO()
ctx = appctx.WithLogger(ctx, &s.Logger.Logger)

err := mdc.Init(ctx, settingsSpaceID)
if err != nil {
return err
Expand Down
5 changes: 5 additions & 0 deletions services/settings/pkg/store/metadata/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"

"github.com/cs3org/reva/v2/pkg/appctx"
"github.com/cs3org/reva/v2/pkg/errtypes"
"github.com/gofrs/uuid"
settingsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/settings/v0"
Expand All @@ -19,6 +20,7 @@ import (
func (s *Store) ListValues(bundleID, accountUUID string) ([]*settingsmsg.Value, error) {
s.Init()
ctx := context.TODO()
ctx = appctx.WithLogger(ctx, &s.Logger.Logger)

vIDs, err := s.mdc.ReadDir(ctx, valuesFolderLocation)
switch err.(type) {
Expand Down Expand Up @@ -70,6 +72,7 @@ func (s *Store) ListValues(bundleID, accountUUID string) ([]*settingsmsg.Value,
func (s *Store) ReadValue(valueID string) (*settingsmsg.Value, error) {
s.Init()
ctx := context.TODO()
ctx = appctx.WithLogger(ctx, &s.Logger.Logger)

b, err := s.mdc.SimpleDownload(ctx, valuePath(valueID))
switch err.(type) {
Expand All @@ -91,6 +94,7 @@ func (s *Store) ReadValueByUniqueIdentifiers(accountUUID, settingID string) (*se
}
s.Init()
ctx := context.TODO()
ctx = appctx.WithLogger(ctx, &s.Logger.Logger)

vIDs, err := s.mdc.ReadDir(ctx, valuesFolderLocation)
if err != nil {
Expand Down Expand Up @@ -125,6 +129,7 @@ func (s *Store) ReadValueByUniqueIdentifiers(accountUUID, settingID string) (*se
func (s *Store) WriteValue(value *settingsmsg.Value) (*settingsmsg.Value, error) {
s.Init()
ctx := context.TODO()
ctx = appctx.WithLogger(ctx, &s.Logger.Logger)

if value.Id == "" {
value.Id = uuid.Must(uuid.NewV4()).String()
Expand Down
21 changes: 13 additions & 8 deletions services/storage-users/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,19 @@ type S3NGDriver struct {
Propagator string `yaml:"propagator" env:"OCIS_DECOMPOSEDFS_PROPAGATOR;STORAGE_USERS_S3NG_PROPAGATOR" desc:"The propagator used for decomposedfs. At the moment, only 'sync' is fully supported, 'async' is available as an experimental option."`
AsyncPropagatorOptions AsyncPropagatorOptions `yaml:"async_propagator_options"`
// Root is the absolute path to the location of the data
Root string `yaml:"root" env:"STORAGE_USERS_S3NG_ROOT" desc:"The directory where the filesystem storage will store metadata for blobs. If not defined, the root directory derives from $OCIS_BASE_DATA_PATH:/storage/users."`
UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_S3NG_USER_LAYOUT" desc:"Template string for the user storage layout in the user directory."`
PermissionsEndpoint string `yaml:"permissions_endpoint" env:"STORAGE_USERS_PERMISSION_ENDPOINT;STORAGE_USERS_S3NG_PERMISSIONS_ENDPOINT" desc:"Endpoint of the permissions service. The endpoints can differ for 'ocis' and 's3ng'."`
Region string `yaml:"region" env:"STORAGE_USERS_S3NG_REGION" desc:"Region of the S3 bucket."`
AccessKey string `yaml:"access_key" env:"STORAGE_USERS_S3NG_ACCESS_KEY" desc:"Access key for the S3 bucket."`
SecretKey string `yaml:"secret_key" env:"STORAGE_USERS_S3NG_SECRET_KEY" desc:"Secret key for the S3 bucket."`
Endpoint string `yaml:"endpoint" env:"STORAGE_USERS_S3NG_ENDPOINT" desc:"Endpoint for the S3 bucket."`
Bucket string `yaml:"bucket" env:"STORAGE_USERS_S3NG_BUCKET" desc:"Name of the S3 bucket."`
Root string `yaml:"root" env:"STORAGE_USERS_S3NG_ROOT" desc:"The directory where the filesystem storage will store metadata for blobs. If not defined, the root directory derives from $OCIS_BASE_DATA_PATH:/storage/users."`
UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_S3NG_USER_LAYOUT" desc:"Template string for the user storage layout in the user directory."`
PermissionsEndpoint string `yaml:"permissions_endpoint" env:"STORAGE_USERS_PERMISSION_ENDPOINT;STORAGE_USERS_S3NG_PERMISSIONS_ENDPOINT" desc:"Endpoint of the permissions service. The endpoints can differ for 'ocis' and 's3ng'."`
Region string `yaml:"region" env:"STORAGE_USERS_S3NG_REGION" desc:"Region of the S3 bucket."`
AccessKey string `yaml:"access_key" env:"STORAGE_USERS_S3NG_ACCESS_KEY" desc:"Access key for the S3 bucket."`
SecretKey string `yaml:"secret_key" env:"STORAGE_USERS_S3NG_SECRET_KEY" desc:"Secret key for the S3 bucket."`
Endpoint string `yaml:"endpoint" env:"STORAGE_USERS_S3NG_ENDPOINT" desc:"Endpoint for the S3 bucket."`
Bucket string `yaml:"bucket" env:"STORAGE_USERS_S3NG_BUCKET" desc:"Name of the S3 bucket."`
UploadObjectPrefix string `yaml:"upload_object_prefix" env:"STORAGE_USERS_S3NG_UPLOAD_OBJECT_PREFIX" desc:"This object prefix is prepended to the name of each S3 object that is created to store uploaded files. It can be used to create a pseudo-directory structure in the bucket, like 'path/to/my/uploads'."`
UploadMetadataPrefix string `yaml:"upload_metadata_prefix" env:"STORAGE_USERS_S3NG_UPLOAD_METADATA_PREFIX" desc:"The metadata object prefix is prepended to the name of each .info and .part S3 object that is created. If it is not set, then object prefix is used."`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not clear what to set here and what the default is.
If it is not set, then object prefix is used. means what?
When does one needs this?

UploadTemporaryDirectory string `yaml:"upload_temporary_directory" env:"STORAGE_USERS_S3NG_UPLOAD_TEMPORARY_DIRECTORY" desc:"Path where temporary files will be stored on disk during the upload."`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a default value and written in the description, as we use on other locations like:
If not defined, the temp directory derives from $OCIS_BASE_DATA_PATH:/storage/s3ng_temp
As an example see the envvar: STORAGE_USERS_S3NG_ROOT

DisableSSL bool `yaml:"disable_ssl" env:"STORAGE_USERS_S3NG_DISABLE_SSL" desc:"Disable SSL when accessing the S3 bucket."`
ForcePathStyle bool `yaml:"force_path_style" env:"STORAGE_USERS_S3NG_FORCE_PATH_STYLE" desc:"Force path style S3 requests."`
Copy link
Contributor

@mmattel mmattel Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ForcePathStyle bool `yaml:"force_path_style" env:"STORAGE_USERS_S3NG_FORCE_PATH_STYLE" desc:"Force path style S3 requests."`
ForcePathStyle bool `yaml:"force_path_style" env:"STORAGE_USERS_S3NG_FORCE_PATH_STYLE" desc:"Enforce 'path style' URL requests. With 'false' which is the default, 'virtual hosted-style' URLs are used."`

I hope I got it right from the description...
medium.com and amazon.com

// PersonalSpaceAliasTemplate contains the template used to construct
// the personal space alias, eg: `"{{.SpaceType}}/{{.User.Username | lower}}"`
PersonalSpaceAliasTemplate string `yaml:"personalspacealias_template" env:"STORAGE_USERS_S3NG_PERSONAL_SPACE_ALIAS_TEMPLATE" desc:"Template string to construct personal space aliases."`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func DefaultConfig() *config.Config {
PermissionsEndpoint: "com.owncloud.api.settings",
MaxAcquireLockCycles: 20,
LockCycleDurationFactor: 30,
UploadObjectPrefix: "uploads",
},
OCIS: config.OCISDriver{
MetadataBackend: "messagepack",
Expand Down
80 changes: 45 additions & 35 deletions services/storage-users/pkg/revaconfig/drivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,24 +237,29 @@ func S3NG(cfg *config.Config) map[string]interface{} {
"async_propagator_options": map[string]interface{}{
"propagation_delay": cfg.Drivers.S3NG.AsyncPropagatorOptions.PropagationDelay,
},
"root": cfg.Drivers.S3NG.Root,
"user_layout": cfg.Drivers.S3NG.UserLayout,
"share_folder": cfg.Drivers.S3NG.ShareFolder,
"personalspacealias_template": cfg.Drivers.S3NG.PersonalSpaceAliasTemplate,
"generalspacealias_template": cfg.Drivers.S3NG.GeneralSpaceAliasTemplate,
"treetime_accounting": true,
"treesize_accounting": true,
"permissionssvc": cfg.Drivers.S3NG.PermissionsEndpoint,
"permissionssvc_tls_mode": cfg.Commons.GRPCClientTLS.Mode,
"s3.region": cfg.Drivers.S3NG.Region,
"s3.access_key": cfg.Drivers.S3NG.AccessKey,
"s3.secret_key": cfg.Drivers.S3NG.SecretKey,
"s3.endpoint": cfg.Drivers.S3NG.Endpoint,
"s3.bucket": cfg.Drivers.S3NG.Bucket,
"max_acquire_lock_cycles": cfg.Drivers.S3NG.MaxAcquireLockCycles,
"lock_cycle_duration_factor": cfg.Drivers.S3NG.LockCycleDurationFactor,
"max_concurrency": cfg.Drivers.S3NG.MaxConcurrency,
"asyncfileuploads": cfg.Drivers.OCIS.AsyncUploads,
"root": cfg.Drivers.S3NG.Root,
"user_layout": cfg.Drivers.S3NG.UserLayout,
"share_folder": cfg.Drivers.S3NG.ShareFolder,
"personalspacealias_template": cfg.Drivers.S3NG.PersonalSpaceAliasTemplate,
"generalspacealias_template": cfg.Drivers.S3NG.GeneralSpaceAliasTemplate,
"treetime_accounting": true,
"treesize_accounting": true,
"permissionssvc": cfg.Drivers.S3NG.PermissionsEndpoint,
"permissionssvc_tls_mode": cfg.Commons.GRPCClientTLS.Mode,
"s3.region": cfg.Drivers.S3NG.Region,
"s3.access_key": cfg.Drivers.S3NG.AccessKey,
"s3.secret_key": cfg.Drivers.S3NG.SecretKey,
"s3.endpoint": cfg.Drivers.S3NG.Endpoint,
"s3.bucket": cfg.Drivers.S3NG.Bucket,
"s3.upload_object_prefix": cfg.Drivers.S3NG.UploadObjectPrefix,
"s3.upload_metadata_prefix": cfg.Drivers.S3NG.UploadMetadataPrefix,
"s3.upload_temporary_directory": cfg.Drivers.S3NG.UploadTemporaryDirectory,
"s3.disable_ssl": cfg.Drivers.S3NG.DisableSSL,
"s3.force_path_style": cfg.Drivers.S3NG.ForcePathStyle,
"max_acquire_lock_cycles": cfg.Drivers.S3NG.MaxAcquireLockCycles,
"lock_cycle_duration_factor": cfg.Drivers.S3NG.LockCycleDurationFactor,
"max_concurrency": cfg.Drivers.S3NG.MaxConcurrency,
"asyncfileuploads": cfg.Drivers.OCIS.AsyncUploads,
"statcache": map[string]interface{}{
"cache_store": cfg.StatCache.Store,
"cache_nodes": cfg.StatCache.Nodes,
Expand Down Expand Up @@ -300,23 +305,28 @@ func S3NGNoEvents(cfg *config.Config) map[string]interface{} {
"async_propagator_options": map[string]interface{}{
"propagation_delay": cfg.Drivers.S3NG.AsyncPropagatorOptions.PropagationDelay,
},
"root": cfg.Drivers.S3NG.Root,
"user_layout": cfg.Drivers.S3NG.UserLayout,
"share_folder": cfg.Drivers.S3NG.ShareFolder,
"personalspacealias_template": cfg.Drivers.S3NG.PersonalSpaceAliasTemplate,
"generalspacealias_template": cfg.Drivers.S3NG.GeneralSpaceAliasTemplate,
"treetime_accounting": true,
"treesize_accounting": true,
"permissionssvc": cfg.Drivers.S3NG.PermissionsEndpoint,
"permissionssvc_tls_mode": cfg.Commons.GRPCClientTLS.Mode,
"s3.region": cfg.Drivers.S3NG.Region,
"s3.access_key": cfg.Drivers.S3NG.AccessKey,
"s3.secret_key": cfg.Drivers.S3NG.SecretKey,
"s3.endpoint": cfg.Drivers.S3NG.Endpoint,
"s3.bucket": cfg.Drivers.S3NG.Bucket,
"max_acquire_lock_cycles": cfg.Drivers.S3NG.MaxAcquireLockCycles,
"max_concurrency": cfg.Drivers.S3NG.MaxConcurrency,
"lock_cycle_duration_factor": cfg.Drivers.S3NG.LockCycleDurationFactor,
"root": cfg.Drivers.S3NG.Root,
"user_layout": cfg.Drivers.S3NG.UserLayout,
"share_folder": cfg.Drivers.S3NG.ShareFolder,
"personalspacealias_template": cfg.Drivers.S3NG.PersonalSpaceAliasTemplate,
"generalspacealias_template": cfg.Drivers.S3NG.GeneralSpaceAliasTemplate,
"treetime_accounting": true,
"treesize_accounting": true,
"permissionssvc": cfg.Drivers.S3NG.PermissionsEndpoint,
"permissionssvc_tls_mode": cfg.Commons.GRPCClientTLS.Mode,
"s3.region": cfg.Drivers.S3NG.Region,
"s3.access_key": cfg.Drivers.S3NG.AccessKey,
"s3.secret_key": cfg.Drivers.S3NG.SecretKey,
"s3.endpoint": cfg.Drivers.S3NG.Endpoint,
"s3.bucket": cfg.Drivers.S3NG.Bucket,
"s3.upload_object_prefix": cfg.Drivers.S3NG.UploadObjectPrefix,
"s3.upload_metadata_prefix": cfg.Drivers.S3NG.UploadMetadataPrefix,
"s3.upload_temporary_directory": cfg.Drivers.S3NG.UploadTemporaryDirectory,
"s3.disable_ssl": cfg.Drivers.S3NG.DisableSSL,
"s3.force_path_style": cfg.Drivers.S3NG.ForcePathStyle,
"max_acquire_lock_cycles": cfg.Drivers.S3NG.MaxAcquireLockCycles,
"max_concurrency": cfg.Drivers.S3NG.MaxConcurrency,
"lock_cycle_duration_factor": cfg.Drivers.S3NG.LockCycleDurationFactor,
"statcache": map[string]interface{}{
"cache_store": cfg.StatCache.Store,
"cache_nodes": cfg.StatCache.Nodes,
Expand Down
Loading