api

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// E4001 Error binding JSON
	E4001 = "4001"

	// E4002 Partial entity incomplete some field is missing
	E4002 = "4002"

	// E4003 Entity building from DTO
	E4003 = "4003"

	// E4004 Entity not found
	E4004 = "4004"

	// E4005 - Entity Query (TQL) error
	E4005 = "4005"

	// E5001 - Entity creation error
	E5001 = "5001"

	// E5002 - Entity update error
	E5002 = "5002"

	// E5003 - Entity read error
	E5003 = "5003"

	// E5004 - Entity remove error
	E5004 = "5004"

	// E5005 - Entity Query (TQL) error
	E5005 = "5005"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code string `json:"code"`
	Msg  string `json:"error"`
}

Error api error message

func ErrorBindingJSON

func ErrorBindingJSON(err error) Error

ErrorBindingJSON returns a 4001 error

func ErrorBuildingEntityFromDTO

func ErrorBuildingEntityFromDTO(err error) Error

ErrorBuildingEntityFromDTO returns a 4003 error

func ErrorEntityCreation

func ErrorEntityCreation(err error) Error

ErrorEntityCreation returns a 5001 error

func ErrorEntityQuery

func ErrorEntityQuery(err error) Error

ErrorEntityQuery returns a 5005 error

func ErrorEntityQueryByUser added in v0.3.0

func ErrorEntityQueryByUser(err error) Error

ErrorEntityQueryByUser returns a 4005 error

func ErrorEntityRead

func ErrorEntityRead(err error) Error

ErrorEntityRead returns a 5003 error

func ErrorEntityRemove

func ErrorEntityRemove(err error) Error

ErrorEntityRemove returns a 5004 error

func ErrorEntityUpdate

func ErrorEntityUpdate(err error) Error

ErrorEntityUpdate returns a 5002 error

func ErrorNotFound added in v0.3.1

func ErrorNotFound(err error) Error

ErrorNotFound returns a 4004 error

func ErrorPartialEntityIncomplete

func ErrorPartialEntityIncomplete(err error) Error

ErrorPartialEntityIncomplete returns a 4002 error

func NewError

func NewError(code string, err error) Error

NewError returns an API error message

Jump to

Keyboard shortcuts

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