Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DOS

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

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

      Cache implements the `goproxy.Cacher`.

      func (*DOS) NewHash

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

        NewHash implements the `goproxy.Cacher`.

        func (*DOS) SetCache

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

          SetCache implements the `goproxy.Cacher`.

          type Disk

          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

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

              Cache implements the `goproxy.Cacher`.

              func (*Disk) NewHash

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

                NewHash implements the `goproxy.Cacher`.

                func (*Disk) SetCache

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

                  SetCache implements the `goproxy.Cacher`.

                  type GCS

                  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

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

                      Cache implements the `goproxy.Cacher`.

                      func (*GCS) NewHash

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

                        NewHash implements the `goproxy.Cacher`.

                        func (*GCS) SetCache

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

                          SetCache implements the `goproxy.Cacher`.

                          type Kodo

                          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

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

                              Cache implements the `goproxy.Cacher`.

                              func (*Kodo) NewHash

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

                                NewHash implements the `goproxy.Cacher`.

                                func (*Kodo) SetCache

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

                                  SetCache implements the `goproxy.Cacher`.

                                  type MABS

                                  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

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

                                      Cache implements the `goproxy.Cacher`.

                                      func (*MABS) NewHash

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

                                        NewHash implements the `goproxy.Cacher`.

                                        func (*MABS) SetCache

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

                                          SetCache implements the `goproxy.Cacher`.

                                          type MinIO

                                          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"`
                                          
                                          	// BucketLocation is the location of the bucket. It is used to avoid
                                          	// bucket location lookup operations.
                                          	BucketLocation string `mapstructure:"bucket_location"`
                                          
                                          	// VirtualHosted indicates whether the MinIO is virtual hosted.
                                          	VirtualHosted bool `mapstructure:"virtual_hosted"`
                                          
                                          	// 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

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

                                              Cache implements the `goproxy.Cacher`.

                                              func (*MinIO) NewHash

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

                                                NewHash implements the `goproxy.Cacher`.

                                                func (*MinIO) SetCache

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

                                                  SetCache implements the `goproxy.Cacher`.

                                                  type OSS

                                                  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

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

                                                      Cache implements the `goproxy.Cacher`.

                                                      func (*OSS) NewHash

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

                                                        NewHash implements the `goproxy.Cacher`.

                                                        func (*OSS) SetCache

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

                                                          SetCache implements the `goproxy.Cacher`.

                                                          type S3

                                                          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

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

                                                              Cache implements the `goproxy.Cacher`.

                                                              func (*S3) NewHash

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

                                                                NewHash implements the `goproxy.Cacher`.

                                                                func (*S3) SetCache

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

                                                                  SetCache implements the `goproxy.Cacher`.