Documentation ¶
Index ¶
- func GetEnv(cfg *Config) []string
- func StructMappings(cfg *Config) []shared.EnvBinding
- type AppProvider
- type AppRegistry
- type Archiver
- type Asset
- type Auth
- type AuthMachineConfig
- type Config
- type DataGatewayPort
- type DataProvider
- type Debug
- type DriverCommon
- type DriverEOS
- type DriverOCIS
- type DriverOwnCloudSQL
- type DriverS3
- type DriverS3NG
- type Events
- type FrontendPort
- type Gateway
- type Groups
- type LDAP
- type LDAPGroupSchema
- type LDAPUserSchema
- type Log
- type Middleware
- type OCDav
- type OIDC
- type Port
- type PublicStorage
- type Reva
- type Sharing
- type StorageConfig
- type StoragePort
- type StorageRegistry
- type Tracing
- type UserGroupRest
- type UserOwnCloudSQL
- type Users
- type WopiDriver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnv ¶ added in v1.16.0
GetEnv fetches a list of known env variables for this extension. It is to be used by gookit, as it provides a list with all the environment variables an extension supports.
func StructMappings ¶ added in v1.16.0
func StructMappings(cfg *Config) []shared.EnvBinding
StructMappings binds a set of environment variables to a destination on cfg. Iterating over this set and editing the Destination value of a binding will alter the original value, as it is a pointer to its memory address. This lets us propagate changes easier.
Types ¶
type AppProvider ¶ added in v1.12.0
type AppProvider struct { Port ExternalAddr string `yaml:"external_addr"` Driver string `yaml:"driver"` WopiDriver WopiDriver `yaml:"wopi_driver"` AppsURL string `yaml:"apps_url"` OpenURL string `yaml:"open_url"` NewURL string `yaml:"new_url"` }
AppProvider defines the available app provider configuration
type AppRegistry ¶ added in v1.13.0
type AppRegistry struct { Driver string `yaml:"driver"` MimetypesJSON string `yaml:"mime_types_json"` }
AppRegistry defines the available app registry configuration
type Archiver ¶ added in v1.13.0
type Archiver struct { MaxNumFiles int64 `yaml:"max_num_files"` MaxSize int64 `yaml:"max_size"` ArchiverURL string `yaml:"archiver_url"` }
Archiver defines the available archiver configuration.
type Asset ¶
type Asset struct {
Path string `yaml:"path"`
}
Asset defines the available asset configuration.
type AuthMachineConfig ¶ added in v1.14.0
type AuthMachineConfig struct {
MachineAuthAPIKey string `yaml:"machine_auth_api_key"`
}
AuthMachineConfig defines the available configuration for the machine auth driver.
type Config ¶
type Config struct { *shared.Commons File string `yaml:"file"` Log *shared.Log `yaml:"log"` Debug Debug `yaml:"debug"` OCDav OCDav `yaml:"ocdav"` Reva Reva `yaml:"reva"` Tracing Tracing `yaml:"tracing"` Asset Asset `yaml:"asset"` }
Config combines all available configuration parts.
type DataGatewayPort ¶
DataGatewayPort has a public url
type DataProvider ¶ added in v1.15.0
type DataProvider struct {
Insecure bool `yaml:"insecure"`
}
type Debug ¶
type Debug struct { Addr string `yaml:"addr"` Token string `yaml:"token"` Pprof bool `yaml:"pprof"` Zpages bool `yaml:"zpages"` }
Debug defines the available debug configuration.
type DriverCommon ¶
type DriverCommon struct { // Root is the absolute path to the location of the data Root string `yaml:"root"` ShareFolder string `yaml:"share_folder"` // UserLayout contains the template used to construct // the internal path, eg: `{{substr 0 1 .Username}}/{{.Username}}` UserLayout string `yaml:"user_layout"` // EnableHome enables the creation of home directories. EnableHome bool `yaml:"enable_home"` // PersonalSpaceAliasTemplate contains the template used to construct // the personal space alias, eg: `"{{.SpaceType}}/{{.User.Username | lower}}"` PersonalSpaceAliasTemplate string `yaml:"personalspacealias_template"` // GeneralSpaceAliasTemplate contains the template used to construct // the general space alias, eg: `{{.SpaceType}}/{{.SpaceName | replace " " "-" | lower}}` GeneralSpaceAliasTemplate string `yaml:"generalspacealias_template"` }
DriverCommon defines common driver configuration options.
type DriverEOS ¶
type DriverEOS struct { DriverCommon // ShadowNamespace for storing shadow data ShadowNamespace string `yaml:"shadow_namespace"` // UploadsNamespace for storing upload data UploadsNamespace string `yaml:"uploads_namespace"` // Location of the eos binary. // Default is /usr/bin/eos. EosBinary string `yaml:"eos_binary"` // Location of the xrdcopy binary. // Default is /usr/bin/xrdcopy. XrdcopyBinary string `yaml:"xrd_copy_binary"` // URL of the Master EOS MGM. // Default is root://eos-example.org MasterURL string `yaml:"master_url"` // URI of the EOS MGM grpc server // Default is empty GrpcURI string `yaml:"grpc_uri"` // URL of the Slave EOS MGM. // Default is root://eos-example.org SlaveURL string `yaml:"slave_url"` // Location on the local fs where to store reads. // Defaults to os.TempDir() CacheDirectory string `yaml:"cache_directory"` // Enables logging of the commands executed // Defaults to false EnableLogging bool `yaml:"enable_logging"` // ShowHiddenSysFiles shows internal EOS files like // .sys.v# and .sys.a# files. ShowHiddenSysFiles bool `yaml:"shadow_hidden_files"` // ForceSingleUserMode will force connections to EOS to use SingleUsername ForceSingleUserMode bool `yaml:"force_single_user_mode"` // UseKeyTabAuth changes will authenticate requests by using an EOS keytab. UseKeytab bool `yaml:"user_keytab"` // SecProtocol specifies the xrootd security protocol to use between the server and EOS. SecProtocol string `yaml:"sec_protocol"` // Keytab specifies the location of the keytab to use to authenticate to EOS. Keytab string `yaml:"keytab"` // SingleUsername is the username to use when SingleUserMode is enabled SingleUsername string `yaml:"single_username"` // gateway service to use for uid lookups GatewaySVC string `yaml:"gateway_svc"` }
DriverEOS defines the available EOS driver configuration.
type DriverOCIS ¶
type DriverOCIS struct {
DriverCommon
}
DriverOCIS defines the available oCIS storage driver configuration.
type DriverOwnCloudSQL ¶
type DriverOwnCloudSQL struct { DriverCommon UploadInfoDir string `yaml:"upload_info_dir"` DBUsername string `yaml:"db_username"` DBPassword string `yaml:"db_password"` DBHost string `yaml:"db_host"` DBPort int `yaml:"db_port"` DBName string `yaml:"db_name"` }
DriverOwnCloudSQL defines the available ownCloudSQL storage driver configuration.
type DriverS3 ¶
type DriverS3 struct { DriverCommon Region string `yaml:"region"` AccessKey string `yaml:"access_key"` SecretKey string `yaml:"secret_key"` Endpoint string `yaml:"endpoint"` Bucket string `yaml:"bucket"` }
DriverS3 defines the available S3 storage driver configuration.
type DriverS3NG ¶
type DriverS3NG struct { DriverCommon Region string `yaml:"region"` AccessKey string `yaml:"access_key"` SecretKey string `yaml:"secret_key"` Endpoint string `yaml:"endpoint"` Bucket string `yaml:"bucket"` }
DriverS3NG defines the available s3ng storage driver configuration.
type FrontendPort ¶
type FrontendPort struct { Port AppProviderInsecure bool `yaml:"app_provider_insecure"` AppProviderPrefix string `yaml:"app_provider_prefix"` ArchiverInsecure bool `yaml:"archiver_insecure"` ArchiverPrefix string `yaml:"archiver_prefix"` DatagatewayPrefix string `yaml:"data_gateway_prefix"` Favorites bool `yaml:"favorites"` ProjectSpaces bool `yaml:"project_spaces"` OCSPrefix string `yaml:"ocs_prefix"` OCSHomeNamespace string `yaml:"ocs_home_namespace"` PublicURL string `yaml:"public_url"` OCSCacheWarmupDriver string `yaml:"ocs_cache_warmup_driver"` OCSAdditionalInfoAttribute string `yaml:"ocs_additional_info_attribute"` OCSResourceInfoCacheTTL int `yaml:"ocs_resource_info_cache_ttl"` Middleware Middleware `yaml:"middleware"` }
FrontendPort defines the available frontend configuration.
type Gateway ¶
type Gateway struct { Port DisableHomeCreationOnLogin bool `yaml:"disable_home_creation_on_login"` LinkGrants string `yaml:"link_grants"` HomeMapping string `yaml:"home_mapping"` EtagCacheTTL int `yaml:"etag_cache_ttl"` }
Gateway defines the available gateway configuration.
type Groups ¶
type Groups struct { Port Driver string `yaml:"driver"` JSON string `yaml:"json"` GroupMembersCacheExpiration int `yaml:"group_members_cache_expiration"` }
Groups defines the available groups configuration.
type LDAP ¶
type LDAP struct { URI string `yaml:"uri"` CACert string `yaml:"ca_cert"` Insecure bool `yaml:"insecure"` UserBaseDN string `yaml:"user_base_dn"` GroupBaseDN string `yaml:"group_base_dn"` UserScope string `yaml:"user_scope"` GroupScope string `yaml:"group_scope"` UserObjectClass string `yaml:"user_objectclass"` GroupObjectClass string `yaml:"group_objectclass"` UserFilter string `yaml:"user_filter"` GroupFilter string `yaml:"group_filter"` LoginAttributes []string `yaml:"login_attributes"` BindDN string `yaml:"bind_dn"` BindPassword string `yaml:"bind_password"` IDP string `yaml:"idp"` UserSchema LDAPUserSchema `yaml:"user_schema"` GroupSchema LDAPGroupSchema `yaml:"group_schema"` }
LDAP defines the available ldap configuration.
type LDAPGroupSchema ¶
type LDAPGroupSchema struct { ID string `yaml:"id"` IDIsOctetString bool `yaml:"id_is_octet_string"` Mail string `yaml:"mail"` DisplayName string `yaml:"display_name"` Groupname string `yaml:"group_name"` Member string `yaml:"member"` GIDNumber string `yaml:"gid_number"` }
LDAPGroupSchema defines the available ldap group schema configuration.
type LDAPUserSchema ¶
type LDAPUserSchema struct { ID string `yaml:"id"` IDIsOctetString bool `yaml:"id_is_octet_string"` Mail string `yaml:"mail"` DisplayName string `yaml:"display_name"` Username string `yaml:"user_name"` UIDNumber string `yaml:"uid_number"` GIDNumber string `yaml:"gid_number"` }
LDAPUserSchema defines the available ldap user schema configuration.
type Log ¶
type Log struct { Level string `yaml:"level"` Pretty bool `yaml:"pretty"` Color bool `yaml:"color"` File string `yaml:"file"` }
Log defines the available logging configuration.
type Middleware ¶
type Middleware struct {
Auth Auth `yaml:"auth"`
}
Middleware configures reva middlewares.
type OCDav ¶
type OCDav struct { // Addr to listen to with the http server for the ocdav service Addr string `yaml:"addr"` Prefix string `yaml:"prefix"` WebdavNamespace string `yaml:"webdav_namespace"` FilesNamespace string `yaml:"files_namespace"` // PublicURL used to redirect /s/{token} URLs to PublicURL string `yaml:"public_url"` // Addr to listen to with the debug http server DebugAddr string `yaml:"debug_addr"` // GatewaySVC to forward CS3 requests to TODO use registry GatewaySVC string `yaml:"gateway_svc"` // JWTSecret used to verify reva access token JWTSecret string `yaml:"jwt_secret"` // Insecure certificates allowed when making requests to the gateway Insecure bool `yaml:"insecure"` // Timeout in seconds when making requests to the gateway Timeout int64 `yaml:"timeout"` }
OCDav defines the available ocdav configuration.
type OIDC ¶
type OIDC struct { Issuer string `yaml:"issuer"` Insecure bool `yaml:"insecure"` IDClaim string `yaml:"id_claim"` UIDClaim string `yaml:"uid_claim"` GIDClaim string `yaml:"gid_claim"` }
OIDC defines the available OpenID Connect configuration.
type Port ¶
type Port struct { // MaxCPUs can be a number or a percentage MaxCPUs string `yaml:"max_cpus"` LogLevel string `yaml:"log_level"` // GRPCNetwork can be tcp, udp or unix GRPCNetwork string `yaml:"grpc_network"` // GRPCAddr to listen on, hostname:port (0.0.0.0:9999 for all interfaces) or socket (/var/run/reva/sock) GRPCAddr string `yaml:"grpc_addr"` // Protocol can be grpc or http // HTTPNetwork can be tcp, udp or unix HTTPNetwork string `yaml:"http_network"` // HTTPAddr to listen on, hostname:port (0.0.0.0:9100 for all interfaces) or socket (/var/run/reva/sock) HTTPAddr string `yaml:"http_addr"` // Protocol can be grpc or http Protocol string `yaml:"protocol"` // Endpoint is used by the gateway and registries (eg localhost:9100 or cloud.example.com) Endpoint string `yaml:"endpoint"` // DebugAddr for the debug endpoint to bind to DebugAddr string `yaml:"debug_addr"` // Services can be used to give a list of services that should be started on this port Services []string `yaml:"services"` // Config can be used to configure the reva instance. // Services and Protocol will be ignored if this is used Config map[string]interface{} `yaml:"config"` // Context allows for context cancellation and propagation Context context.Context // Supervised is used when running under an oCIS runtime supervision tree Supervised bool // deprecated // TODO: delete me }
Port defines the available port configuration.
type PublicStorage ¶
type PublicStorage struct { StoragePort UserProviderAddr string `yaml:"user_provider_addr"` }
PublicStorage configures a public storage provider
type Reva ¶
type Reva struct { // JWTSecret used to sign jwt tokens between services JWTSecret string `yaml:"jwt_secret"` SkipUserGroupsInToken bool `yaml:"skip_user_grooups_in_token"` TransferSecret string `yaml:"transfer_secret"` TransferExpires int `yaml:"transfer_expires"` OIDC OIDC `yaml:"oidc"` LDAP LDAP `yaml:"ldap"` UserGroupRest UserGroupRest `yaml:"user_group_rest"` UserOwnCloudSQL UserOwnCloudSQL `yaml:"user_owncloud_sql"` Archiver Archiver `yaml:"archiver"` UserStorage StorageConfig `yaml:"user_storage"` MetadataStorage StorageConfig `yaml:"metadata_storage"` // Ports are used to configure which services to start on which port Frontend FrontendPort `yaml:"frontend"` DataGateway DataGatewayPort `yaml:"data_gateway"` Gateway Gateway `yaml:"gateway"` StorageRegistry StorageRegistry `yaml:"storage_registry"` AppRegistry AppRegistry `yaml:"app_registry"` Users Users `yaml:"users"` Groups Groups `yaml:"groups"` AuthProvider Users `yaml:"auth_provider"` AuthBasic Port `yaml:"auth_basic"` AuthBearer Port `yaml:"auth_bearer"` AuthMachine Port `yaml:"auth_machine"` AuthMachineConfig AuthMachineConfig `yaml:"auth_machine_config"` Sharing Sharing `yaml:"sharing"` StorageUsers StoragePort `yaml:"storage_users"` StoragePublicLink PublicStorage `yaml:"storage_public_link"` StorageMetadata StoragePort `yaml:"storage_metadata"` AppProvider AppProvider `yaml:"app_provider"` Permissions Port `yaml:"permissions"` // Configs can be used to configure the reva instance. // Services and Ports will be ignored if this is used Configs map[string]interface{} `yaml:"configs"` // chunking and resumable upload config (TUS) UploadMaxChunkSize int `yaml:"upload_max_chunk_size"` UploadHTTPMethodOverride string `yaml:"upload_http_method_override"` // checksumming capabilities ChecksumSupportedTypes []string `yaml:"checksum_supported_types"` ChecksumPreferredUploadType string `yaml:"checksum_preferred_upload_type"` DefaultUploadProtocol string `yaml:"default_upload_protocol"` }
Reva defines the available reva configuration.
type Sharing ¶
type Sharing struct { Port UserDriver string `yaml:"user_driver"` UserJSONFile string `yaml:"user_json_file"` CS3ProviderAddr string `yaml:"provider_addr"` CS3ServiceUser string `yaml:"service_user_id"` CS3ServiceUserIdp string `yaml:"service_user_idp"` UserSQLUsername string `yaml:"user_sql_username"` UserSQLPassword string `yaml:"user_sql_password"` UserSQLHost string `yaml:"user_sql_host"` UserSQLPort int `yaml:"user_sql_port"` UserSQLName string `yaml:"user_sql_name"` PublicDriver string `yaml:"public_driver"` PublicJSONFile string `yaml:"public_json_file"` PublicPasswordHashCost int `yaml:"public_password_hash_cost"` PublicJanitorRunInterval int `yaml:"public_janitor_run_interval"` UserStorageMountID string `yaml:"user_storage_mount_id"` Events Events `yaml:"events"` }
Sharing defines the available sharing configuration.
type StorageConfig ¶
type StorageConfig struct { EOS DriverEOS `yaml:"eos"` Local DriverCommon `yaml:"local"` OwnCloudSQL DriverOwnCloudSQL `yaml:"owncloud_sql"` S3 DriverS3 `yaml:"s3"` S3NG DriverS3NG `yaml:"s3ng"` OCIS DriverOCIS `yaml:"ocis"` }
StorageConfig combines all available storage driver configuration parts.
type StoragePort ¶
type StoragePort struct { Port Driver string `yaml:"driver"` MountID string `yaml:"mount_id"` AlternativeID string `yaml:"alternative_id"` ExposeDataServer bool `yaml:"expose_data_server"` // url the data gateway will use to route requests DataServerURL string `yaml:"data_server_url"` // for HTTP ports with only one http service HTTPPrefix string `yaml:"http_prefix"` TempFolder string `yaml:"temp_folder"` ReadOnly bool `yaml:"read_only"` DataProvider DataProvider `yaml:"data_provider"` GatewayEndpoint string `yaml:"gateway_endpoint"` }
StoragePort defines the available storage configuration.
type StorageRegistry ¶
type StorageRegistry struct { Driver string `yaml:"driver"` // HomeProvider is the path in the global namespace that the static storage registry uses to determine the home storage HomeProvider string `yaml:"home_provider"` Rules []string `yaml:"rules"` JSON string `yaml:"json"` }
StorageRegistry defines the available storage registry configuration
type Tracing ¶
type Tracing struct { Enabled bool `yaml:"enabled"` Type string `yaml:"type"` Endpoint string `yaml:"endpoint"` Collector string `yaml:"collector"` Service string `yaml:"service"` }
Tracing defines the available tracing configuration.
type UserGroupRest ¶
type UserGroupRest struct { ClientID string `yaml:"client_id"` ClientSecret string `yaml:"client_secret"` RedisAddress string `yaml:"redis_address"` RedisUsername string `yaml:"redis_username"` RedisPassword string `yaml:"redis_password"` IDProvider string `yaml:"idp_provider"` APIBaseURL string `yaml:"api_base_url"` OIDCTokenEndpoint string `yaml:"oidc_token_endpoint"` TargetAPI string `yaml:"target_api"` }
UserGroupRest defines the REST driver specification for user and group resolution.
type UserOwnCloudSQL ¶ added in v1.12.0
type UserOwnCloudSQL struct { DBUsername string `yaml:"db_username"` DBPassword string `yaml:"db_password"` DBHost string `yaml:"db_host"` DBPort int `yaml:"db_port"` DBName string `yaml:"db_name"` Idp string `yaml:"idp"` Nobody int64 `yaml:"nobody"` JoinUsername bool `yaml:"join_username"` JoinOwnCloudUUID bool `yaml:"join_owncloud_uuid"` EnableMedialSearch bool `yaml:"enable_medial_search"` }
UserOwnCloudSQL defines the available ownCloudSQL user provider configuration.
type Users ¶
type Users struct { Port Driver string `yaml:"driver"` JSON string `yaml:"json"` UserGroupsCacheExpiration int `yaml:"user_groups_cache_expiration"` }
Users defines the available users configuration.
type WopiDriver ¶ added in v1.12.0
type WopiDriver struct { AppAPIKey string `yaml:"app_api_key"` AppDesktopOnly bool `yaml:"app_desktop_only"` AppIconURI string `yaml:"app_icon_uri"` AppInternalURL string `yaml:"app_internal_url"` AppName string `yaml:"app_name"` AppURL string `yaml:"app_url"` Insecure bool `yaml:"insecure"` IopSecret string `yaml:"ipo_secret"` JWTSecret string `yaml:"jwt_secret"` WopiURL string `yaml:"wopi_url"` }