Documentation
¶
Index ¶
Constants ¶
View Source
const ( // required ConfigKeyBucket = "bucket" // optional ConfigKeyBasepath = "basepath" ConfigKeyMaxZoom = "max_zoom" ConfigKeyRegion = "region" // defaults to "us-east-1" ConfigKeyAWSAccessKeyID = "aws_access_key_id" ConfigKeyAWSSecretKey = "aws_secret_access_key" )
View Source
const CacheType = "s3"
View Source
const (
DefaultRegion = "us-east-1"
)
Variables ¶
View Source
var (
ErrMissingBucket = errors.New("s3cache: missing required param 'bucket'")
)
Functions ¶
Types ¶
type Cache ¶
type Cache struct { // Bucket is the name of the s3 bucket to operate on Bucket string // Basepath is a path prefix added to all cache operations inside of the S3 bucket // helpful so a bucket does not need to be dedicated to only this cache Basepath string // MaxZoom determins the max zoom the cache to persist. Beyond this // zoom, cache Set() calls will be ignored. This is useful if the cache // should not be leveraged for higher zooms when data changes often. MaxZoom *uint // client holds a reference to the s3 client. it's expected the client // has an active session and read, write, delete permissions have been checked Client *s3.S3 }
Click to show internal directories.
Click to hide internal directories.