pairs

package
v0.0.0-...-0dabf1d Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

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 WithContentDisposition

func WithContentDisposition(v string) (p types.Pair)

WithContentDisposition will apply content_disposition value to Options.

ContentDisposition

func WithContentMd5

func WithContentMd5(v string) (p types.Pair)

WithContentMd5 will apply content_md5 value to Options.

ContentMd5

func WithContentType

func WithContentType(v string) (p types.Pair)

WithContentType will apply content_type value to Options.

ContentType

func WithContinuationToken

func WithContinuationToken(v string) (p types.Pair)

WithContinuationToken will apply continuation_token value to Options.

ContinuationToken specify the continuation token for list

func WithCredential

func WithCredential(v string) (p types.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 types.Pair)

WithDefaultContentType will apply default_content_type value to Options.

DefaultContentType default value for content_type

func WithDefaultIoCallback

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

WithDefaultIoCallback will apply default_io_callback value to Options.

DefaultIoCallback default value for io_callback

func WithEnableLoosePair

func WithEnableLoosePair() (p types.Pair)

WithEnableLoosePair will apply enable_loose_pair value to Options.

EnableLoosePair Enable feature loose_pair

func WithEnableVirtualDir

func WithEnableVirtualDir() (p types.Pair)

WithEnableVirtualDir will apply enable_virtual_dir value to Options.

EnableVirtualDir Enable feature virtual_dir

func WithEnableVirtualLink() (p types.Pair)

WithEnableVirtualLink will apply enable_virtual_link value to Options.

EnableVirtualLink Enable feature virtual_link

func WithEnableVirtualObjectMetadata

func WithEnableVirtualObjectMetadata() (p types.Pair)

WithEnableVirtualObjectMetadata will apply enable_virtual_object_metadata value to Options.

EnableVirtualObjectMetadata Enable feature virtual_object_metadata

func WithEndpoint

func WithEndpoint(v string) (p types.Pair)

WithEndpoint will apply endpoint value to Options.

Endpoint specify how to provide endpoint for service or storage

func WithIoCallback

func WithIoCallback(v func([]byte)) (p types.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 types.ListMode) (p types.Pair)

WithListMode will apply list_mode value to Options.

ListMode

func WithLocation

func WithLocation(v string) (p types.Pair)

WithLocation will apply location value to Options.

Location specify the location for service or storage

func WithMultipartID

func WithMultipartID(v string) (p types.Pair)

WithMultipartID will apply multipart_id value to Options.

MultipartID

func WithName

func WithName(v string) (p types.Pair)

WithName will apply name value to Options.

Name specify the storage name

func WithObjectMode

func WithObjectMode(v types.ObjectMode) (p types.Pair)

WithObjectMode will apply object_mode value to Options.

ObjectMode ObjectMode hint

func WithOffset

func WithOffset(v int64) (p types.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 types.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 types.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