Documentation ¶
Index ¶
- func LoadDynamoDB(ctx context.Context, source settings.Source, c *DynamoDBComponent) (*dynamodb.DynamoDB, error)
- func LoadS3(ctx context.Context, source settings.Source, c *S3Component) (*s3.S3, error)
- func LoadSession(ctx context.Context, source settings.Source, c *SessionComponent) (*session.Session, error)
- func NewDynamoDB(ctx context.Context, source settings.Source) (*dynamodb.DynamoDB, error)
- func NewS3(ctx context.Context, source settings.Source) (*s3.S3, error)
- func NewSession(ctx context.Context, source settings.Source) (*session.Session, error)
- type AssumeRoleCredentialConfig
- type DynamoDBComponent
- type DynamoDBConfig
- type S3Component
- type S3Config
- type SessionComponent
- type SessionConfig
- type SharedCredentialConfig
- type StaticCredentialConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadDynamoDB ¶
func LoadDynamoDB(ctx context.Context, source settings.Source, c *DynamoDBComponent) (*dynamodb.DynamoDB, error)
LoadDynamoDB is a convenience method for binding the source to the component.
func LoadSession ¶
func LoadSession(ctx context.Context, source settings.Source, c *SessionComponent) (*session.Session, error)
LoadSession is a convenience method for binding the source to the component.
func NewDynamoDB ¶
NewDynamoDB is the top-level entry point for creating a DynamoDB client.
Types ¶
type AssumeRoleCredentialConfig ¶
type AssumeRoleCredentialConfig struct { Role string `description:"The ARN of the role to assume."` ExternalID string `description:"External ID to use if using a cross-acount role."` }
AssumeRoleCredentialConfig contains settings for assuming a role.
func (*AssumeRoleCredentialConfig) Name ¶
func (*AssumeRoleCredentialConfig) Name() string
Name of the configuration root.
type DynamoDBComponent ¶
type DynamoDBComponent struct {
Session *SessionComponent
}
DynamoDBComponent is used to create a new DynamoDB client.
func NewDynamoDBComponent ¶
func NewDynamoDBComponent() *DynamoDBComponent
NewDynamoDBComponent generates a default component.
func (*DynamoDBComponent) New ¶
func (c *DynamoDBComponent) New(ctx context.Context, conf *DynamoDBConfig) (*dynamodb.DynamoDB, error)
New constructs a DynamoDB client.
func (*DynamoDBComponent) Settings ¶
func (c *DynamoDBComponent) Settings() *DynamoDBConfig
Settings generates the default settings for the component.
type DynamoDBConfig ¶
type DynamoDBConfig struct {
Session *SessionConfig
}
DynamoDBConfig contains the settings for a DynamoDB client.
type S3Component ¶
type S3Component struct {
Session *SessionComponent
}
S3Component is used to create a new S3 client.
func NewS3Component ¶
func NewS3Component() *S3Component
NewS3Component generates a default component.
func (*S3Component) Settings ¶
func (c *S3Component) Settings() *S3Config
Settings generates the default settings for the component.
type S3Config ¶
type S3Config struct {
Session *SessionConfig
}
S3Config contains the settings for a S3 client.
type SessionComponent ¶
type SessionComponent struct{}
SessionComponent implements the Component interface and produces an AWS session object.
func NewSessionComponent ¶
func NewSessionComponent() *SessionComponent
NewSessionComponent constructs a default SessionComponent.
func (*SessionComponent) New ¶
func (*SessionComponent) New(ctx context.Context, conf *SessionConfig) (*session.Session, error)
New generates a session for use with any AWS client.
func (*SessionComponent) Settings ¶
func (*SessionComponent) Settings() *SessionConfig
Settings generates the default configuration.
type SessionConfig ¶
type SessionConfig struct { Region string `description:"The AWS region in which to authenticate."` Endpoint string `description:"Override the default AWS URL."` StaticCredentialConfig *StaticCredentialConfig AssumeRoleCredentialConfig *AssumeRoleCredentialConfig }
SessionConfig contains settings for establishing an authenticated AWS session.
type SharedCredentialConfig ¶
type SharedCredentialConfig struct {}
SharedCredentialConfig contains settings for using the AWS shared profile configuration file to authenticate.
func (*SharedCredentialConfig) Name ¶
func (*SharedCredentialConfig) Name() string
Name of the configuration root.
type StaticCredentialConfig ¶
type StaticCredentialConfig struct { ID string `description:"The access key ID."` Secret string `descriptin:"The secret key."` Token string `description:"Optional access token."` }
StaticCredentialConfig contains settings for using a fixed set of credentials to authenticate.
func (*StaticCredentialConfig) Name ¶
func (*StaticCredentialConfig) Name() string
Name of the configuration root.