Documentation ¶
Overview ¶
Package pairs intend to provide all available pairs.
Code generated by go generate internal/cmd; DO NOT EDIT.
Index ¶
- Constants
- Variables
- func Parse(m map[string]interface{}) ([]*types.Pair, error)
- func WithChecksum(v string) *types.Pair
- func WithContext(v context.Context) *types.Pair
- func WithCredential(v *credential.Provider) *types.Pair
- func WithDirFunc(v types.ObjectFunc) *types.Pair
- func WithEndpoint(v endpoint.Provider) *types.Pair
- func WithExpire(v int) *types.Pair
- func WithFileFunc(v types.ObjectFunc) *types.Pair
- func WithHTTPClientOptions(v *httpclient.Options) *types.Pair
- func WithIndex(v int) *types.Pair
- func WithLocation(v string) *types.Pair
- func WithName(v string) *types.Pair
- func WithObjectFunc(v types.ObjectFunc) *types.Pair
- func WithOffset(v int64) *types.Pair
- func WithProject(v string) *types.Pair
- func WithReadCallbackFunc(v func([]byte)) *types.Pair
- func WithSegmentFunc(v segment.Func) *types.Pair
- func WithSize(v int64) *types.Pair
- func WithStoragerFunc(v storage.StoragerFunc) *types.Pair
- func WithWorkDir(v string) *types.Pair
- type Error
Constants ¶
const ( // Checksum will // Checksum specify checksum for this request, could be used as content md5 or etag Checksum = "checksum" // Context will // Context context in all request Context = "context" // Credential will // Credential specify how to provide credential for service or storage Credential = "credential" // DirFunc will // DirFunc specify what todo with a dir object DirFunc = "dir_func" // Endpoint will // Endpoint specify how to provide endpoint for service or storage Endpoint = "endpoint" // Expire will // Expire specify when the url returned by reach will expire Expire = "expire" // FileFunc will // FileFunc specify what todo with a file object FileFunc = "file_func" // HTTPClientOptions will // HTTPClientOptions sepcify the options for the http client HTTPClientOptions = "http_client_options" // Index will // Index specify the index of this segment Index = "index" // Location will // Location specify the location for service or storage Location = "location" // Name will // Name specify the storage name Name = "name" // ObjectFunc will // ObjectFunc specify what todo with an object ObjectFunc = "object_func" // Offset will // Offset specify offset for this request, storage will seek to this offset before read Offset = "offset" // Project will // Project specify project name/id for this service or storage Project = "project" // ReadCallbackFunc will // ReadCallbackFunc specify what todo every time we read data from source ReadCallbackFunc = "read_callback_func" // SegmentFunc will // SegmentFunc specify what todo with a segment SegmentFunc = "segment_func" // Size will // Size specify size for this request, storage will only read limited content data Size = "size" // StoragerFunc will // StoragerFunc specify what todo with a storager StoragerFunc = "storager_func" // WorkDir will // WorkDir specify the work dir for service or storage, every operation will be relative to this dir. work_dir MUST start with / for every storage services. work_dir will be default to / if not set. // For fs storage service on windows platform, the behavior is undefined. WorkDir = "work_dir" )
All available pairs.
Variables ¶
var ( // ErrPairTypeMismatch means the pair's type is not match ErrPairTypeMismatch = errors.New("pair type mismatch") )
Functions ¶
func WithChecksum ¶
WithChecksum will apply checksum value to Options This pair is used to // Checksum specify checksum for this request, could be used as content md5 or etag
func WithContext ¶ added in v0.6.0
WithContext will apply context value to Options This pair is used to // Context context in all request
func WithCredential ¶
func WithCredential(v *credential.Provider) *types.Pair
WithCredential will apply credential value to Options This pair is used to // Credential specify how to provide credential for service or storage
func WithDirFunc ¶
func WithDirFunc(v types.ObjectFunc) *types.Pair
WithDirFunc will apply dir_func value to Options This pair is used to // DirFunc specify what todo with a dir object
func WithEndpoint ¶
WithEndpoint will apply endpoint value to Options This pair is used to // Endpoint specify how to provide endpoint for service or storage
func WithExpire ¶
WithExpire will apply expire value to Options This pair is used to // Expire specify when the url returned by reach will expire
func WithFileFunc ¶
func WithFileFunc(v types.ObjectFunc) *types.Pair
WithFileFunc will apply file_func value to Options This pair is used to // FileFunc specify what todo with a file object
func WithHTTPClientOptions ¶ added in v1.1.0
func WithHTTPClientOptions(v *httpclient.Options) *types.Pair
WithHTTPClientOptions will apply http_client_options value to Options This pair is used to // HTTPClientOptions sepcify the options for the http client
func WithIndex ¶ added in v0.9.0
WithIndex will apply index value to Options This pair is used to // Index specify the index of this segment
func WithLocation ¶
WithLocation will apply location value to Options This pair is used to // Location specify the location for service or storage
func WithName ¶
WithName will apply name value to Options This pair is used to // Name specify the storage name
func WithObjectFunc ¶ added in v0.7.2
func WithObjectFunc(v types.ObjectFunc) *types.Pair
WithObjectFunc will apply object_func value to Options This pair is used to // ObjectFunc specify what todo with an object
func WithOffset ¶
WithOffset will apply offset value to Options This pair is used to // Offset specify offset for this request, storage will seek to this offset before read
func WithProject ¶ added in v0.5.0
WithProject will apply project value to Options This pair is used to // Project specify project name/id for this service or storage
func WithReadCallbackFunc ¶ added in v0.7.0
WithReadCallbackFunc will apply read_callback_func value to Options This pair is used to // ReadCallbackFunc specify what todo every time we read data from source
func WithSegmentFunc ¶
WithSegmentFunc will apply segment_func value to Options This pair is used to // SegmentFunc specify what todo with a segment
func WithSize ¶
WithSize will apply size value to Options This pair is used to // Size specify size for this request, storage will only read limited content data
func WithStoragerFunc ¶
func WithStoragerFunc(v storage.StoragerFunc) *types.Pair
WithStoragerFunc will apply storager_func value to Options This pair is used to // StoragerFunc specify what todo with a storager
func WithWorkDir ¶
WithWorkDir will apply work_dir value to Options This pair is used to // WorkDir specify the work dir for service or storage, every operation will be relative to this dir. work_dir MUST start with / for every storage services. work_dir will be default to / if not set.
For fs storage service on windows platform, the behavior is undefined.