Documentation ¶
Index ¶
- Variables
- func Auth() aws.Auth
- func Bucket(connection *s3.S3, bucketName string) *s3.Bucket
- func Connection(auth aws.Auth, region aws.Region) *s3.S3
- func DelFromMyBucket(prefix string, keyname string) error
- func DelFromMyTestBucket(prefix string, keyname string) error
- func List(bucket *s3.Bucket, prefix, delim, marker string, max int) (*s3.ListResp, error)
- func MyBucket() *s3.Bucket
- func MyBucketList(prefix, delim, marker string, max int) (*s3.ListResp, error)
- func MyTestBucket() *s3.Bucket
- func MyTestBucketList(prefix, delim, marker string, max int) (*s3.ListResp, error)
- func PutToMyBucket(prefix string, keyname string, wb *bytes.Buffer, contentType string, ...) error
- func PutToMyPrivateBucket(subdir string, keyname string, wb *bytes.Buffer, contentType string) error
- func PutToMyPrivateTestBucket(subdir string, keyname string, wb *bytes.Buffer, contentType string) error
- func PutToMyPublicBucket(subdir string, keyname string, wb *bytes.Buffer, contentType string) error
- func PutToMyPublicTestBucket(subdir string, keyname string, wb *bytes.Buffer, contentType string) error
- func PutToMyTestBucket(prefix string, keyname string, wb *bytes.Buffer, contentType string, ...) error
- func Region(regionName string) aws.Region
- type CacheCluster
- type CacheNode
- type DescribeCacheClustersResult
- type DescribeReplicationGroupsResult
- type ElastiCache
- type Endpoint
- type Error
- type NodeGroup
- type NodeGroupMember
- type PrimaryEndpoint
- type ReadEndpoint
- type ReplicationGroup
Constants ¶
This section is empty.
Variables ¶
var (
ErrCacheClusterNotFound = errors.New("Cache cluster not found")
)
Functions ¶
func Connection ¶
Connection create connection of S3.
func DelFromMyBucket ¶
DelFromMyBucket delete a file from a bucket.
func DelFromMyTestBucket ¶
DelFromMyTestBucket delete a file from a bucket.
func MyBucketList ¶
MyBucketList get list from MyBucket.
func MyTestBucketList ¶
MyTestBucketList get list from MyBucket.
func PutToMyBucket ¶
func PutToMyBucket(prefix string, keyname string, wb *bytes.Buffer, contentType string, aclType string) error
PutToMyBucket put a file to a bucket.
func PutToMyPrivateBucket ¶
func PutToMyPrivateBucket(subdir string, keyname string, wb *bytes.Buffer, contentType string) error
PutToMyPrivateBucket put a file to the MyBucket.
func PutToMyPrivateTestBucket ¶
func PutToMyPrivateTestBucket(subdir string, keyname string, wb *bytes.Buffer, contentType string) error
PutToMyPrivateTestBucket put a file to the MyBucket.
func PutToMyPublicBucket ¶
PutToMyPublicBucket put a file to the MyBucket.
func PutToMyPublicTestBucket ¶
func PutToMyPublicTestBucket(subdir string, keyname string, wb *bytes.Buffer, contentType string) error
PutToMyPublicTestBucket put a file to the MyBucket.
Types ¶
type CacheCluster ¶
type CacheCluster struct { CacheClusterId string `xml:"CacheCluster>CacheClusterId"` CacheNodes []*CacheNode `xml:"CacheCluster>CacheNodes"` }
CacheCluster represents a cache cluster
type CacheNode ¶
type CacheNode struct {
Endpoint *Endpoint `xml:"CacheNode>Endpoint"`
}
CacheNode represents a cache node
type DescribeCacheClustersResult ¶
type DescribeCacheClustersResult struct {
CacheClusters []*CacheCluster `xml:"DescribeCacheClustersResult>CacheClusters"`
}
DescribeCacheClustersResult represents the response from a DescribeCacheClusters ElastiCache API call
type DescribeReplicationGroupsResult ¶
type DescribeReplicationGroupsResult struct {
ReplicationGroups []ReplicationGroup `xml:"DescribeReplicationGroupsResult>ReplicationGroups"`
}
DescribeReplicationGroupsResult represents the response
type ElastiCache ¶
func NewElasticache ¶
func NewElasticache() *ElastiCache
NewElasticache creates a new ElastiCache instance
func NewElasticacheWithParam ¶
func NewElasticacheWithParam(auth aws.Auth, region aws.Region) *ElastiCache
NewElasticacheWithParam creates a new ElastiCache instance
func (*ElastiCache) DescribeCacheCluster ¶
func (ec *ElastiCache) DescribeCacheCluster(cluster string) (*CacheCluster, error)
DescribeCacheCluster returns information about a cache cluster
func (*ElastiCache) DescribeReplicationGroup ¶
func (ec *ElastiCache) DescribeReplicationGroup(groupName string) (*ReplicationGroup, error)
DescribeReplicationGroup returns information about a cache replication group
type Error ¶
type Error struct { // HTTP status code StatusCode int // AWS error code Code string // The human-oriented error message Message string }
Error encapsulates an error returned by EC.
type NodeGroup ¶
type NodeGroup struct { Status string `xml:"NodeGroup>Status"` PrimaryEndpoint PrimaryEndpoint `xml:"NodeGroup>PrimaryEndpoint"` NodeGroupMembers []*NodeGroupMember `xml:"NodeGroup>NodeGroupMembers>NodeGroupMember"` }
NodeGroup represents a node group
type NodeGroupMember ¶
type NodeGroupMember struct { CurrentRole string `xml:"CurrentRole"` PreferredAvailabilityZone string `xml:"PreferredAvailabilityZone"` CacheNodeId string `xml:"CacheNodeId"` CacheClusterId string `xml:"CacheClusterId"` ReadEndpoint ReadEndpoint `xml:"ReadEndpoint"` }
NodeGroupMember represents an individual node
type PrimaryEndpoint ¶
PrimaryEndpoint represents the primary endpoint
type ReadEndpoint ¶
ReadEndpoint represents a read endpoint
type ReplicationGroup ¶
type ReplicationGroup struct { Status string `xml:"ReplicationGroup>Status"` ReplicationGroupId string `xml:"ReplicationGroup>ReplicationGroupId"` MemberClusters []string `xml:"ReplicationGroup>MemberClusters>ClusterId"` NodeGroups []NodeGroup `xml:"ReplicationGroup>NodeGroups"` }
ReplicationGroup represents a replication group
func (*ReplicationGroup) GetPrimaryNode ¶
func (repGroup *ReplicationGroup) GetPrimaryNode() (*PrimaryEndpoint, error)