Documentation
¶
Index ¶
- func RegisterCoreServices(reg *serviceregistry.Registry, modes []serviceregistry.ModeName) ([]string, error)
- func RegisterEssentialServices(reg *serviceregistry.Registry) error
- func Start(f ...StartOptions) error
- type ServiceName
- type StartConfig
- type StartOptions
- func WithAdditionalConfigLoader(loader config.Loader) StartOptions
- func WithBuiltinAuthZPolicy(policy string) StartOptions
- func WithCasbinAdapter(adapter persist.Adapter) StartOptions
- func WithConfigFile(file string) StartOptions
- func WithConfigKey(key string) StartOptions
- func WithConfigLoaderOrder(loaderOrder []string) StartOptions
- func WithConfigName(name string) StartOptionsdeprecated
- func WithCoreServices(services ...serviceregistry.IService) StartOptions
- func WithIPCReauthRoutes(routes []string) StartOptions
- func WithPublicRoutes(routes []string) StartOptions
- func WithServices(services ...serviceregistry.IService) StartOptions
- func WithTrustKeyManagerCtxFactories(factories ...trust.NamedKeyManagerCtxFactory) StartOptions
- func WithTrustKeyManagerFactories(factories ...trust.NamedKeyManagerFactory) StartOptions
- func WithWaitForShutdownSignal() StartOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCoreServices ¶ added in v0.10.0
func RegisterCoreServices(reg *serviceregistry.Registry, modes []serviceregistry.ModeName) ([]string, error)
RegisterCoreServices registers the core services using declarative configuration
func RegisterEssentialServices ¶ added in v0.10.0
func RegisterEssentialServices(reg *serviceregistry.Registry) error
RegisterEssentialServices registers the essential services directly
func Start ¶
func Start(f ...StartOptions) error
Types ¶
type ServiceName ¶ added in v0.10.0
type ServiceName string
ServiceName represents a typed service identifier
var ( ServiceHealth ServiceName = "health" ServiceKAS ServiceName = "kas" ServicePolicy ServiceName = "policy" ServiceWellKnown ServiceName = "wellknown" ServiceEntityResolution ServiceName = "entityresolution" ServiceAuthorization ServiceName = "authorization" )
func (ServiceName) String ¶ added in v0.10.0
func (s ServiceName) String() string
String returns the string representation of ServiceName
type StartConfig ¶
type StartOptions ¶
type StartOptions func(StartConfig) StartConfig
func WithAdditionalConfigLoader ¶ added in v0.5.3
func WithAdditionalConfigLoader(loader config.Loader) StartOptions
WithAdditionalConfigLoader option adds an additional configuration loader to the server.
func WithBuiltinAuthZPolicy ¶ added in v0.4.30
func WithBuiltinAuthZPolicy(policy string) StartOptions
WithAuthZPolicy option sets the default casbin policy to be used. Example:
opentdf.WithAuthZPolicy(strings.Join([]string{ "p, role:admin, pep*, *, allow", "p, role:standard, pep*, read, allow", }, "\n")),
func WithCasbinAdapter ¶ added in v0.4.30
func WithCasbinAdapter(adapter persist.Adapter) StartOptions
WithCasbinAdapter option sets the casbin adapter to be used for the casbin enforcer.
func WithConfigFile ¶
func WithConfigFile(file string) StartOptions
WithConfigFile option sets the configuration file path.
func WithConfigKey ¶
func WithConfigKey(key string) StartOptions
WithConfigKey option sets the viper configuration key(filename).
func WithConfigLoaderOrder ¶ added in v0.10.0
func WithConfigLoaderOrder(loaderOrder []string) StartOptions
WithConfigLoaderOrder option is a slice of config.Loader names and is used as the priority of the loaders.
func WithConfigName
deprecated
func WithConfigName(name string) StartOptions
Deprecated: Use WithConfigKey WithConfigName option sets the configuration name.
func WithCoreServices ¶ added in v0.4.18
func WithCoreServices(services ...serviceregistry.IService) StartOptions
WithCoreServices option adds additional core services to the platform It takes a variadic parameter of type serviceregistry.IService, which represents the core services to be added.
func WithIPCReauthRoutes ¶ added in v0.5.1
func WithIPCReauthRoutes(routes []string) StartOptions
WithIPCReauthRoutes option sets the IPC reauthorization routes for the server. It enables the server to reauthorize IPC routes and embed the token on the context.
func WithPublicRoutes ¶
func WithPublicRoutes(routes []string) StartOptions
WithPublicRoutes option sets the public routes for the server. It allows bypassing the authorization middleware for the specified routes. *** This should be used with caution as it can expose sensitive data. ***
func WithServices ¶ added in v0.4.18
func WithServices(services ...serviceregistry.IService) StartOptions
WithServices option adds additional services to the platform. It takes a variadic parameter of type serviceregistry.IService, which represents the services to be added.
This will set the mode for these services to the Namespace name. To understand the registration of these services more fully, including the service "mode", follow the usage of the extraServices field in StartConfig.
func WithTrustKeyManagerCtxFactories ¶ added in v0.10.0
func WithTrustKeyManagerCtxFactories(factories ...trust.NamedKeyManagerCtxFactory) StartOptions
WithTrustKeyManagerCtxFactories option provides factories for creating trust key managers.
func WithTrustKeyManagerFactories ¶ added in v0.7.0
func WithTrustKeyManagerFactories(factories ...trust.NamedKeyManagerFactory) StartOptions
WithTrustKeyManagerFactories option provides factories for creating trust key managers. Use WithTrustKeyManagerCtxFactories instead. EXPERIMENTAL
func WithWaitForShutdownSignal ¶
func WithWaitForShutdownSignal() StartOptions
WithWaitForShutdownSignal option allows the server to wait for a shutdown signal before exiting.