Documentation ¶
Index ¶
- Constants
- type AwsIamSource
- func (src *AwsIamSource) Kind() Kind
- func (src *AwsIamSource) Read() (map[string]string, error)
- func (src *AwsIamSource) RotateKeys(ctx context.Context) (*iam.AccessKey, error)
- func (src *AwsIamSource) WithAwsClient(client *cziAws.Client) *AwsIamSource
- func (src *AwsIamSource) WithMaxAge(maxAge time.Duration) *AwsIamSource
- func (src *AwsIamSource) WithRoleArn(roleArn string) *AwsIamSource
- func (src *AwsIamSource) WithUserName(userName string) *AwsIamSource
- type DummySource
- type Env
- type Error
- type Kind
- type Source
Constants ¶
View Source
const ( // Keys for the map returned by Read() AwsAccessKeyID string = "accessKeyId" AwsSecretAccessKey string = "secretAccessKey" )
View Source
const ( // Default values DefaultMaxAge time.Duration = 100 * time.Minute )
View Source
const (
Secret string = "secret"
)
Keys for the map returned by Read()
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwsIamSource ¶
type AwsIamSource struct { UserName string `yaml:"username"` RoleArn string `yaml:"role_arn"` ExternalID string `yaml:"external_id"` Client *cziAws.Client `yaml:"client"` MaxAge time.Duration `yaml:"max_age"` }
func NewAwsIamSource ¶
func NewAwsIamSource() *AwsIamSource
func (*AwsIamSource) Kind ¶
func (src *AwsIamSource) Kind() Kind
func (*AwsIamSource) RotateKeys ¶
RotateKeys rotates the AWS IAM keys for the user specified in src. It returns any new key created and any error encountered. If the user has less than two keys, RotateKeys creates a new key. If the user has two keys, RotateKeys checks if the older key is older than the MaxAge specified in src. If so, RotateKeys deletes that key and returns a new key, else it does nothing and returns a nil key.
func (*AwsIamSource) WithAwsClient ¶
func (src *AwsIamSource) WithAwsClient(client *cziAws.Client) *AwsIamSource
func (*AwsIamSource) WithMaxAge ¶
func (src *AwsIamSource) WithMaxAge(maxAge time.Duration) *AwsIamSource
func (*AwsIamSource) WithRoleArn ¶
func (src *AwsIamSource) WithRoleArn(roleArn string) *AwsIamSource
func (*AwsIamSource) WithUserName ¶
func (src *AwsIamSource) WithUserName(userName string) *AwsIamSource
type DummySource ¶
type DummySource struct{}
A DummySource represents a source that generates random data.
func (*DummySource) Kind ¶
func (src *DummySource) Kind() Kind
type Env ¶ added in v0.1.0
type Env struct {
Name string `yaml:"name"`
}
Env is a source that reads an environment variable
Click to show internal directories.
Click to hide internal directories.