jerr

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InternalServerError                                 = "internal server error" // should not occur
	RequiredParameterNotSpecified                       = "required parameter(s) not specified"
	ParametersAreForbiddenForTheDirective               = "parameters are forbidden for the directive"
	AnnotationIsForbiddenForTheDirective                = "annotation is forbidden for the directive"
	EmptyDescription                                    = "empty description"
	EmptyBody                                           = "empty body"
	HTTPResourceNotFound                                = "resource not found"
	ResponsesIsEmpty                                    = "responses is empty"
	RequestIsEmpty                                      = "request is empty"
	NotUniqueDirective                                  = "not a unique directive"
	IncorrectParameter                                  = "incorrect parameter"
	BodyMustBeObject                                    = "body must be object"
	IsNotHTTPRequestMethod                              = "directive is not a HTTP request method"
	HTTPMethodNotFound                                  = "HTTP method not found"
	PathNotFound                                        = "path not found"
	IncorrectPath                                       = "incorrect path"
	CannotUseTheTypeAndSchemaNotationParametersTogether = "cannot use the Type and SchemaNotation parameters together"
	IncorrectContextOfDirective                         = "incorrect context of directive"
	ThereIsNoExplicitContextForClosure                  = "there is no explicit context for closure"
	DirectiveNotAllowed                                 = "directive not allowed"
	JsonRpcMethodNotFound                               = "JSON-RPC method not found"
	JsonRpcResourceNotFound                             = "resource not found"
	ApartFromTheOpeningParenthesis                      = "apart from the opening parenthesis, there should be nothing else on this line" //nolint:lll
	DuplicateNames                                      = "duplicate names are not allowed"
	TagNotFound                                         = "tag not found"
	UserTypeIsNotAnObject                               = "the user type is not an object"
	UserTypeNotFound                                    = "user type not found"
	NotAllowedToOverrideTheProperty                     = "it is not allowed to override the %q property from the user type %q" //nolint:lll
	MultiLevelPropertyIsNotAllowed                      = "the multi-level property is not allowed in the Path directive"       //nolint:lll
)

Variables

This section is empty.

Functions

func GetQuote

func GetQuote(content bytes.Bytes, position bytes.Index) string

GetQuote return "" if the source sub-string cannot be determined

Types

type JApiError

type JApiError struct {
	Msg string

	Location
	// contains filtered or unexported fields
}

func NewJApiError

func NewJApiError(msg string, f *fs.File, i bytes.Index) *JApiError

func (*JApiError) Error

func (e *JApiError) Error() string

func (*JApiError) HasStackTrace

func (e *JApiError) HasStackTrace() bool

func (*JApiError) OccurredInFile

func (e *JApiError) OccurredInFile(f *fs.File, atByte bytes.Index)

type Location

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

func NewLocation

func NewLocation(f *fs.File, i bytes.Index) Location

NewLocation a bit optimized version of getting all info

func (Location) Column

func (l Location) Column() bytes.Index

func (Location) Index

func (l Location) Index() bytes.Index

func (Location) Line

func (l Location) Line() bytes.Index

func (Location) Quote

func (l Location) Quote() string

Jump to

Keyboard shortcuts

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