Merge pull request #4407 from wkloucek/rename-extensions-to-services-reloaded

rename extensions to services (leftover occurences)
This commit is contained in:
Willy Kloucek
2022-08-18 14:03:20 +02:00
committed by GitHub
78 changed files with 157 additions and 151 deletions

View File

@@ -0,0 +1,6 @@
Bugfix: Rename extensions to services (leftover occurences)
We've already renamed extensions to services in previous PRs and this
PR peforms this rename for leftover occurences.
https://github.com/owncloud/ocis/pull/4407

View File

@@ -47,10 +47,10 @@ type Mode int
// Runtime configures the oCIS runtime when running in supervised mode.
type Runtime struct {
Port string `yaml:"port" env:"OCIS_RUNTIME_PORT"`
Host string `yaml:"host" env:"OCIS_RUNTIME_HOST"`
Extensions string `yaml:"services" env:"OCIS_RUN_EXTENSIONS;OCIS_RUN_SERVICES" desc:"Expects a comma separated list of service names. Will start only the listed services."`
Disabled string `yaml:"disabled_services" env:"OCIS_EXCLUDE_RUN_SERVICES" desc:"Expects a comma separated list of service names. Will start all services except of the ones listed. Has no effect when OCIS_RUN_SERVICES is set."`
Port string `yaml:"port" env:"OCIS_RUNTIME_PORT"`
Host string `yaml:"host" env:"OCIS_RUNTIME_HOST"`
Services string `yaml:"services" env:"OCIS_RUN_EXTENSIONS;OCIS_RUN_SERVICES" desc:"Expects a comma separated list of service names. Will start only the listed services."`
Disabled string `yaml:"disabled_services" env:"OCIS_EXCLUDE_RUN_SERVICES" desc:"Expects a comma separated list of service names. Will start all services except of the ones listed. Has no effect when OCIS_RUN_SERVICES is set."`
}
// Config combines all available configuration parts.

View File

@@ -17,14 +17,14 @@ var (
// BindSourcesToStructs assigns any config value from a config file / env variable to struct `dst`. Its only purpose
// is to solely modify `dst`, not dealing with the config structs; and do so in a thread safe manner.
func BindSourcesToStructs(extension string, dst interface{}) (*gofig.Config, error) {
cnf := gofig.NewWithOptions(extension)
func BindSourcesToStructs(service string, dst interface{}) (*gofig.Config, error) {
cnf := gofig.NewWithOptions(service)
cnf.WithOptions(func(options *gofig.Options) {
options.DecoderConfig.TagName = decoderConfigTagName
})
cnf.AddDriver(gooyaml.Driver)
cfgFile := path.Join(defaults.BaseConfigPath(), extension+".yaml")
cfgFile := path.Join(defaults.BaseConfigPath(), service+".yaml")
_ = cnf.LoadFiles([]string{cfgFile}...)
err := cnf.BindStruct("", &dst)

View File

@@ -10,7 +10,7 @@ import (
// ParseConfig loads the ocis configuration and
// copies applicable parts into the commons part, from
// where the extensions can copy it into their own config
// where the services can copy it into their own config
func ParseConfig(cfg *config.Config, skipValidate bool) error {
_, err := config.BindSourcesToStructs("ocis", cfg)
if err != nil {
@@ -37,7 +37,7 @@ func ParseConfig(cfg *config.Config, skipValidate bool) error {
}
// EnsureDefaults, ensures that all pointers in the
// oCIS config (not the extensions configs) are initialized
// oCIS config (not the services configs) are initialized
func EnsureDefaults(cfg *config.Config) {
if cfg.Tracing == nil {
cfg.Tracing = &shared.Tracing{}

View File

@@ -2,7 +2,7 @@ package flags
// OverrideDefaultString checks whether the default value of v is the zero value, if so, ensure the flag has a correct
// value by providing one. A value different than zero would mean that it was read from a config file either from an
// extension or from a higher source (i.e: ocis command).
// service or from a higher source (i.e: ocis command).
func OverrideDefaultString(v, def string) string {
if v != "" {
return v
@@ -13,7 +13,7 @@ func OverrideDefaultString(v, def string) string {
// OverrideDefaultBool checks whether the default value of v is the zero value, if so, ensure the flag has a correct
// value by providing one. A value different than zero would mean that it was read from a config file either from an
// extension or from a higher source (i.e: ocis command).
// service or from a higher source (i.e: ocis command).
func OverrideDefaultBool(v, def bool) bool {
if v {
return v
@@ -24,7 +24,7 @@ func OverrideDefaultBool(v, def bool) bool {
// OverrideDefaultInt checks whether the default value of v is the zero value, if so, ensure the flag has a correct
// value by providing one. A value different than zero would mean that it was read from a config file either from an
// extension or from a higher source (i.e: ocis command).
// service or from a higher source (i.e: ocis command).
func OverrideDefaultInt(v, def int) int {
if v != 0 {
return v
@@ -35,7 +35,7 @@ func OverrideDefaultInt(v, def int) int {
// OverrideDefaultInt64 checks whether the default value of v is the zero value, if so, ensure the flag has a correct
// value by providing one. A value different than zero would mean that it was read from a config file either from an
// extension or from a higher source (i.e: ocis command).
// service or from a higher source (i.e: ocis command).
func OverrideDefaultInt64(v, def int64) int64 {
if v != 0 {
return v
@@ -46,7 +46,7 @@ func OverrideDefaultInt64(v, def int64) int64 {
// OverrideDefaultUint64 checks whether the default value of v is the zero value, if so, ensure the flag has a correct
// value by providing one. A value different than zero would mean that it was read from a config file either from an
// extension or from a higher source (i.e: ocis command).
// service or from a higher source (i.e: ocis command).
func OverrideDefaultUint64(v, def uint64) uint64 {
if v != 0 {
return v

View File

@@ -34,7 +34,7 @@ type Reva struct {
Address string `yaml:"address" env:"REVA_GATEWAY" desc:"The CS3 gateway endpoint."`
}
// Commons holds configuration that are common to all extensions. Each extension can then decide whether
// Commons holds configuration that are common to all services. Each service can then decide whether
// to overwrite its values.
type Commons struct {
Log *Log `yaml:"log"`

View File

@@ -5,5 +5,5 @@ import (
)
func SubcommandDescription(serviceName string) string {
return fmt.Sprintf("%s extension commands", serviceName)
return fmt.Sprintf("%s service commands", serviceName)
}

View File

@@ -17,7 +17,7 @@ import (
func VersionCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and all running extension instances",
Usage: "print the version of this binary and all running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -23,24 +23,24 @@ type TokenManager struct {
JWTSecret string `yaml:"jwt_secret"`
}
type InsecureExtension struct {
type InsecureService struct {
Insecure bool
}
type InsecureProxyExtension struct {
type InsecureProxyService struct {
InsecureBackends bool `yaml:"insecure_backends"`
}
type LdapSettings struct {
BindPassword string `yaml:"bind_password"`
}
type LdapBasedExtension struct {
type LdapBasedService struct {
Ldap LdapSettings
}
type GraphExtension struct {
Spaces InsecureExtension
Identity LdapBasedExtension
type GraphService struct {
Spaces InsecureService
Identity LdapBasedService
}
type ServiceUserPasswordsSettings struct {
@@ -49,27 +49,27 @@ type ServiceUserPasswordsSettings struct {
RevaPassword string `yaml:"reva_password"`
IdpPassword string `yaml:"idp_password"`
}
type IdmExtension struct {
type IdmService struct {
ServiceUserPasswords ServiceUserPasswordsSettings `yaml:"service_user_passwords"`
}
type FrontendExtension struct {
Archiver InsecureExtension
type FrontendService struct {
Archiver InsecureService
}
type AuthbasicExtension struct {
AuthProviders LdapBasedExtension `yaml:"auth_providers"`
type AuthbasicService struct {
AuthProviders LdapBasedService `yaml:"auth_providers"`
}
type AuthProviderSettings struct {
Oidc InsecureExtension
Oidc InsecureService
}
type AuthbearerExtension struct {
type AuthbearerService struct {
AuthProviders AuthProviderSettings `yaml:"auth_providers"`
}
type UsersAndGroupsExtension struct {
Drivers LdapBasedExtension
type UsersAndGroupsService struct {
Drivers LdapBasedService
}
type ThumbnailSettings struct {
@@ -78,7 +78,7 @@ type ThumbnailSettings struct {
Cs3AllowInsecure bool `yaml:"cs3_allow_insecure"`
}
type ThumbnailExtension struct {
type ThumbnailService struct {
Thumbnail ThumbnailSettings
}
@@ -101,17 +101,17 @@ type OcisConfig struct {
TransferSecret string `yaml:"transfer_secret"`
SystemUserID string `yaml:"system_user_id"`
AdminUserID string `yaml:"admin_user_id"`
Graph GraphExtension
Idp LdapBasedExtension
Idm IdmExtension
Proxy InsecureProxyExtension
Frontend FrontendExtension
AuthBasic AuthbasicExtension `yaml:"auth_basic"`
AuthBearer AuthbearerExtension `yaml:"auth_bearer"`
Users UsersAndGroupsExtension
Groups UsersAndGroupsExtension
Ocdav InsecureExtension
Thumbnails ThumbnailExtension
Graph GraphService
Idp LdapBasedService
Idm IdmService
Proxy InsecureProxyService
Frontend FrontendService
AuthBasic AuthbasicService `yaml:"auth_basic"`
AuthBearer AuthbearerService `yaml:"auth_bearer"`
Users UsersAndGroupsService
Groups UsersAndGroupsService
Ocdav InsecureService
Thumbnails ThumbnailService
}
func checkConfigPath(configPath string) error {
@@ -213,7 +213,7 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin
TransferSecret: revaTransferSecret,
SystemUserID: systemUserID,
AdminUserID: adminUserID,
Idm: IdmExtension{
Idm: IdmService{
ServiceUserPasswords: ServiceUserPasswordsSettings{
AdminPassword: ocisAdminServicePassword,
IdpPassword: idpServicePassword,
@@ -221,40 +221,40 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin
IdmPassword: idmServicePassword,
},
},
Idp: LdapBasedExtension{
Idp: LdapBasedService{
Ldap: LdapSettings{
BindPassword: idpServicePassword,
},
},
AuthBasic: AuthbasicExtension{
AuthProviders: LdapBasedExtension{
AuthBasic: AuthbasicService{
AuthProviders: LdapBasedService{
Ldap: LdapSettings{
BindPassword: revaServicePassword,
},
},
},
Groups: UsersAndGroupsExtension{
Drivers: LdapBasedExtension{
Groups: UsersAndGroupsService{
Drivers: LdapBasedService{
Ldap: LdapSettings{
BindPassword: revaServicePassword,
},
},
},
Users: UsersAndGroupsExtension{
Drivers: LdapBasedExtension{
Users: UsersAndGroupsService{
Drivers: LdapBasedService{
Ldap: LdapSettings{
BindPassword: revaServicePassword,
},
},
},
Graph: GraphExtension{
Identity: LdapBasedExtension{
Graph: GraphService{
Identity: LdapBasedService{
Ldap: LdapSettings{
BindPassword: idmServicePassword,
},
},
},
Thumbnails: ThumbnailExtension{
Thumbnails: ThumbnailService{
Thumbnail: ThumbnailSettings{
TransferSecret: thumbnailsTransferSecret,
},
@@ -262,25 +262,25 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin
}
if insecure {
cfg.AuthBearer = AuthbearerExtension{
cfg.AuthBearer = AuthbearerService{
AuthProviders: AuthProviderSettings{
Oidc: InsecureExtension{
Oidc: InsecureService{
Insecure: true,
},
},
}
cfg.Frontend = FrontendExtension{
Archiver: InsecureExtension{
cfg.Frontend = FrontendService{
Archiver: InsecureService{
Insecure: true,
},
}
cfg.Graph.Spaces = InsecureExtension{
cfg.Graph.Spaces = InsecureService{
Insecure: true,
}
cfg.Ocdav = InsecureExtension{
cfg.Ocdav = InsecureService{
Insecure: true,
}
cfg.Proxy = InsecureProxyExtension{
cfg.Proxy = InsecureProxyService{
InsecureBackends: true,
}

View File

@@ -10,7 +10,7 @@ import (
"github.com/spf13/cobra"
)
// List running extensions.
// List running service.
func List(cfg *config.Config) *cobra.Command {
return &cobra.Command{
Use: "list",

View File

@@ -53,7 +53,7 @@ import (
)
var (
// runset keeps track of which extensions to start supervised.
// runset keeps track of which services to start supervised.
runset map[string]struct{}
)
@@ -138,7 +138,7 @@ func NewService(options ...Option) (*Service, error) {
return s, nil
}
// Start an rpc service. By default the package scope Start will run all default extensions to provide with a working
// Start an rpc service. By default the package scope Start will run all default services to provide with a working
// oCIS instance.
func Start(o ...Option) error {
// Start the runtime. Most likely this was called ONLY by the `ocis server` subcommand, but since we cannot protect
@@ -237,12 +237,12 @@ func scheduleServiceTokens(s *Service, funcSet serviceFuncMap) {
}
}
// generateRunSet interprets the cfg.Runtime.Extensions config option to cherry-pick which services to start using
// generateRunSet interprets the cfg.Runtime.Services config option to cherry-pick which services to start using
// the runtime.
func (s *Service) generateRunSet(cfg *ociscfg.Config) {
runset = make(map[string]struct{})
if cfg.Runtime.Extensions != "" {
e := strings.Split(strings.ReplaceAll(cfg.Runtime.Extensions, " ", ""), ",")
if cfg.Runtime.Services != "" {
e := strings.Split(strings.ReplaceAll(cfg.Runtime.Services, " ", ""), ",")
for _, name := range e {
runset[name] = struct{}{}
}
@@ -269,7 +269,7 @@ func (s *Service) generateRunSet(cfg *ociscfg.Config) {
func (s *Service) List(args struct{}, reply *string) error {
tableString := &strings.Builder{}
table := tablewriter.NewWriter(tableString)
table.SetHeader([]string{"Extension"})
table.SetHeader([]string{"Service"})
names := []string{}
for t := range s.serviceToken {

View File

@@ -25,7 +25,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)
@@ -97,7 +97,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -24,7 +24,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)
@@ -92,7 +92,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -20,7 +20,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)

View File

@@ -9,7 +9,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
// not implemented

View File

@@ -26,7 +26,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)
@@ -110,7 +110,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -25,7 +25,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)
@@ -97,7 +97,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running services instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -25,7 +25,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)
@@ -97,7 +97,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -25,7 +25,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)
@@ -100,7 +100,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -24,7 +24,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)
@@ -92,7 +92,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -21,7 +21,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(ctx *cli.Context) error {
err := parser.ParseConfig(cfg)

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -12,7 +12,7 @@ import (
"github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config"
)
// Service defines the extension handlers.
// Service defines the service handlers.
type Service interface {
ServeHTTP(http.ResponseWriter, *http.Request)
ConfigJs(http.ResponseWriter, *http.Request)

View File

@@ -21,7 +21,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -27,7 +27,7 @@ const (
HeaderPurge = "Purge"
)
// Service defines the extension handlers.
// Service defines the service handlers.
type Service interface {
ServeHTTP(http.ResponseWriter, *http.Request)
GetMe(http.ResponseWriter, *http.Request)

View File

@@ -26,7 +26,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)
@@ -110,7 +110,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -26,7 +26,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)

View File

@@ -9,7 +9,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
// not implemented

View File

@@ -32,7 +32,7 @@ const _rsaKeySize = 4096
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -29,7 +29,7 @@ import (
"stash.kopano.io/kgol/rndm"
)
// Service defines the extension handlers.
// Service defines the service handlers.
type Service interface {
ServeHTTP(http.ResponseWriter, *http.Request)
}

View File

@@ -18,7 +18,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)

View File

@@ -9,7 +9,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
// not implemented

View File

@@ -19,7 +19,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)

View File

@@ -9,7 +9,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
// not implemented

View File

@@ -20,7 +20,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)
@@ -109,7 +109,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -22,7 +22,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -23,7 +23,7 @@ import (
"github.com/owncloud/ocis/v2/services/proxy/pkg/user/backend"
)
// Service defines the extension handlers.
// Service defines the service handlers.
type Service interface {
ServeHTTP(http.ResponseWriter, *http.Request)
GetConfig(http.ResponseWriter, *http.Request)

View File

@@ -38,7 +38,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "Print the version of this binary and the running extension instances",
Usage: "Print the version of this binary and the running service instances",
Category: "Version",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -21,7 +21,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -22,7 +22,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -26,7 +26,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)
@@ -110,7 +110,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -124,7 +124,7 @@ type PublicSharingSQLDriver struct {
}
type PublicSharingCS3Driver struct {
ProviderAddr string `yaml:"provider_addr" env:"SHARING_PUBLIC_CS3_PROVIDER_ADDR" desc:"GRPC address of the STORAGE-SYSTEM extension."`
ProviderAddr string `yaml:"provider_addr" env:"SHARING_PUBLIC_CS3_PROVIDER_ADDR" desc:"GRPC address of the STORAGE-SYSTEM service."`
SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SHARING_PUBLIC_CS3_SYSTEM_USER_ID" desc:"ID of the oCIS STORAGE-SYSTEM system user. Admins need to set the ID for the STORAGE-SYSTEM system user in this config option which is then used to reference the user. Any reasonable long string is possible, preferably this would be an UUIDv4 format."`
SystemUserIDP string `yaml:"system_user_idp" env:"OCIS_SYSTEM_USER_IDP;SHARING_PUBLIC_CS3_SYSTEM_USER_IDP" desc:"IDP of the oCIS STORAGE-SYSTEM system user."`
SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY;SHARING_USER_CS3_SYSTEM_USER_API_KEY" desc:"API key for the STORAGE-SYSTEM system user."`

View File

@@ -25,7 +25,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)
@@ -97,7 +97,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -25,7 +25,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)
@@ -97,7 +97,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -25,7 +25,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)
@@ -108,7 +108,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -25,7 +25,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)
@@ -97,7 +97,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -22,7 +22,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -22,7 +22,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -21,7 +21,7 @@ const (
keyContextKey contextKey = "key"
)
// Service defines the extension handlers.
// Service defines the service handlers.
type Service interface {
ServeHTTP(http.ResponseWriter, *http.Request)
GetThumbnail(http.ResponseWriter, *http.Request)

View File

@@ -26,7 +26,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)
@@ -110,7 +110,7 @@ func Server(cfg *config.Config) *cli.Command {
}
}
// defineContext sets the context for the extension. If there is a context configured it will create a new child from it,
// defineContext sets the context for the service. If there is a context configured it will create a new child from it,
// if not, it will create a root context that can be cancelled.
func defineContext(cfg *config.Config) (context.Context, context.CancelFunc) {
return func() (context.Context, context.CancelFunc) {

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -22,7 +22,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())

View File

@@ -22,7 +22,7 @@ var (
ErrConfigInvalid = `Invalid or missing config`
)
// Service defines the extension handlers.
// Service defines the service handlers.
type Service interface {
ServeHTTP(http.ResponseWriter, *http.Request)
Config(http.ResponseWriter, *http.Request)

View File

@@ -21,7 +21,7 @@ import (
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
err := parser.ParseConfig(cfg)

View File

@@ -16,7 +16,7 @@ import (
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())