Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendIdentifier ¶
BackendIdentifier is used to identify a secret backend.
func (BackendIdentifier) String ¶
func (i BackendIdentifier) String() string
String returns the identifier as a string.
type BackendType ¶
type BackendType int
BackendType represents the type of a secret backend as recorded in the secret_backend_type lookup table.
const ( BackendTypeController BackendType = iota BackendTypeKubernetes BackendTypeVault )
func MarshallBackendType ¶
func MarshallBackendType(backendType string) (BackendType, error)
MarshallBackendType converts a secret backend type to a db backend type id.
type CreateSecretBackendParams ¶
type CreateSecretBackendParams struct { BackendIdentifier BackendType string TokenRotateInterval *time.Duration NextRotateTime *time.Time Config map[string]string }
CreateSecretBackendParams are used to create a secret backend.
func (CreateSecretBackendParams) Validate ¶
func (p CreateSecretBackendParams) Validate() error
Validate checks that the parameters are valid.
type ModelSecretBackend ¶
type ModelSecretBackend struct { // ControllerUUID is the uuid of the controller. ControllerUUID string // ModelID is the unique identifier for the model. ModelID coremodel.UUID // ModelName is the name of the model. ModelName string // ModelType is the type of the model. ModelType coremodel.ModelType // SecretBackendID is the unique identifier for the secret backend configured for the model. SecretBackendID string // SecretBackendName is the name of the secret backend configured for the model. SecretBackendName string }
ModelSecretBackend represents a set of data about a model and its secret backend config.
type SecretBackend ¶
type SecretBackend struct { // ID is the unique identifier of the secret backend. ID string // Name is the human-readable name of the secret backend. Name string // BackendType is the type of the secret backend. BackendType string // TokenRotateInterval is the interval at which the token should be rotated. TokenRotateInterval *time.Duration // NextRotateTime is the time at which the next token rotation should occur. NextRotateTime *time.Time // Config is the configuration of the secret backend. Config map[string]any // NumSecrets is the number of secrets stored in the secret backend. NumSecrets int }
SecretBackend represents a secret backend instance from state.
type UpdateSecretBackendParams ¶
type UpdateSecretBackendParams struct { BackendIdentifier NewName *string TokenRotateInterval *time.Duration NextRotateTime *time.Time Config map[string]string }
UpdateSecretBackendParams are used to update a secret backend.
func (UpdateSecretBackendParams) Validate ¶
func (p UpdateSecretBackendParams) Validate() error
Validate checks that the parameters are valid.