example

package
v0.0.0-...-1c8ba67 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error interface {
	Error() string
	Details() []ErrorDetail

	IsUnknown() bool
	IsBadRequest() bool
	IsPermissionDenied() bool
	IsNotFound() bool
}

func ErrorBadRequest

func ErrorBadRequest(source error, details ...ErrorDetail) Error

func ErrorNotFound

func ErrorNotFound(source error, details ...ErrorDetail) Error

func ErrorPermissionDenied

func ErrorPermissionDenied(source error, details ...ErrorDetail) Error

func ErrorUnknown

func ErrorUnknown(source error, details ...ErrorDetail) Error

type ErrorCode

type ErrorCode string

func (ErrorCode) String

func (c ErrorCode) String() string

type ErrorDetail

type ErrorDetail struct {
	// contains filtered or unexported fields
}

func NameIsInvalidLengthError

func NameIsInvalidLengthError(
	lessThan int,
	moreThan int,
) ErrorDetail

func (ErrorDetail) Args

func (c ErrorDetail) Args() []string

func (ErrorDetail) Code

func (c ErrorDetail) Code() ErrorDetailCode

func (ErrorDetail) String

func (e ErrorDetail) String() string

type ErrorDetailCode

type ErrorDetailCode string
const ErrorDetailNameIsInvalidLength ErrorDetailCode = "NameIsInvalidLength"

func (ErrorDetailCode) String

func (c ErrorDetailCode) String() string

type NameSpec

type NameSpec struct {
	// contains filtered or unexported fields
}

func (NameSpec) Validate

func (s NameSpec) Validate(name string) Error

Jump to

Keyboard shortcuts

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