Documentation
¶
Index ¶
- Constants
- Variables
- type AccessParams
- type AccessScope
- type ApplicationOwners
- type ConsumerInfo
- type ExpiryInfo
- type GrantParams
- type GrantScopeType
- type GrantSubjectType
- type Labels
- type Owner
- type RemoteSecretInfo
- type Role
- type RotatePolicy
- type RotationExpiryInfo
- type RotationInfo
- type UnitOwners
- type UpsertSecretParams
Constants ¶
const ( ApplicationOwner = secrets.ApplicationOwner UnitOwner = secrets.UnitOwner ModelOwner = secrets.ModelOwner )
These represent the kinds of secret owner.
Variables ¶
var ( NilLabels = Labels(nil) NilApplicationOwners = ApplicationOwners(nil) NilUnitOwners = UnitOwners(nil) NilRevision = (*int)(nil) NilSecretURI = (*secrets.URI)(nil) )
These consts are used to specify nil filter terms.
Functions ¶
This section is empty.
Types ¶
type AccessParams ¶
type AccessParams struct { SubjectTypeID GrantSubjectType SubjectID string }
AccessParams are used when querying secret access.
type AccessScope ¶
type AccessScope struct { ScopeTypeID GrantScopeType ScopeID string }
AccessScope are used when querying secret access scopes.
type ApplicationOwners ¶
type ApplicationOwners []string
These type aliases are used to specify filter terms.
type ConsumerInfo ¶
type ConsumerInfo struct { SubjectTypeID GrantSubjectType SubjectID string Label string CurrentRevision int }
ConsumerInfo holds information about a secret consumer.
type ExpiryInfo ¶
type ExpiryInfo struct { URI *secrets.URI Revision int RevisionID string NextTriggerTime time.Time }
ExpiryInfo holds information about the expiry of a secret revision.
type GrantParams ¶
type GrantParams struct { ScopeTypeID GrantScopeType ScopeID string SubjectTypeID GrantSubjectType SubjectID string RoleID Role }
GrantParams are used when granting access to a secret.
type GrantScopeType ¶
type GrantScopeType int
GrantScopeType represents the type of a subject granted access to a secret as recorded in the secret_grant_subject_type lookup table.
const ( ScopeUnit GrantScopeType = iota ScopeApplication ScopeModel ScopeRelation )
func (GrantScopeType) String ¶
func (s GrantScopeType) String() string
String implements fmt.Stringer.
type GrantSubjectType ¶
type GrantSubjectType int
GrantSubjectType represents the type of the scope of a secret access grant as recorded in the secret_grant_scope_type lookup table.
const ( SubjectUnit GrantSubjectType = iota SubjectApplication SubjectModel SubjectRemoteApplication )
func (GrantSubjectType) String ¶
func (s GrantSubjectType) String() string
String implements fmt.Stringer.
type RemoteSecretInfo ¶
type RemoteSecretInfo struct { URI *secrets.URI SubjectTypeID GrantSubjectType SubjectID string Label string CurrentRevision int LatestRevision int }
RemoteSecretInfo holds information about a remote secret for a given consumer.
type Role ¶
type Role int
Role represents the role of a secret access grant as recorded in the secret_role lookup table.
func MarshallRole ¶
func MarshallRole(role coresecrets.SecretRole) Role
MarshallRole converts a secret role to a db role id.
type RotatePolicy ¶
type RotatePolicy int
RotatePolicy represents the rotate policy of a secret. as recorded in the secret_rotate_policy lookup table.
const ( RotateNever RotatePolicy = iota RotateHourly RotateDaily RotateWeekly RotateMonthly RotateQuarterly RotateYearly )
func MarshallRotatePolicy ¶
func MarshallRotatePolicy(policy *coresecrets.RotatePolicy) RotatePolicy
MarshallRotatePolicy converts a secret rotate policy to a db rotate policy id.
type RotationExpiryInfo ¶
type RotationExpiryInfo struct { // RotatePolicy is the rotation policy of the secret. RotatePolicy secrets.RotatePolicy // NextRotateTime is when the secret should be rotated. NextRotateTime *time.Time // LatestExpireTime is the expire time of the most recent revision. LatestExpireTime *time.Time // LatestRevision is the most recent secret revision. LatestRevision int }
RotationExpiryInfo holds information about the rotation and expiry of a secret.
type RotationInfo ¶
RotationInfo holds information about the rotation of a secret.
type UpsertSecretParams ¶
type UpsertSecretParams struct { RevisionID *string RotatePolicy *RotatePolicy ExpireTime *time.Time NextRotateTime *time.Time Description *string Label *string AutoPrune *bool Data secrets.SecretData ValueRef *secrets.ValueRef Checksum string }
UpsertSecretParams are used to upsert a secret. Only non-nil values are used.
func (*UpsertSecretParams) HasUpdate ¶
func (u *UpsertSecretParams) HasUpdate() bool
HasUpdate returns true if at least one attribute to update is not nil.