serviceerror

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 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.

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.

type ClientVersionNotSupported

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

ClientVersionNotSupported represents client version is not supported error.

func NewClientVersionNotSupported

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

NewClientVersionNotSupported returns new ClientVersionNotSupported error.

func (*ClientVersionNotSupported) Error

func (e *ClientVersionNotSupported) Error() string

Error returns string message.

type CurrentBranchChanged

type CurrentBranchChanged struct {
	Message            string
	CurrentBranchToken []byte
	// contains filtered or unexported fields
}

CurrentBranchChanged represents current branch changed error.

func NewCurrentBranchChanged

func NewCurrentBranchChanged(message string, currentBranchToken []byte) *CurrentBranchChanged

NewCurrentBranchChanged returns new CurrentBranchChanged error.

func (*CurrentBranchChanged) Error

func (e *CurrentBranchChanged) Error() string

Error returns string message.

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.

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.

type EventAlreadyStarted

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

EventAlreadyStarted represents event already started error.

func NewEventAlreadyStarted

func NewEventAlreadyStarted(message string) *EventAlreadyStarted

NewEventAlreadyStarted returns new EventAlreadyStarted error.

func (*EventAlreadyStarted) Error

func (e *EventAlreadyStarted) Error() string

Error returns string message.

type FeatureVersionNotSupported

type FeatureVersionNotSupported struct {
	Message           string
	FeatureVersion    string
	Feature           string
	SupportedVersions string
	// contains filtered or unexported fields
}

FeatureVersionNotSupported represents client version is not supported error.

func NewFeatureVersionNotSupported

func NewFeatureVersionNotSupported(feature, featureVersion, supportedVersions string) *FeatureVersionNotSupported

NewFeatureVersionNotSupported returns new FeatureVersionNotSupported error.

func (*FeatureVersionNotSupported) Error

Error returns string message.

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.

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.

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.

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.

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.

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.

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.

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.

type RetryTask

type RetryTask struct {
	Message     string
	NamespaceId string
	WorkflowId  string
	RunId       string
	NextEventId int64
	// contains filtered or unexported fields
}

RetryTask represents retry task error.

func NewRetryTask

func NewRetryTask(message, namespaceId, workflowId, runId string, nextEventId int64) *RetryTask

NewRetryTask returns new RetryTask error.

func (*RetryTask) Error

func (e *RetryTask) Error() string

Error returns string message.

type RetryTaskV2

type RetryTaskV2 struct {
	Message           string
	NamespaceId       string
	WorkflowId        string
	RunId             string
	StartEventId      int64
	StartEventVersion int64
	EndEventId        int64
	EndEventVersion   int64
	// contains filtered or unexported fields
}

RetryTaskV2 represents retry task v2 error.

func NewRetryTaskV2

func NewRetryTaskV2(message, namespaceId, workflowId, runId string, startEventId, startEventVersion, endEventId, endEventVersion int64) *RetryTaskV2

NewRetryTaskV2 returns new RetryTaskV2 error.

func (*RetryTaskV2) Error

func (e *RetryTaskV2) Error() string

Error returns string message.

type ServiceError

type ServiceError interface {
	error
	// contains filtered or unexported methods
}

type ShardOwnershipLost

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

ShardOwnershipLost represents shard ownership lost error.

func NewShardOwnershipLost

func NewShardOwnershipLost(message, owner string) *ShardOwnershipLost

NewShardOwnershipLost returns new ShardOwnershipLost error.

func (*ShardOwnershipLost) Error

func (e *ShardOwnershipLost) Error() string

Error returns string message.

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.

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.

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.

Jump to

Keyboard shortcuts

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