goproxy: github.com/goproxy/goproxy/cacher Index | Files

package cacher

import "github.com/goproxy/goproxy/cacher"

Index

Package Files

disk.go dos.go gcs.go kodo.go mabs.go minio.go oss.go s3.go

type DOS Uses

type DOS struct {
    // Endpoint is the endpoint of the DigitalOcean Spaces.
    //
    // If the `Endpoint` is empty, the "https://nyc3.digitaloceanspaces.com"
    // is used.
    Endpoint string `mapstructure:"endpoint"`

    // AccessKey is the access key of the DigitalOcean.
    AccessKey string `mapstructure:"access_key"`

    // SecretKey is the secret key of the DigitalOcean.
    SecretKey string `mapstructure:"secret_key"`

    // SpaceName is the name of the space.
    SpaceName string `mapstructure:"space_name"`

    // Root is the root of the caches.
    Root string `mapstructure:"root"`
    // contains filtered or unexported fields
}

DOS implements the `goproxy.Cacher` by using the DigitalOcean Spaces.

func (*DOS) Cache Uses

func (d *DOS) Cache(ctx context.Context, name string) (goproxy.Cache, error)

Cache implements the `goproxy.Cacher`.

func (*DOS) NewHash Uses

func (d *DOS) NewHash() hash.Hash

NewHash implements the `goproxy.Cacher`.

func (*DOS) SetCache Uses

func (d *DOS) SetCache(ctx context.Context, c goproxy.Cache) error

SetCache implements the `goproxy.Cacher`.

type Disk Uses

type Disk struct {
    // Root is the root of the caches.
    Root string `mapstructure:"root"`
}

Disk implements the `goproxy.Cacher` by using the disk.

func (*Disk) Cache Uses

func (d *Disk) Cache(ctx context.Context, name string) (goproxy.Cache, error)

Cache implements the `goproxy.Cacher`.

func (*Disk) NewHash Uses

func (d *Disk) NewHash() hash.Hash

NewHash implements the `goproxy.Cacher`.

func (*Disk) SetCache Uses

func (d *Disk) SetCache(ctx context.Context, c goproxy.Cache) error

SetCache implements the `goproxy.Cacher`.

type GCS Uses

type GCS struct {
    // Endpoint is the endpoint of the Google Cloud Storage.
    //
    // If the `Endpoint` is empty, the "https://storage.googleapis.com" is
    // used.
    Endpoint string `mapstructure:"endpoint"`

    // AccessKey is the access key of the Google Cloud Platform.
    AccessKey string `mapstructure:"access_key"`

    // SecretKey is the secret key of the Google Cloud Platform.
    SecretKey string `mapstructure:"secret_key"`

    // BucketName is the name of the bucket.
    BucketName string `mapstructure:"bucket_name"`

    // Root is the root of the caches.
    Root string `mapstructure:"root"`
    // contains filtered or unexported fields
}

GCS implements the `goproxy.Cacher` by using the Google Cloud Storage.

func (*GCS) Cache Uses

func (g *GCS) Cache(ctx context.Context, name string) (goproxy.Cache, error)

Cache implements the `goproxy.Cacher`.

func (*GCS) NewHash Uses

func (g *GCS) NewHash() hash.Hash

NewHash implements the `goproxy.Cacher`.

func (*GCS) SetCache Uses

func (g *GCS) SetCache(ctx context.Context, c goproxy.Cache) error

SetCache implements the `goproxy.Cacher`.

type Kodo Uses

type Kodo struct {
    // Endpoint is the endpoint of the Qiniu Cloud Kodo.
    //
    // If the `Endpoint` is empty, the "https://s3-cn-east-1.qiniucs.com" is
    // used.
    Endpoint string `mapstructure:"endpoint"`

    // AccessKey is the access key of the Qiniu Cloud.
    AccessKey string `mapstructure:"access_key"`

    // SecretKey is the secret key of the Qiniu Cloud.
    SecretKey string `mapstructure:"secret_key"`

    // BucketName is the name of the bucket.
    BucketName string `mapstructure:"bucket_name"`

    // Root is the root of the caches.
    Root string `mapstructure:"root"`
    // contains filtered or unexported fields
}

Kodo implements the `goproxy.Cacher` by using the Qiniu Cloud Kodo.

func (*Kodo) Cache Uses

func (k *Kodo) Cache(ctx context.Context, name string) (goproxy.Cache, error)

Cache implements the `goproxy.Cacher`.

func (*Kodo) NewHash Uses

func (k *Kodo) NewHash() hash.Hash

NewHash implements the `goproxy.Cacher`.

func (*Kodo) SetCache Uses

func (k *Kodo) SetCache(ctx context.Context, c goproxy.Cache) error

SetCache implements the `goproxy.Cacher`.

type MABS Uses

type MABS struct {
    // Endpoint is the endpoint of the Microsoft Azure Blob Storage.
    //
    // If the `Endpoint` is empty, the
    // "https://<AccountName>.blob.core.windows.net" is used.
    Endpoint string `mapstructure:"endpoint"`

    // AccountName is the account name of the Microsoft Azure.
    AccountName string `mapstructure:"account_name"`

    // AccountKey is the account key of the Microsoft Azure.
    AccountKey string `mapstructure:"account_key"`

    // ContainerNameis the name of the container.
    ContainerName string `mapstructure:"bucket_container"`

    // Root is the root of the caches.
    Root string `mapstructure:"root"`
    // contains filtered or unexported fields
}

MABS implements the `goproxy.Cacher` by using the Microsoft Azure Blob Storage.

func (*MABS) Cache Uses

func (m *MABS) Cache(ctx context.Context, name string) (goproxy.Cache, error)

Cache implements the `goproxy.Cacher`.

func (*MABS) NewHash Uses

func (m *MABS) NewHash() hash.Hash

NewHash implements the `goproxy.Cacher`.

func (*MABS) SetCache Uses

func (m *MABS) SetCache(ctx context.Context, c goproxy.Cache) error

SetCache implements the `goproxy.Cacher`.

type MinIO Uses

type MinIO struct {
    // Endpoint is the endpoint of the MinIO.
    Endpoint string `mapstructure:"endpoint"`

    // AccessKeyID is the access key ID of the MinIO.
    AccessKeyID string `mapstructure:"access_key_id"`

    // SecretAccessKey is the secret access key of the MinIO.
    SecretAccessKey string `mapstructure:"secret_access_key"`

    // BucketName is the name of the bucket.
    BucketName string `mapstructure:"bucket_name"`

    // Root is the root of the caches.
    Root string `mapstructure:"root"`
    // contains filtered or unexported fields
}

MinIO implements the `goproxy.Cacher` by using the MinIO.

func (*MinIO) Cache Uses

func (m *MinIO) Cache(ctx context.Context, name string) (goproxy.Cache, error)

Cache implements the `goproxy.Cacher`.

func (*MinIO) NewHash Uses

func (m *MinIO) NewHash() hash.Hash

NewHash implements the `goproxy.Cacher`.

func (*MinIO) SetCache Uses

func (m *MinIO) SetCache(ctx context.Context, c goproxy.Cache) error

SetCache implements the `goproxy.Cacher`.

type OSS Uses

type OSS struct {
    // Endpoint is the endpoint of the Alibaba Cloud Object Storage Service.
    //
    // If the `Endpoint` is empty,
    // the "https://oss-cn-hangzhou.aliyuncs.com" is used.
    Endpoint string `mapstructure:"endpoint"`

    // AccessKeyID is the access key ID of the Alibaba Cloud.
    AccessKeyID string `mapstructure:"access_key_id"`

    // AccessKeySecret is the access key secret of the Alibaba Cloud.
    AccessKeySecret string `mapstructure:"access_key_secret"`

    // BucketName is the name of the bucket.
    BucketName string `mapstructure:"bucket_name"`

    // Root is the root of the caches.
    Root string `mapstructure:"root"`
    // contains filtered or unexported fields
}

OSS implements the `goproxy.Cacher` by using the Alibaba Cloud Object Storage Service.

func (*OSS) Cache Uses

func (o *OSS) Cache(ctx context.Context, name string) (goproxy.Cache, error)

Cache implements the `goproxy.Cacher`.

func (*OSS) NewHash Uses

func (o *OSS) NewHash() hash.Hash

NewHash implements the `goproxy.Cacher`.

func (*OSS) SetCache Uses

func (o *OSS) SetCache(ctx context.Context, c goproxy.Cache) error

SetCache implements the `goproxy.Cacher`.

type S3 Uses

type S3 struct {
    // Endpoint is the endpoint of the Amazon Simple Storage Service.
    //
    // If the `Endpoint` is empty, the "https://s3.amazonaws.com" is used.
    Endpoint string `mapstructure:"endpoint"`

    // AccessKeyID is the access key ID of the Amazon Web Services.
    AccessKeyID string `mapstructure:"access_key_id"`

    // SecretAccessKey is the secret access key of the Amazon Web Services.
    SecretAccessKey string `mapstructure:"secret_access_key"`

    // BucketName is the name of the bucket.
    BucketName string `mapstructure:"bucket_name"`

    // Root is the root of the caches.
    Root string `mapstructure:"root"`
    // contains filtered or unexported fields
}

S3 implements the `goproxy.Cacher` by using the Amazon Simple Storage Service.

func (*S3) Cache Uses

func (s *S3) Cache(ctx context.Context, name string) (goproxy.Cache, error)

Cache implements the `goproxy.Cacher`.

func (*S3) NewHash Uses

func (s *S3) NewHash() hash.Hash

NewHash implements the `goproxy.Cacher`.

func (*S3) SetCache Uses

func (s *S3) SetCache(ctx context.Context, c goproxy.Cache) error

SetCache implements the `goproxy.Cacher`.

Package cacher imports 18 packages (graph) and is imported by 1 packages. Updated 2019-08-11. Refresh now. Tools for package owners.