Documentation ¶
Index ¶
- Constants
- Variables
- func AccountID(accessKeyID string, secretAccessKey string, region string) (string, bool, error)
- func CheckErrCode(err error, errorCode string) bool
- func ErrorAuth() error
- func ErrorBucketInaccessible(bucket string) error
- func ErrorInvalidS3Path(provided string) error
- func ErrorInvalidS3aPath(provided string) error
- func ErrorReadCredentials() error
- func GetBucketRegion(bucket string) (string, error)
- func GetCredentialsFromCLIConfigFile() (string, string, error)
- func IsGenericNotFoundErr(err error) bool
- func IsNoSuchBucketErr(err error) bool
- func IsNoSuchKeyErr(err error) bool
- func IsNotFoundErr(err error) bool
- func IsValidS3Path(s3Path string) bool
- func IsValidS3aPath(s3aPath string) bool
- func S3PathJoin(paths ...string) string
- func SplitS3Path(s3Path string) (string, string, error)
- func SplitS3aPath(s3aPath string) (string, string, error)
- type Client
- func (c *Client) DeleteFromS3ByPrefix(prefix string, continueIfFailure bool) error
- func (c *Client) ExractS3PathPrefixes(s3Paths ...string) ([]string, error)
- func (c *Client) IsS3Dir(dirPaths ...string) (bool, error)
- func (c *Client) IsS3File(keys ...string) (bool, error)
- func (c *Client) IsS3PathDir(s3Paths ...string) (bool, error)
- func (c *Client) IsS3PathFile(s3Paths ...string) (bool, error)
- func (c *Client) IsS3PathPrefix(s3Paths ...string) (bool, error)
- func (c *Client) IsS3Prefix(prefixes ...string) (bool, error)
- func (c *Client) ListPrefix(prefix string, maxResults int64) ([]*s3.Object, error)
- func (c *Client) ReadBytesFromS3(key string) ([]byte, error)
- func (c *Client) ReadJSONFromS3(objPtr interface{}, key string) error
- func (c *Client) ReadMsgpackFromS3(objPtr interface{}, key string) error
- func (c *Client) ReadStringFromS3(key string) (string, error)
- func (c *Client) S3Path(key string) string
- func (c *Client) UploadBufferToS3(buffer *bytes.Buffer, key string) error
- func (c *Client) UploadBytesToS3(data []byte, key string) error
- func (c *Client) UploadBytesesToS3(data []byte, keys ...string) error
- func (c *Client) UploadFileToS3(filePath string, key string) error
- func (c *Client) UploadJSONToS3(obj interface{}, key string) error
- func (c *Client) UploadMsgpackToS3(obj interface{}, key string) error
- func (c *Client) UploadStringToS3(str string, key string) error
- type Error
- type ErrorKind
Constants ¶
View Source
const DefaultS3Region string = endpoints.UsWest2RegionID
Variables ¶
View Source
var S3Regions strset.Set
Functions ¶
func AccountID ¶ added in v0.10.0
Returns account ID, whether the credentials were valid, any other error that occured
func CheckErrCode ¶ added in v0.8.0
func ErrorBucketInaccessible ¶ added in v0.8.0
func ErrorInvalidS3Path ¶
func ErrorInvalidS3aPath ¶
func ErrorReadCredentials ¶ added in v0.10.0
func ErrorReadCredentials() error
func GetBucketRegion ¶ added in v0.5.0
func GetCredentialsFromCLIConfigFile ¶ added in v0.10.0
func IsGenericNotFoundErr ¶ added in v0.9.0
func IsNoSuchBucketErr ¶ added in v0.9.0
func IsNoSuchKeyErr ¶
func IsNotFoundErr ¶
func IsValidS3Path ¶
func IsValidS3aPath ¶
func S3PathJoin ¶ added in v0.8.0
Types ¶
type Client ¶
type Client struct { Region string Bucket string S3 *s3.S3 CloudWatchLogsClient *cloudwatchlogs.CloudWatchLogs CloudWatchMetrics *cloudwatch.CloudWatch AccountID string HashedAccountID string // contains filtered or unexported fields }
func NewFromS3Path ¶ added in v0.8.0
func (*Client) DeleteFromS3ByPrefix ¶
func (*Client) ExractS3PathPrefixes ¶ added in v0.8.0
func (*Client) IsS3PathDir ¶ added in v0.8.0
func (*Client) IsS3PathFile ¶ added in v0.8.0
func (*Client) IsS3PathPrefix ¶ added in v0.8.0
func (*Client) ListPrefix ¶ added in v0.8.0
func (*Client) ReadJSONFromS3 ¶
func (*Client) ReadMsgpackFromS3 ¶
func (*Client) UploadBufferToS3 ¶
func (*Client) UploadBytesesToS3 ¶
func (*Client) UploadJSONToS3 ¶
func (*Client) UploadMsgpackToS3 ¶
type ErrorKind ¶
type ErrorKind int
func (ErrorKind) MarshalBinary ¶
MarshalBinary satisfies BinaryMarshaler
func (ErrorKind) MarshalText ¶
MarshalText satisfies TextMarshaler
func (*ErrorKind) UnmarshalBinary ¶
UnmarshalBinary satisfies BinaryUnmarshaler Needed for msgpack
func (*ErrorKind) UnmarshalText ¶
UnmarshalText satisfies TextUnmarshaler
Click to show internal directories.
Click to hide internal directories.