Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ErrorDataNotFound error message when data doesn't exist ErrorDataNotFound = "data %s not found" // ErrorParameterInvalid error message for parameter is invalid ErrorParameterInvalid = "%s parameter is invalid" // ErrorParameterRequired error message for parameter is missing ErrorParameterRequired = "%s parameter is required" // ErrorParameterLength error message for parameter length is invalid ErrorParameterLength = "length of %s parameter exceeds the limit %d" ErrorUnauthorized = "you are not authorized" // ErrorRedisNil error for redis nil ErrorRedisNil = "redis: nil" )
Variables ¶
View Source
var AllowedSortFields = []string{
"name",
"id",
"created",
"last_modified",
}
AllowedSortFields is allowed field name for sorting
Functions ¶
func StringInSlice ¶
StringInSlice function for checking whether string in slice str string searched string list []string slice
Types ¶
type BaseDomain ¶
type BaseDomain struct { CreatedAt time.Time `gorm:"column:created_at"` UpdatedAt time.Time `gorm:"column:updated_at"` }
BaseDomain structure
type ErrorAllowNumericOnly ¶
type ErrorAllowNumericOnly struct {
// contains filtered or unexported fields
}
ErrorAllowNumericOnly struct
func NewErrorAllowNumericOnly ¶
func NewErrorAllowNumericOnly(field string) *ErrorAllowNumericOnly
NewErrorAllowNumericOnly ErrorRatingExceedLimit's constructor
type ErrorValueShouldBool ¶
type ErrorValueShouldBool struct {
// contains filtered or unexported fields
}
ErrorValueShouldBool struct
func NewErrorValueShouldBool ¶
func NewErrorValueShouldBool(field string) *ErrorValueShouldBool
NewErrorValueShouldBool ErrorValueShouldBool's constructor
Click to show internal directories.
Click to hide internal directories.