pairs

package
v5.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 6 Imported by: 28

Documentation

Overview

Package pairs intend to provide all available pairs.

Code generated by go generate cmd/definitions; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrPairTypeMismatch means the pair's type is not match
	ErrPairTypeMismatch = errors.New("pair type mismatch")
)

Functions

func WithContentMd5

func WithContentMd5(v string) (p Pair)

WithContentMd5 will apply content_md5 value to Options.

ContentMd5

func WithContentType

func WithContentType(v string) (p Pair)

WithContentType will apply content_type value to Options.

ContentType

func WithContext

func WithContext(v context.Context) (p Pair)

WithContext will apply context value to Options.

Context

func WithContinuationToken

func WithContinuationToken(v string) (p Pair)

WithContinuationToken will apply continuation_token value to Options.

ContinuationToken specify the continuation token for list

func WithCredential

func WithCredential(v string) (p Pair)

WithCredential will apply credential value to Options.

Credential specify how to provide credential for service or storage

func WithDefaultContentType

func WithDefaultContentType(v string) (p Pair)

WithDefaultContentType will apply default_content_type value to Options.

DefaultContentType

func WithDefaultIoCallback

func WithDefaultIoCallback(v func([]byte)) (p Pair)

WithDefaultIoCallback will apply default_io_callback value to Options.

DefaultIoCallback specify what todo every time we read data from source

func WithEndpoint

func WithEndpoint(v string) (p Pair)

WithEndpoint will apply endpoint value to Options.

Endpoint specify how to provide endpoint for service or storage

func WithExpire deprecated

func WithExpire(v time.Duration) (p Pair)

WithExpire will apply expire value to Options.

Expire specify when the url returned by reach will expire.

Deprecated: Use `QuerySignHTTPRead` instead of `Reach` and `expire` is the declared argument.

func WithHTTPClientOptions

func WithHTTPClientOptions(v *httpclient.Options) (p Pair)

WithHTTPClientOptions will apply http_client_options value to Options.

HTTPClientOptions

func WithInterceptor

func WithInterceptor(v Interceptor) (p Pair)

WithInterceptor will apply interceptor value to Options.

Interceptor

func WithIoCallback

func WithIoCallback(v func([]byte)) (p Pair)

WithIoCallback will apply io_callback value to Options.

IoCallback specify what todo every time we read data from source

func WithListMode

func WithListMode(v ListMode) (p Pair)

WithListMode will apply list_mode value to Options.

ListMode

func WithLocation

func WithLocation(v string) (p Pair)

WithLocation will apply location value to Options.

Location specify the location for service or storage

func WithMultipartID

func WithMultipartID(v string) (p Pair)

WithMultipartID will apply multipart_id value to Options.

MultipartID

func WithName

func WithName(v string) (p Pair)

WithName will apply name value to Options.

Name specify the storage name

func WithObjectMode

func WithObjectMode(v ObjectMode) (p Pair)

WithObjectMode will apply object_mode value to Options.

ObjectMode ObjectMode hint

func WithOffset

func WithOffset(v int64) (p Pair)

WithOffset will apply offset value to Options.

Offset specify offset for this request, storage will seek to this offset before read

func WithSize

func WithSize(v int64) (p Pair)

WithSize will apply size value to Options.

Size specify size for this request, storage will only read limited content data

func WithWorkDir

func WithWorkDir(v string) (p Pair)

WithWorkDir will apply work_dir value to Options.

WorkDir specify the work dir for service or storage, every operation will be relative to this dir. work_dir SHOULD be an absolute path. work_dir will be default to / if not set. work_dir SHOULD be Unix style for object storage services. For fs storage service on windows platform, the behavior is defined separately.

Types

type Error

type Error struct {
	Op  string
	Err error

	Key   string
	Type  string
	Value interface{}
}

Error represents error related to a pair.

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

Unwrap implements xerrors.Wrapper

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL