Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandMessage ¶
type CommandMessage struct { Data interface{} Message string Status CommandStatus Hash string }
func NewCommandMessage ¶
func NewCommandMessage(message string, status CommandStatus, data interface{}) *CommandMessage
func (*CommandMessage) GetError ¶
func (c *CommandMessage) GetError() error
type CommandStatus ¶
type CommandStatus string
const ( SuccessStatus CommandStatus = "success" NotFoundErrorStatus CommandStatus = "not found" ValidationErrorStatus CommandStatus = "validation error" DuplicateErrorStatus CommandStatus = "duplication error" UNAuthorizedStatus CommandStatus = "unauthorized" InternalServerErrorStatus CommandStatus = "internal server error" )
func GetCommandStatusFromError ¶
func GetCommandStatusFromError(err error) CommandStatus
Click to show internal directories.
Click to hide internal directories.