Documentation
¶
Overview ¶
generated by reguerr; DO NOT EDIT
Index ¶
- Variables
- func IsInvalidInputParameterErr(err error) bool
- func IsNotFoundOperationIDErr(err error) bool
- func IsPermissionDeniedErr(err error) bool
- func IsUpdateConflictErr(err error) bool
- func IsUserTypeUnregisterErr(err error) bool
- func NewInvalidInputParameterErr(err error, payload map[string]interface{}) *reguerr.ReguError
- func NewNotFoundOperationIDErr(err error) *reguerr.ReguError
- func NewPermissionDeniedErr(err error) *reguerr.ReguError
- func NewUpdateConflictErr(err error, arg1 interface{}) *reguerr.ReguError
- func NewUserTypeUnregisterErr() *reguerr.ReguError
- func UserHandleFunc(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
var ( // No message arguments PermissionDeniedErr = reguerr.New("1001", "permission denied").Build() // One message arguments UpdateConflictErr = reguerr.New("1002", "other user updated: key=%s").Build() // Message arguments with label InvalidInputParameterErr = reguerr.New("1003", "invalid input parameter: %v"). Label(0, "payload", map[string]interface{}{}). Build() // Disable default error argument UserTypeUnregisterErr = reguerr.New("1005", "not found user type").DisableError().Build() // Change log level and exitCode NotFoundOperationIDErr = reguerr.New("1004", "not found operation id"). Warn().WithStatusCode(404). Build() )
reguerr targets is below. cd $GOPATH/src/gitlab.com/future-architect/reguerr && go run cmd/reguerr/main.go generate -f example/error_code.go
Functions ¶
func IsInvalidInputParameterErr ¶
IsInvalidInputParameterErr indicates if the passed in error is from the error with code [1003].
func IsNotFoundOperationIDErr ¶
IsNotFoundOperationIDErr indicates if the passed in error is from the error with code [1004].
func IsPermissionDeniedErr ¶
IsPermissionDeniedErr indicates if the passed in error is from the error with code [1001].
func IsUpdateConflictErr ¶
IsUpdateConflictErr indicates if the passed in error is from the error with code [1002].
func IsUserTypeUnregisterErr ¶
IsUserTypeUnregisterErr indicates if the passed in error is from the error with code [1005].
func NewInvalidInputParameterErr ¶
NewInvalidInputParameterErr is the error indicating [1003] invalid input parameter: %v: $err.
func NewNotFoundOperationIDErr ¶
NewNotFoundOperationIDErr is the error indicating [1004] not found operation id: $err.
func NewPermissionDeniedErr ¶
NewPermissionDeniedErr is the error indicating [1001] permission denied: $err.
func NewUpdateConflictErr ¶
NewUpdateConflictErr is the error indicating [1002] other user updated: key=%s: $err.
func NewUserTypeUnregisterErr ¶
NewUserTypeUnregisterErr is the error indicating [1005] not found user type.
func UserHandleFunc ¶
func UserHandleFunc(w http.ResponseWriter, r *http.Request)
Types ¶
This section is empty.