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 Checksum
- type Crc
- type Dest
- type Error
- type Errors
- type Location
- type Match
- type Matcher
- type Md5
- type Modifier
- type NoCache
- type Override
- type Page
- type Recursive
- type Source
- 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 Checksum ¶ added in v0.6.0
type Checksum struct {
Skip bool
}
Checksum represents checksum option
func NewChecksum ¶ added in v0.6.0
NewChecksum returns checksum options for supplied skip flag
type Error ¶
Error represents a simulation error
func NewDownloadError ¶
NewDownloadError creates a download error
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 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 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