services

package
v3.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2021 License: Apache-2.0 Imports: 3 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCapabilityInsufficient means this service doesn't have this capability
	ErrCapabilityInsufficient = errors.New("capability insufficient")
	// ErrRestrictionDissatisfied means this operation doesn't meat service's restriction.
	ErrRestrictionDissatisfied = errors.New("restriction dissatisfied")

	// ErrObjectNotExist means the object to be operated is not exist.
	ErrObjectNotExist = errors.New("object not exist")
	// ErrPermissionDenied means this operation doesn't have enough permission.
	ErrPermissionDenied = errors.New("permission denied")
)

Functions

This section is empty.

Types

type InitError

type InitError struct {
	Op   string
	Type string
	Err  error

	Pairs []types.Pair
}

InitError means this service init failed.

Only returned in New

func (*InitError) Error

func (e *InitError) Error() string

func (*InitError) Unwrap

func (e *InitError) Unwrap() error

Unwrap implements xerrors.Wrapper

type MetadataUnrecognizedError

type MetadataUnrecognizedError struct {
	Err error

	Key   string
	Value interface{}
}

MetadataUnrecognizedError means this operation meets unrecognized metadata.

func NewMetadataNotRecognizedError

func NewMetadataNotRecognizedError(key string, value interface{}) *MetadataUnrecognizedError

NewMetadataNotRecognizedError will create a new MetadataUnrecognizedError.

func (*MetadataUnrecognizedError) Error

func (e *MetadataUnrecognizedError) Error() string

func (*MetadataUnrecognizedError) Unwrap

func (e *MetadataUnrecognizedError) Unwrap() error

Unwrap implements xerrors.Wrapper

type PairRequiredError

type PairRequiredError struct {
	Err error

	Keys []string
}

PairRequiredError means this operation has required pair but missing.

func NewPairRequiredError

func NewPairRequiredError(keys ...string) *PairRequiredError

NewPairRequiredError will create a new PairRequiredError.

func (*PairRequiredError) Error

func (e *PairRequiredError) Error() string

func (*PairRequiredError) Unwrap

func (e *PairRequiredError) Unwrap() error

Unwrap implements xerrors.Wrapper

type PairUnsupportedError

type PairUnsupportedError struct {
	Err error

	Pair types.Pair
}

PairUnsupportedError means this operation has unsupported pair.

func NewPairUnsupportedError

func NewPairUnsupportedError(pair types.Pair) *PairUnsupportedError

NewPairUnsupportedError will create a new PairUnsupportedError.

func (*PairUnsupportedError) Error

func (e *PairUnsupportedError) Error() string

func (*PairUnsupportedError) Unwrap

func (e *PairUnsupportedError) Unwrap() error

Unwrap implements xerrors.Wrapper

type ServiceError

type ServiceError struct {
	Op  string
	Err error

	types.Servicer
	Name string
}

ServiceError represent errors related to service.

Only returned in Servicer related operations

func (*ServiceError) Error

func (e *ServiceError) Error() string

func (*ServiceError) Unwrap

func (e *ServiceError) Unwrap() error

Unwrap implements xerrors.Wrapper

type StorageError

type StorageError struct {
	Op  string
	Err error

	types.Storager
	Path []string
}

StorageError represent errors related to storage.

Only returned in Storager related operations

func (*StorageError) Error

func (e *StorageError) Error() string

func (*StorageError) Unwrap

func (e *StorageError) Unwrap() error

Unwrap implements xerrors.Wrapper

Jump to

Keyboard shortcuts

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