Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrorCode ¶
type ErrorCode string
const ( // General Error Code ErrUnknown ErrorCode = "ERR_UNKNOWN" ErrArgument ErrorCode = "ERR_ARGUMENT" // User management Error Code ErrUserPasswrod ErrorCode = "ERR_USER_PASSWORD" ErrUserConflictEmail ErrorCode = "ERR_USER_CONFLICT_EMAIL" ErrUserConflictName ErrorCode = "ERR_USER_CONFLICT_NAME" ErrUserNotFound ErrorCode = "ERR_USER_NOT_FOUND" ErrUserSamePassword ErrorCode = "ERR_USER_SAME_PASSWORD" // Project Error Code ErrProjectNotFound ErrorCode = "ERR_PROJECT_NOT_FOUND" ErrProjectCreate ErrorCode = "ERR_PROJECT_CREATE" )
type RestResult ¶
type RestResult struct { Success bool `json:"success"` Data interface{} `json:"data"` Error OpError `json:"error"` }
RestResult represents that produces by rest api
func (*RestResult) SetData ¶
func (r *RestResult) SetData(data interface{})
func (*RestResult) SetError ¶
func (r *RestResult) SetError(err OpError)
func (*RestResult) SetErrorCode ¶
func (r *RestResult) SetErrorCode(code ErrorCode)
func (*RestResult) SetSuccess ¶
func (r *RestResult) SetSuccess(success bool)
Click to show internal directories.
Click to hide internal directories.