Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Name string `yaml:"name" validate:"required"`
State TokenState `yaml:"state" validate:"required"`
Rotation *Rotation `yaml:"rotation,omitempty"`
Source Source `yaml:"source" validate:"required"`
Vault Vault `yaml:"vault" validate:"required"`
}
Config defines settings for a specific token.
type Rotation ¶
type Rotation struct {
RotateBefore time.Duration `yaml:"rotate_before" validate:"required"`
Validity time.Duration `yaml:"validity" validate:"required"`
}
Rotation defines the validity and
type Source ¶
type Source struct {
Name string `yaml:"name" validate:"required"`
Description string `yaml:"description"`
Type string `yaml:"type" validate:"required"` // personal, project, group, ...
Owner string `yaml:"owner"` // user/project/group ID or full name
Role string `yaml:"role"`
Scopes []string `yaml:"scopes" validate:"required"`
}
Source defines the source of a token.
type Status ¶
type Status struct {
SourceID string `yaml:"token_id"`
VaultID string `yaml:"vault_id"`
ItemID string `yaml:"item_id"`
ExpiresAt string `yaml:"expires_at"`
}
Status represents the status of a token synchronization.
type TokenState ¶
type TokenState string
const ( TokenStateActive TokenState = "active" TokenStateInactive TokenState = "inactive" TokenStateDeleted TokenState = "deleted" )
Click to show internal directories.
Click to hide internal directories.