Documentation ¶
Index ¶
- type DatabaseConfig
- func (d DatabaseConfig) Get(ctx context.Context, ref configuration.Ref) (*url.URL, error)
- func (d DatabaseConfig) List(ctx context.Context) ([]configuration.Entry, error)
- func (d DatabaseConfig) Role() configuration.Configuration
- func (d DatabaseConfig) Set(ctx context.Context, ref configuration.Ref, key *url.URL) error
- func (d DatabaseConfig) Unset(ctx context.Context, ref configuration.Ref) error
- type DatabaseConfigDAL
- type DatabaseSecrets
- func (d DatabaseSecrets) Get(ctx context.Context, ref configuration.Ref) (*url.URL, error)
- func (d DatabaseSecrets) List(ctx context.Context) ([]configuration.Entry, error)
- func (d DatabaseSecrets) Role() configuration.Secrets
- func (d DatabaseSecrets) Set(ctx context.Context, ref configuration.Ref, key *url.URL) error
- func (d DatabaseSecrets) Unset(ctx context.Context, ref configuration.Ref) error
- type DatabaseSecretsDAL
- type FileRouter
- func (f *FileRouter[R]) Get(ctx context.Context, ref configuration.Ref) (key *url.URL, err error)
- func (f *FileRouter[R]) List(ctx context.Context) ([]configuration.Entry, error)
- func (f *FileRouter[R]) Role() (role R)
- func (f *FileRouter[R]) Set(ctx context.Context, ref configuration.Ref, key *url.URL) error
- func (f *FileRouter[R]) Unset(ctx context.Context, ref configuration.Ref) error
- type ProjectConfig
- func (p ProjectConfig[R]) Get(ctx context.Context, ref configuration.Ref) (*url.URL, error)
- func (p ProjectConfig[R]) List(ctx context.Context) ([]configuration.Entry, error)
- func (p ProjectConfig[R]) Role() R
- func (p ProjectConfig[R]) Set(ctx context.Context, ref configuration.Ref, key *url.URL) error
- func (p ProjectConfig[From]) Unset(ctx context.Context, ref configuration.Ref) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseConfig ¶
type DatabaseConfig struct {
// contains filtered or unexported fields
}
DatabaseConfig loads values a project's configuration from the given database.
func NewDatabaseConfig ¶
func NewDatabaseConfig(db DatabaseConfigDAL) DatabaseConfig
func (DatabaseConfig) Get ¶
func (d DatabaseConfig) Get(ctx context.Context, ref configuration.Ref) (*url.URL, error)
func (DatabaseConfig) List ¶
func (d DatabaseConfig) List(ctx context.Context) ([]configuration.Entry, error)
func (DatabaseConfig) Role ¶
func (d DatabaseConfig) Role() configuration.Configuration
func (DatabaseConfig) Set ¶
func (d DatabaseConfig) Set(ctx context.Context, ref configuration.Ref, key *url.URL) error
func (DatabaseConfig) Unset ¶
func (d DatabaseConfig) Unset(ctx context.Context, ref configuration.Ref) error
type DatabaseConfigDAL ¶
type DatabaseConfigDAL interface {
ListModuleConfiguration(ctx context.Context) ([]dal.ModuleConfiguration, error)
}
type DatabaseSecrets ¶
type DatabaseSecrets struct {
// contains filtered or unexported fields
}
DatabaseSecrets loads values a project's secrets from the given database.
func NewDatabaseSecrets ¶
func NewDatabaseSecrets(db DatabaseSecretsDAL) DatabaseSecrets
func (DatabaseSecrets) Get ¶
func (d DatabaseSecrets) Get(ctx context.Context, ref configuration.Ref) (*url.URL, error)
func (DatabaseSecrets) List ¶
func (d DatabaseSecrets) List(ctx context.Context) ([]configuration.Entry, error)
func (DatabaseSecrets) Role ¶
func (d DatabaseSecrets) Role() configuration.Secrets
func (DatabaseSecrets) Set ¶
func (d DatabaseSecrets) Set(ctx context.Context, ref configuration.Ref, key *url.URL) error
func (DatabaseSecrets) Unset ¶
func (d DatabaseSecrets) Unset(ctx context.Context, ref configuration.Ref) error
type DatabaseSecretsDAL ¶
type DatabaseSecretsDAL interface { GetModuleSecretURL(ctx context.Context, module optional.Option[string], name string) (string, error) ListModuleSecrets(ctx context.Context) ([]dal.ModuleSecret, error) SetModuleSecretURL(ctx context.Context, module optional.Option[string], name string, url string) error UnsetModuleSecret(ctx context.Context, module optional.Option[string], name string) error }
type FileRouter ¶
type FileRouter[R configuration.Role] struct { // contains filtered or unexported fields }
FileRouter is a simple JSON-file-based router for configuration.
func NewFileRouter ¶
func NewFileRouter[R configuration.Role](path string) *FileRouter[R]
func (*FileRouter[R]) Get ¶
func (f *FileRouter[R]) Get(ctx context.Context, ref configuration.Ref) (key *url.URL, err error)
func (*FileRouter[R]) List ¶
func (f *FileRouter[R]) List(ctx context.Context) ([]configuration.Entry, error)
func (*FileRouter[R]) Role ¶
func (f *FileRouter[R]) Role() (role R)
func (*FileRouter[R]) Set ¶
func (f *FileRouter[R]) Set(ctx context.Context, ref configuration.Ref, key *url.URL) error
func (*FileRouter[R]) Unset ¶
func (f *FileRouter[R]) Unset(ctx context.Context, ref configuration.Ref) error
type ProjectConfig ¶
type ProjectConfig[R configuration.Role] struct { Config string `` /* 126-byte string literal not displayed */ }
ProjectConfig is parametric Resolver that loads values from either a project's configuration or secrets maps based on the type parameter.
See the [projectconfig] package for details on the configuration file format.
func (ProjectConfig[R]) Get ¶
func (p ProjectConfig[R]) Get(ctx context.Context, ref configuration.Ref) (*url.URL, error)
func (ProjectConfig[R]) List ¶
func (p ProjectConfig[R]) List(ctx context.Context) ([]configuration.Entry, error)
func (ProjectConfig[R]) Role ¶
func (p ProjectConfig[R]) Role() R
func (ProjectConfig[R]) Set ¶
func (p ProjectConfig[R]) Set(ctx context.Context, ref configuration.Ref, key *url.URL) error
func (ProjectConfig[From]) Unset ¶
func (p ProjectConfig[From]) Unset(ctx context.Context, ref configuration.Ref) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.