serviceerror

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: MIT Imports: 6 Imported by: 170

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromStatus

func FromStatus(st *status.Status) error

FromStatus converts gogo gRPC Status to service error.

func ToStatus

func ToStatus(err error) *status.Status

ToStatus converts service error to gogo gRPC Status. If error is not a service error it returns status with code Unknown.

Types

type Canceled

type Canceled struct {
	Message string
	// contains filtered or unexported fields
}

Canceled represents canceled error.

func NewCanceled

func NewCanceled(message string) *Canceled

NewCanceled returns new Canceled error.

func (*Canceled) Error

func (e *Canceled) Error() string

Error returns string message.

func (*Canceled) Status added in v0.31.0

func (e *Canceled) Status() *status.Status

type CancellationAlreadyRequested

type CancellationAlreadyRequested struct {
	Message string
	// contains filtered or unexported fields
}

CancellationAlreadyRequested represents cancellation already requested error.

func NewCancellationAlreadyRequested

func NewCancellationAlreadyRequested(message string) *CancellationAlreadyRequested

NewCancellationAlreadyRequested returns new CancellationAlreadyRequested error.

func (*CancellationAlreadyRequested) Error

Error returns string message.

func (*CancellationAlreadyRequested) Status added in v0.31.0

type ClientVersionNotSupported

type ClientVersionNotSupported struct {
	Message           string
	ClientVersion     string
	ClientName        string
	SupportedVersions string
	// contains filtered or unexported fields
}

ClientVersionNotSupported represents client version is not supported error.

func NewClientVersionNotSupported

func NewClientVersionNotSupported(clientVersion, clientName, supportedVersions string) *ClientVersionNotSupported

NewClientVersionNotSupported returns new ClientVersionNotSupported error.

func (*ClientVersionNotSupported) Error

func (e *ClientVersionNotSupported) Error() string

Error returns string message.

func (*ClientVersionNotSupported) Status added in v0.31.0

type DataLoss

type DataLoss struct {
	Message string
	// contains filtered or unexported fields
}

DataLoss represents data loss error.

func NewDataLoss

func NewDataLoss(message string) *DataLoss

NewDataLoss returns new DataLoss error.

func (*DataLoss) Error

func (e *DataLoss) Error() string

Error returns string message.

func (*DataLoss) Status added in v0.31.0

func (e *DataLoss) Status() *status.Status

type DeadlineExceeded

type DeadlineExceeded struct {
	Message string
	// contains filtered or unexported fields
}

DeadlineExceeded represents deadline exceeded error.

func NewDeadlineExceeded

func NewDeadlineExceeded(message string) *DeadlineExceeded

NewDeadlineExceeded returns new DeadlineExceeded error.

func (*DeadlineExceeded) Error

func (e *DeadlineExceeded) Error() string

Error returns string message.

func (*DeadlineExceeded) Status added in v0.31.0

func (e *DeadlineExceeded) Status() *status.Status

type Internal

type Internal struct {
	Message string
	// contains filtered or unexported fields
}

Internal represents internal error.

func NewInternal

func NewInternal(message string) *Internal

NewInternal returns new Internal error.

func (*Internal) Error

func (e *Internal) Error() string

Error returns string message.

func (*Internal) MessageArgs

func (e *Internal) MessageArgs(a ...interface{}) *Internal

MessageArgs returns new Internal with Message formatted with passed args.

func (*Internal) Status added in v0.31.0

func (e *Internal) Status() *status.Status

type InvalidArgument

type InvalidArgument struct {
	Message string
	// contains filtered or unexported fields
}

InvalidArgument represents invalid argument error.

func NewInvalidArgument

func NewInvalidArgument(message string) *InvalidArgument

NewInvalidArgument returns new InvalidArgument error.

func (*InvalidArgument) Error

func (e *InvalidArgument) Error() string

Error returns string message.

func (*InvalidArgument) MessageArgs

func (e *InvalidArgument) MessageArgs(a ...interface{}) *InvalidArgument

MessageArgs returns new InvalidArgument with Message formatted with passed args.

func (*InvalidArgument) Status added in v0.31.0

func (e *InvalidArgument) Status() *status.Status

type NamespaceAlreadyExists

type NamespaceAlreadyExists struct {
	Message string
	// contains filtered or unexported fields
}

NamespaceAlreadyExists represents namespace already exists error.

func NewNamespaceAlreadyExists

func NewNamespaceAlreadyExists(message string) *NamespaceAlreadyExists

NewNamespaceAlreadyExists returns new NamespaceAlreadyExists error.

func (*NamespaceAlreadyExists) Error

func (e *NamespaceAlreadyExists) Error() string

Error returns string message.

func (*NamespaceAlreadyExists) Status added in v0.31.0

func (e *NamespaceAlreadyExists) Status() *status.Status

type NamespaceNotActive

type NamespaceNotActive struct {
	Message        string
	Namespace      string
	CurrentCluster string
	ActiveCluster  string
	// contains filtered or unexported fields
}

NamespaceNotActive represents namespace not active error.

func NewNamespaceNotActive

func NewNamespaceNotActive(namespace, currentCluster, activeCluster string) *NamespaceNotActive

NewNamespaceNotActive returns new NamespaceNotActive error.

func (*NamespaceNotActive) Error

func (e *NamespaceNotActive) Error() string

Error returns string message.

func (*NamespaceNotActive) Status added in v0.31.0

func (e *NamespaceNotActive) Status() *status.Status

type NotFound

type NotFound struct {
	Message        string
	CurrentCluster string
	ActiveCluster  string
	// contains filtered or unexported fields
}

NotFound represents not found error.

func NewNotFound

func NewNotFound(message string) *NotFound

NewNotFound returns new NotFound error.

func (*NotFound) Error

func (e *NotFound) Error() string

Error returns string message.

func (*NotFound) Status added in v0.31.0

func (e *NotFound) Status() *status.Status

type PermissionDenied

type PermissionDenied struct {
	Message string
	// contains filtered or unexported fields
}

PermissionDenied represents permission denied error.

func NewPermissionDenied

func NewPermissionDenied(message string) *PermissionDenied

NewPermissionDenied returns new PermissionDenied error.

func (*PermissionDenied) Error

func (e *PermissionDenied) Error() string

Error returns string message.

func (*PermissionDenied) Status added in v0.31.0

func (e *PermissionDenied) Status() *status.Status

type QueryFailed

type QueryFailed struct {
	Message string
	// contains filtered or unexported fields
}

QueryFailed represents query failed error.

func NewQueryFailed

func NewQueryFailed(message string) *QueryFailed

NewQueryFailed returns new QueryFailed error.

func (*QueryFailed) Error

func (e *QueryFailed) Error() string

Error returns string message.

func (*QueryFailed) Status added in v0.31.0

func (e *QueryFailed) Status() *status.Status

type ResourceExhausted

type ResourceExhausted struct {
	Message string
	// contains filtered or unexported fields
}

ResourceExhausted represents resource exhausted error.

func NewResourceExhausted

func NewResourceExhausted(message string) *ResourceExhausted

NewResourceExhausted returns new ResourceExhausted error.

func (*ResourceExhausted) Error

func (e *ResourceExhausted) Error() string

Error returns string message.

func (*ResourceExhausted) Status added in v0.31.0

func (e *ResourceExhausted) Status() *status.Status

type ServerVersionNotSupported added in v1.0.0

type ServerVersionNotSupported struct {
	Message                       string
	ServerVersion                 string
	ClientSupportedServerVersions string
	// contains filtered or unexported fields
}

ServerVersionNotSupported represents client version is not supported error.

func NewServerVersionNotSupported added in v1.0.0

func NewServerVersionNotSupported(serverVersion, supportedVersions string) *ServerVersionNotSupported

NewServerVersionNotSupported returns new ServerVersionNotSupported error.

func (*ServerVersionNotSupported) Error added in v1.0.0

func (e *ServerVersionNotSupported) Error() string

Error returns string message.

func (*ServerVersionNotSupported) Status added in v1.0.0

type ServiceError

type ServiceError interface {
	error
	Status() *status.Status
}

type Unavailable

type Unavailable struct {
	Message string
	// contains filtered or unexported fields
}

Unavailable represents unavailable error.

func NewUnavailable

func NewUnavailable(message string) *Unavailable

NewUnavailable returns new Unavailable error.

func (*Unavailable) Error

func (e *Unavailable) Error() string

Error returns string message.

func (*Unavailable) Status added in v0.31.0

func (e *Unavailable) Status() *status.Status

type Unimplemented

type Unimplemented struct {
	Message string
	// contains filtered or unexported fields
}

Unimplemented represents unimplemented error.

func NewUnimplemented

func NewUnimplemented(message string) *Unimplemented

NewUnimplemented returns new Unimplemented error.

func (*Unimplemented) Error

func (e *Unimplemented) Error() string

Error returns string message.

func (*Unimplemented) Status added in v0.31.0

func (e *Unimplemented) Status() *status.Status

type WorkflowExecutionAlreadyStarted

type WorkflowExecutionAlreadyStarted struct {
	Message        string
	StartRequestId string
	RunId          string
	// contains filtered or unexported fields
}

WorkflowExecutionAlreadyStarted represents workflow execution already started error.

func NewWorkflowExecutionAlreadyStarted

func NewWorkflowExecutionAlreadyStarted(message, startRequestId, runId string) *WorkflowExecutionAlreadyStarted

NewWorkflowExecutionAlreadyStarted returns new WorkflowExecutionAlreadyStarted error.

func (*WorkflowExecutionAlreadyStarted) Error

Error returns string message.

func (*WorkflowExecutionAlreadyStarted) Status added in v0.31.0

Jump to

Keyboard shortcuts

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