Documentation
¶
Index ¶
- Constants
- Variables
- func BindingKeysFromCandidates(candidates []Candidate) ([]string, error)
- func DefaultCipherSeed(seed string) string
- func NormalizeName(raw string) (string, error)
- func ParseBindingKeys(raw []string) ([]string, error)
- func ProjectIDForBindingScope(scope BindingScopeKind, projectID uuid.UUID) uuid.UUID
- func ProjectIDForSecretScope(scope ScopeKind, projectID uuid.UUID) uuid.UUID
- func RedactValue(raw string) string
- func ResolutionRank(scope BindingScopeKind) int
- type Binding
- type BindingRecord
- type BindingScopeKind
- type BindingTarget
- type Candidate
- type InventorySecret
- type KeySource
- type Kind
- type ResolvedSecret
- type ScopeKind
- type Secret
- type SelectedBinding
- type StoredValue
Constants ¶
View Source
const ( CipherAlgorithmAES256GCM = "aes-256-gcm" KeySourceDatabaseDSNSHA256 KeySource = "database_dsn_sha256" DefaultKeyID = "database-dsn-sha256:v1" )
Variables ¶
View Source
var (
ErrResolutionScopeConflict = errors.New("secret binding precedence conflict")
)
Functions ¶
func DefaultCipherSeed ¶
func NormalizeName ¶
func ParseBindingKeys ¶
func ProjectIDForBindingScope ¶
func ProjectIDForBindingScope(scope BindingScopeKind, projectID uuid.UUID) uuid.UUID
func ProjectIDForSecretScope ¶
func RedactValue ¶
func ResolutionRank ¶
func ResolutionRank(scope BindingScopeKind) int
Types ¶
type Binding ¶
type Binding struct {
ID uuid.UUID `json:"id"`
OrganizationID uuid.UUID `json:"organization_id"`
ProjectID uuid.UUID `json:"project_id"`
SecretID uuid.UUID `json:"secret_id"`
Scope BindingScopeKind `json:"scope"`
ScopeResourceID uuid.UUID `json:"scope_resource_id"`
BindingKey string `json:"binding_key"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type BindingRecord ¶
type BindingRecord struct {
Binding Binding `json:"binding"`
Secret Secret `json:"secret"`
Target BindingTarget `json:"target"`
}
type BindingScopeKind ¶
type BindingScopeKind string
const ( BindingScopeKindOrganization BindingScopeKind = "organization" BindingScopeKindProject BindingScopeKind = "project" BindingScopeKindWorkflow BindingScopeKind = "workflow" BindingScopeKindAgent BindingScopeKind = "agent" BindingScopeKindTicket BindingScopeKind = "ticket" )
func ParseBindingScopeKind ¶
func ParseBindingScopeKind(raw string) (BindingScopeKind, error)
func ParseRuntimeBindingScopeKind ¶
func ParseRuntimeBindingScopeKind(raw string) (BindingScopeKind, error)
type BindingTarget ¶
type BindingTarget struct {
ID uuid.UUID `json:"id"`
Scope BindingScopeKind `json:"scope"`
Name string `json:"name"`
Identifier string `json:"identifier,omitempty"`
}
type InventorySecret ¶
type InventorySecret struct {
Secret Secret `json:"secret"`
UsageCount int `json:"usage_count"`
UsageScopes []BindingScopeKind `json:"usage_scopes"`
}
type ResolvedSecret ¶
type ResolvedSecret struct {
BindingKey string `json:"binding_key"`
BindingScope BindingScopeKind `json:"binding_scope"`
SecretID uuid.UUID `json:"secret_id"`
SecretName string `json:"secret_name"`
SecretScope ScopeKind `json:"secret_scope"`
SecretKind Kind `json:"secret_kind"`
Value string `json:"value"`
}
type Secret ¶
type Secret struct {
ID uuid.UUID `json:"id"`
OrganizationID uuid.UUID `json:"organization_id"`
ProjectID uuid.UUID `json:"project_id"`
Scope ScopeKind `json:"scope"`
Name string `json:"name"`
Kind Kind `json:"kind"`
Description string `json:"description"`
DisabledAt *time.Time `json:"disabled_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
StoredValue StoredValue `json:"stored_value"`
}
type SelectedBinding ¶
func SelectBindings ¶
func SelectBindings(keys []string, candidates []Candidate) ([]SelectedBinding, []string, error)
Click to show internal directories.
Click to hide internal directories.