2013-07-16 00:08:19 -04:00
|
|
|
package common
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/mitchellh/goamz/aws"
|
|
|
|
)
|
|
|
|
|
|
|
|
// AccessConfig is for common configuration related to AWS access
|
|
|
|
type AccessConfig struct {
|
|
|
|
AccessKey string `mapstructure:"access_key"`
|
|
|
|
SecretKey string `mapstructure:"secret_key"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// Auth returns a valid aws.Auth object for access to AWS services, or
|
|
|
|
// an error if the authentication couldn't be resolved.
|
|
|
|
func (c *AccessConfig) Auth() (aws.Auth, error) {
|
|
|
|
return aws.GetAuth(c.AccessKey, c.SecretKey)
|
|
|
|
}
|
|
|
|
|
2013-07-16 00:23:40 -04:00
|
|
|
func (c *AccessConfig) Prepare() []error {
|
2013-07-16 00:08:19 -04:00
|
|
|
return nil
|
|
|
|
}
|