Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPoolExhausted = errors.New("connection pool exhausted")
View Source
var Response = response{}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) NeedReload ¶
Check if the configuration file need reload. If the file have been loaded and be modified since then, return true
type Getter ¶
type Getter interface { // Since getters may be related with each other, // one getter may need another one to do something for it e.g., // this method need to be aware of all getters. // Ctx should holds the data which would be passed through all getters. // allGetters is type of map[string]bool for easier checking if a getter exists. Get(ctx interface{}, allGetters map[string]bool) interface{} }
type Pool ¶
type PooledConn ¶
type PooledConn struct { Conn Conn // contains filtered or unexported fields }
池中连接
func (*PooledConn) GetDB ¶
func (pc *PooledConn) GetDB() *gorm.DB
func (*PooledConn) GetRedis ¶
func (pc *PooledConn) GetRedis() *redis.Client
type RequestEntity ¶
type RequestEntity struct { Data interface{} // request data Rules validation.Rules // validation rules Requires validation.Requires // require fields Errors Errors // validation errors }
func (*RequestEntity) AddError ¶
func (e *RequestEntity) AddError(field string, err string)
add or append error
func (*RequestEntity) GetFieldError ¶
func (e *RequestEntity) GetFieldError(field string) []string
Get field error
func (*RequestEntity) HaveErrors ¶
func (e *RequestEntity) HaveErrors() bool
Check if the entity have errors
func (*RequestEntity) HaveFieldError ¶
func (e *RequestEntity) HaveFieldError(f string) bool
Check if field error exists
Click to show internal directories.
Click to hide internal directories.