Documentation ¶
Index ¶
- Constants
- type AzureStorage
- func (s *AzureStorage) MakeDirector(extractKey func(r *http.Request) string, expire time.Duration) func(r *http.Request)
- func (s *AzureStorage) PresignGetObject(ctx context.Context, name string, expire time.Duration) (*url.URL, error)
- func (s *AzureStorage) PresignHeadObject(ctx context.Context, name string, expire time.Duration) (*url.URL, error)
- func (s *AzureStorage) PresignPutObject(ctx context.Context, name string, header http.Header) (*http.Request, error)
- func (s *AzureStorage) SignedURL(name string, now time.Time, duration time.Duration, ...) (*url.URL, error)
- type GCSStorage
- func (s *GCSStorage) MakeDirector(extractKey func(r *http.Request) string, expire time.Duration) func(r *http.Request)
- func (s *GCSStorage) PresignGetObject(ctx context.Context, name string, expire time.Duration) (*url.URL, error)
- func (s *GCSStorage) PresignGetOrHeadObject(ctx context.Context, name string, method string, expire time.Duration) (*url.URL, error)
- func (s *GCSStorage) PresignHeadObject(ctx context.Context, name string, expire time.Duration) (*url.URL, error)
- func (s *GCSStorage) PresignPutObject(ctx context.Context, name string, header http.Header) (*http.Request, error)
- type MinIOStorage
- func (s *MinIOStorage) MakeDirector(extractKey func(r *http.Request) string, expire time.Duration) func(r *http.Request)
- func (s *MinIOStorage) PresignGetObject(ctx context.Context, name string, expire time.Duration) (*url.URL, error)
- func (s *MinIOStorage) PresignHeadObject(ctx context.Context, name string, expire time.Duration) (*url.URL, error)
- func (s *MinIOStorage) PresignPutObject(ctx context.Context, name string, header http.Header) (*http.Request, error)
- type S3Storage
- func (s *S3Storage) MakeDirector(extractKey func(r *http.Request) string, expire time.Duration) func(r *http.Request)
- func (s *S3Storage) PresignGetObject(ctx context.Context, name string, expire time.Duration) (*url.URL, error)
- func (s *S3Storage) PresignHeadObject(ctx context.Context, name string, expire time.Duration) (*url.URL, error)
- func (s *S3Storage) PresignPutObject(ctx context.Context, name string, header http.Header) (*http.Request, error)
Constants ¶
View Source
const PresignPutExpires time.Duration = 15 * duration.PerMinute
PresignPutExpires is how long the presign PUT request remains valid.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureStorage ¶
type AzureStorage struct { ServiceURL string StorageAccount string Container string AccessKey string Clock clock.Clock }
func NewAzureStorage ¶
func (*AzureStorage) MakeDirector ¶
func (*AzureStorage) PresignGetObject ¶
func (*AzureStorage) PresignHeadObject ¶
func (*AzureStorage) PresignPutObject ¶
type GCSStorage ¶
type GCSStorage struct { ServiceAccount string Bucket string CredentialsJSON []byte Clock clock.Clock }
func NewGCSStorage ¶
func (*GCSStorage) MakeDirector ¶
func (*GCSStorage) PresignGetObject ¶
func (*GCSStorage) PresignGetOrHeadObject ¶
func (*GCSStorage) PresignHeadObject ¶
type MinIOStorage ¶
type MinIOStorage struct { Endpoint string AccessKeyID string SecretAccessKey string Bucket string // contains filtered or unexported fields }
func NewMinIOStorage ¶
func NewMinIOStorage(endpoint string, bucketName string, accessKeyID string, secretAccessKey string) (*MinIOStorage, error)
MinIOStorage takes endpoint, accessKeyID, and secretAccessKey to construct a minio.Client under the hood. Contradictory to minio.Client, endpoint MUST BE a http URL or https URL.
func (*MinIOStorage) MakeDirector ¶
func (*MinIOStorage) PresignGetObject ¶
func (*MinIOStorage) PresignHeadObject ¶
type S3Storage ¶
type S3Storage struct { Bucket string Region string AccessKeyID string SecretAccessKey string // contains filtered or unexported fields }
func NewS3Storage ¶
func (*S3Storage) MakeDirector ¶
func (*S3Storage) PresignGetObject ¶
func (*S3Storage) PresignHeadObject ¶
Click to show internal directories.
Click to hide internal directories.