Documentation
¶
Index ¶
- Constants
- Variables
- func AppRecover()
- func NewSuccessReponse(data, paging, filter interface{}) *successResponse
- func SimpleSuccessResponse(data interface{}) *successResponse
- type AppError
- func ErrCannotCreateEntity(entity string, err error) *AppError
- func ErrCannotDeleteEntity(entity string, err error) *AppError
- func ErrCannotGetEntity(entity string, err error) *AppError
- func ErrCannotListEntity(entity string, err error) *AppError
- func ErrCannotUpdateEntity(entity string, err error) *AppError
- func ErrDB(err error) *AppError
- func ErrEntityExisted(entity string, err error) *AppError
- func ErrEntityNotFound(entity string, err error) *AppError
- func ErrInternal(err error) *AppError
- func ErrInvalidRequest(err error) *AppError
- func ErrNoPermission(err error) *AppError
- func NewAuthorized(root error, msg, log, key string) *AppError
- func NewCustomError(root error, msg string, key string) *AppError
- func NewErrorResponse(root error, msg, log, key string) *AppError
- func NewFullErrorResponse(statusCode int, root error, msg, log, key string) *AppError
- type Paging
- type SQLModel
- type UID
- func (uid UID) GeeShardID() uint32
- func (uid UID) GetLocalID() uint32
- func (uid UID) GetObjectType() uint
- func (uid UID) MarshalJSON() ([]byte, error)
- func (uid *UID) Scan(value interface{}) error
- func (uid UID) String() string
- func (uid *UID) UnmarshalJSON(data []byte) error
- func (uid *UID) Value() (driver.Value, error)
Constants ¶
View Source
const ( DBTypeRestaurant = 1 DBTypeUser = 2 )
Variables ¶
View Source
var RecordNotFound = errors.New("record not found")
Functions ¶
func AppRecover ¶
func AppRecover()
func NewSuccessReponse ¶
func NewSuccessReponse(data, paging, filter interface{}) *successResponse
func SimpleSuccessResponse ¶
func SimpleSuccessResponse(data interface{}) *successResponse
Types ¶
type AppError ¶
type AppError struct { StatusCode int `json:"status_code"` RootErr error `json:"-"` Message string `json:"message"` Log string `json:"log"` Key string `json:"error_key"` }
func ErrCannotCreateEntity ¶
func ErrCannotDeleteEntity ¶
func ErrCannotGetEntity ¶
func ErrCannotListEntity ¶
func ErrCannotUpdateEntity ¶
func ErrEntityExisted ¶
func ErrEntityNotFound ¶
func ErrInternal ¶
func ErrInvalidRequest ¶
func ErrNoPermission ¶
func NewAuthorized ¶
func NewErrorResponse ¶
func NewFullErrorResponse ¶
type Paging ¶
type SQLModel ¶
type UID ¶
type UID struct {
// contains filtered or unexported fields
}
func DecomposeUID ¶
func FromBase58 ¶
func (UID) GeeShardID ¶
func (UID) GetLocalID ¶
func (UID) GetObjectType ¶
func (UID) MarshalJSON ¶
func (*UID) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.