Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct { OAuthConfig OAuthConfig `mapstructure:"oauthconfig" json:"oauthconfig" yaml:"oauthconfig"` RedisConfig RedisConfig `mapstructure:"redisconfig" json:"redisconfig" yaml:"redisconfig"` DbConfig DbConfig `mapstructure:"dbconfig" json:"dbconfig" yaml:"dbconfig"` }
type AppError ¶
func AsAppError ¶
func NewAuthenticationError ¶
func NewAuthorizationError ¶
func NewNotFoundError ¶
func NewUnexpectedError ¶
func NewValidationError ¶
type DbBaseModel ¶
type DbBaseModel struct { Id string `json:"id" gorm:"primaryKey;size:32"` DataVersion int64 `json:"data_version"` DataStatus int `json:"data_status"` CreateTime int64 `json:"create_time" gorm:"autoCreateTime:milli"` UpdateTime int64 `json:"update_time" gorm:"autoUpdateTime:milli"` }
func NewDbBaseModel ¶
func NewDbBaseModel(id string) DbBaseModel
type DbConfig ¶
type DbConfig struct { DbType string `mapstructure:"db_type" json:"db_type" yaml:"db_type"` Host string `mapstructure:"host" json:"host" yaml:"host"` Port string `mapstructure:"port" json:"port" yaml:"port"` Config string `mapstructure:"config" json:"config" yaml:"config"` User string `mapstructure:"user" json:"user" yaml:"user"` Password string `mapstructure:"password" json:"password" yaml:"password"` DbName string `mapstructure:"db_name" json:"db_name" yaml:"db_name"` MaxIdleConns int `mapstructure:"max_idle_conns" json:"max_idle_conns" yaml:"max_idle_conns"` MaxOpenConns int `mapstructure:"max_open_conns" json:"max_open_conns" yaml:"max_open_conns"` ConnMaxLifetime string `mapstructure:"conn_max_lifetime" json:"conn_max_lifetime" yaml:"conn_max_lifetime"` }
type DbQuery ¶
type DbQuery struct { QueryWheres []DbQueryWhere `json:"query_wheres"` OrderBy []DbQueryOrderBy `json:"order_by"` PageSize int `json:"page_size"` PageNumber int `json:"page_number"` }
func NewDbQuery ¶
func NewDbQuery(wheres []DbQueryWhere, ps int, pn int, order []DbQueryOrderBy) *DbQuery
func (*DbQuery) GetWhereClause ¶
type DbQueryFilter ¶
type DbQueryFilter struct { FieldName string `json:"field_name"` FilterValues []interface{} `json:"filter_values"` FilterOperation string `json:"filter_operation"` Connecter string `json:"connecter"` FieldType string `json:"field_type"` }
func NewDbQueryFilter ¶
func NewDbQueryFilter(field string, values []interface{}, op string, ft string) DbQueryFilter
type DbQueryOrderBy ¶
func NewDDbQueryOrderBy ¶
func NewDDbQueryOrderBy(field string, asc bool) DbQueryOrderBy
type DbQueryWhere ¶
type DbQueryWhere struct { QueryFilters []DbQueryFilter `json:"query_filters"` Connecter string `json:"connecter"` }
func NewDbQueryWhere ¶
func NewDbQueryWhere(filters []DbQueryFilter, connector string) DbQueryWhere
type OAuthConfig ¶
type OAuthConfig struct { SecretKey string `mapstructure:"secret_key" json:"secret_key" yaml:"secret_key"` AccessExpiresTime string `mapstructure:"access_expires_time" json:"access_expires_time" yaml:"access_expires_time"` RefreshExpiresTime string `mapstructure:"refresh_expires_time" json:"refresh_expires_time" yaml:"refresh_expires_time"` Issuer string `mapstructure:"issuer" json:"issuer" yaml:"issuer"` }
type RedisConfig ¶
Click to show internal directories.
Click to hide internal directories.