Documentation ¶
Overview ¶
Package option define storage options
Index ¶
- Constants
- func Append(options []storage.Option, newOptions ...storage.Option) []storage.Option
- func Assign(options []storage.Option, supported ...interface{}) ([]storage.Option, bool)
- func DefaultMatch(parent string, info os.FileInfo) bool
- func GetListOptions(options []storage.Option) (Match, *Page)
- func GetWalkOptions(options []storage.Option) (Match, Modifier)
- type AES256Key
- type Auth
- type BasicAuth
- type Crc
- type Dest
- type Empty
- type Error
- type Errors
- type Generation
- type HTTPMethod
- type Location
- type Match
- type Matcher
- type Md5
- type Modifier
- type NoCache
- type ObjectKind
- type OsFlag
- type Override
- type Page
- type PreSign
- type Proxy
- type Recursive
- type Region
- type ServerSideEncryption
- type Size
- type SkipChecksum
- type Source
- type Status
- type Stream
- type Timeout
Constants ¶
const ( //ErrorTypeDownload download error type ErrorTypeDownload = "download" //ErrorTypeUpload upload error type ErrorTypeUpload = "upload" //ErrorTypeReader reader error type ErrorTypeReader = "reader" )
const ( //NoCacheBaseURL no cache base URL NoCacheBaseURL = iota + 1 )
Variables ¶
This section is empty.
Functions ¶
func Assign ¶
Assign assign supplied option, if returns un assign options and true if assign at least one
func GetListOptions ¶ added in v0.2.0
GetListOptions returns list options
Types ¶
type AES256Key ¶
type AES256Key struct { Key []byte Base64Key string Base64KeyMd5Hash string Base64KeySha256Hash string }
AES256Key represents custom key
func NewAES256Key ¶
NewAES256Key returns new key
func NewBase64AES256Key ¶
NewBase64AES256Key create a AES256Key from base64 encoded key
type Auth ¶ added in v0.6.1
type Auth struct {
Force bool
}
Auth auth options to force auth, instead of reusing previous auth session
type BasicAuth ¶
type BasicAuth interface {
Credentials() (user, password string)
}
BasicAuth represents a basic auth
func NewBasicAuth ¶
NewBasicAuth returns credential authenticator
type Empty ¶ added in v1.7.0
type Empty struct {
Allowed bool
}
Empty represents empty pipeline writer option
type Error ¶
Error represents a simulation error
func NewDownloadError ¶
NewDownloadError creates a download error
type Generation ¶ added in v0.8.0
Generation represent generation option
func NewGeneration ¶ added in v0.8.0
func NewGeneration(whenMatch bool, generation int64) *Generation
NewGeneration create a generation
type Location ¶
type Location struct {
Path string
}
Location represents a location
func NewLocation ¶
NewLocation create a location with supplied path
type Match ¶ added in v0.2.0
Match represents a matching function
func GetMatchFunc ¶ added in v0.2.0
GetMatchFunc returns supplied matcher or default matcher
type Modifier ¶
type Modifier func(info os.FileInfo, reader io.ReadCloser) (os.FileInfo, io.ReadCloser, error)
Modifier option to modify content,
type ObjectKind ¶ added in v0.10.0
type ObjectKind struct {
File bool
}
ObjectKind represents an option to indicate operation object kind
func NewObjectKind ¶ added in v0.10.0
func NewObjectKind(file bool) *ObjectKind
NewObject creates a new object
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
Page represents a page
func (*Page) HasReachedLimit ¶
HasReachedLimit returns true if limit has been reaced
type PreSign ¶ added in v0.15.0
TimeToLive represents presign URL
func NewPreSign ¶ added in v0.15.0
NewPreSign creates a presign option
type Proxy ¶ added in v0.12.0
type Proxy struct { //URL proxy //URL URL string //TimeoutMs connection timeout TimeoutMs int //Fallback if proxy fails retry without proxy Fallback bool }
Proxy represents http proxy
type Recursive ¶ added in v0.3.0
type Recursive struct {
Flag bool
}
Recursive represents recursive option
func NewRecursive ¶ added in v0.3.0
NewRecursive returns a recursive option
type Region ¶ added in v0.17.0
type Region struct {
Name string
}
Region represents cloud region/location option
type ServerSideEncryption ¶ added in v0.17.0
type ServerSideEncryption struct {
Algorithm string
}
ServerSideEncryption represents server side encryption
func NewServerSideEncryption ¶ added in v0.17.0
func NewServerSideEncryption(alg string) *ServerSideEncryption
NewServerSideEncryption creates a server side encryption
type SkipChecksum ¶ added in v0.7.0
type SkipChecksum struct {
Skip bool
}
SkipChecksum represents checksum option
func NewSkipChecksum ¶ added in v0.7.0
func NewSkipChecksum(skip bool) *SkipChecksum
NewSkipChecksum returns checksum options for supplied skip flag
Source Files ¶
- append.go
- assign.go
- auth.go
- checksum.go
- crc.go
- cred.go
- dest.go
- doc.go
- empty.go
- encryption.go
- error.go
- generation.go
- key.go
- list.go
- location.go
- matcher.go
- md5.go
- method.go
- modifier.go
- nocache.go
- object.go
- osflag.go
- override.go
- page.go
- presign.go
- proxy.go
- recursive.go
- region.go
- size.go
- source.go
- status.go
- stream.go
- timeout.go
- walk.go