Documentation ¶
Overview ¶
Package dsg @Author: asus @Description: $ @File: New @Data: 2022/2/2118:09
Index ¶
- Constants
- Variables
- func Listening(app *iris.Application)
- func Load(app *iris.Application, configPath string)
- func LoadMysql()
- func LoadRedisDefault()
- func LogError(msg string, data interface{})
- func LogInfo(msg string, data interface{})
- func MySqlDefault() *gorm.DB
- func RedisInit(conf env.Redis) *redis.Client
- type Api
- type ApiInterface
- type Base
- func (p *Base) CancelMustJsonParam()
- func (p *Base) CryptReceive() []byte
- func (p *Base) CryptSend(data []byte)
- func (p *Base) Ctx() iris.Context
- func (p *Base) DB() *gorm.DB
- func (p *Base) Init(data interface{})
- func (p *Base) InitAndBackParam(data interface{}) (param map[string]interface{})
- func (p *Base) Key() (rsa []byte)
- func (p *Base) MyId() uint32
- func (p *Base) MyIdToString() string
- func (p *Base) Page() int64
- func (p *Base) PageSize() int64
- func (p *Base) Redis() *RedisDsg
- func (p *Base) ReplaceParamColumn(data, old interface{}, requestParam map[string]interface{}) map[string]interface{}
- func (p *Base) SetMyId(id uint32)
- func (p *Base) Skip() int64
- func (p *Base) Success()
- func (p *Base) SuccessWithData(data interface{})
- func (p *Base) SuccessWithList(list interface{}, total interface{})
- func (p *Base) Token() (token string)
- func (p *Base) ValidateParam(data interface{})
- type ErrorLevel
- type RedisDsg
- func (p *RedisDsg) ErrRedisDel(key string) bool
- func (p *RedisDsg) ErrRedisExists(key string) (bool, bool)
- func (p *RedisDsg) ErrRedisExpire(key string, lifetime int) bool
- func (p *RedisDsg) ErrRedisGet(key string) (string, bool)
- func (p *RedisDsg) ErrRedisHDel(key, field string) bool
- func (p *RedisDsg) ErrRedisHExists(key, field string) (bool, bool)
- func (p *RedisDsg) ErrRedisHGet(key, field string) (string, bool)
- func (p *RedisDsg) ErrRedisHScan(key string, cursor uint64, match string, count int64) ([]string, uint64, bool)
- func (p *RedisDsg) ErrRedisHSet(key, field, value string) bool
- func (p *RedisDsg) ErrRedisIncr(key string) (int64, bool)
- func (p *RedisDsg) ErrRedisLRange(key string, start, end int64) ([]string, bool)
- func (p *RedisDsg) ErrRedisPop(key string) (string, bool)
- func (p *RedisDsg) ErrRedisPush(key, value string) bool
- func (p *RedisDsg) ErrRedisSMembers(key string) ([]string, bool)
- func (p *RedisDsg) ErrRedisSadd(key string, members ...interface{}) (int64, bool)
- func (p *RedisDsg) ErrRedisScan(cursor uint64, match string, count int64) ([]string, uint64, bool)
- func (p *RedisDsg) ErrRedisSet(key, value string, sec int) bool
- func (p *RedisDsg) ErrRedisZADD(key string, members ...*redis.Z) (int64, bool)
- func (p *RedisDsg) ErrRedisZIncrBy(key string, increment float64, member string) (float64, bool)
- func (p *RedisDsg) ErrRedisZRange(key string, start, stop int64) ([]string, bool)
- func (p *RedisDsg) ErrRedisZRevRange(key string, start, stop int64) ([]string, bool)
- func (p *RedisDsg) ErrRedisZRevRangeWithScores(key string, start, stop int64) ([]redis.Z, bool)
- func (p *RedisDsg) RedisDel(key string)
- func (p *RedisDsg) RedisExists(key string) bool
- func (p *RedisDsg) RedisExpire(key string, lifetime int)
- func (p *RedisDsg) RedisGet(key string) string
- func (p *RedisDsg) RedisHDel(key, field string)
- func (p *RedisDsg) RedisHExists(key, field string) bool
- func (p *RedisDsg) RedisHGet(key, field string) string
- func (p *RedisDsg) RedisHScan(key string, cursor uint64, match string, count int64) ([]string, uint64)
- func (p *RedisDsg) RedisHSet(key, field, value string)
- func (p *RedisDsg) RedisIncr(key string) int64
- func (p *RedisDsg) RedisLRange(key string, start, end int64) []string
- func (p *RedisDsg) RedisPop(key string) string
- func (p *RedisDsg) RedisPush(key, value string)
- func (p *RedisDsg) RedisSMembers(key string) []string
- func (p *RedisDsg) RedisSadd(key string, members ...interface{}) int64
- func (p *RedisDsg) RedisScan(cursor uint64, match string, count int64) ([]string, uint64)
- func (p *RedisDsg) RedisSet(key, value string, sec int)
- func (p *RedisDsg) RedisZADD(key string, members ...*redis.Z) int64
- func (p *RedisDsg) RedisZIncrBy(key string, increment float64, member string) float64
- func (p *RedisDsg) RedisZRange(key string, start, stop int64) []string
- func (p *RedisDsg) RedisZRevRange(key string, start, stop int64) []string
- func (p *RedisDsg) RedisZRevRangeWithScores(key string, start, stop int64) []redis.Z
- type ResJson
- type ResSign
- type Service
- type UpBase
Constants ¶
View Source
const (
CodeSuccess = 0
)
Variables ¶
View Source
var DB *gorm.DB
View Source
var ErrLevel = map[ErrorLevel]string{ LogLevelInfo: "info", LogLevelError: "error", }
Functions ¶
func LoadRedisDefault ¶ added in v1.0.0
func LoadRedisDefault()
func MySqlDefault ¶ added in v1.0.0
Types ¶
type ApiInterface ¶ added in v1.0.0
type ApiInterface interface {
Handler() int
}
type Base ¶ added in v1.0.0
type Base struct { Method string `json:"-"` Path string `json:"-"` Time time.Time `json:"-"` TimeStamp int64 `json:"-"` // 参数签名 RandomStr string `valid:"length(32|32)"` SignAt int64 `valid:"timestamp"` Sign string `valid:"-"` // contains filtered or unexported fields }
func (*Base) CancelMustJsonParam ¶ added in v1.0.0
func (p *Base) CancelMustJsonParam()
func (*Base) CryptReceive ¶ added in v1.0.0
CryptReceive 加密:后端--->前端
func (*Base) InitAndBackParam ¶ added in v1.0.0
InitAndBackParam Init返回前端传回的参数
func (*Base) MyIdToString ¶ added in v1.0.0
func (*Base) ReplaceParamColumn ¶ added in v1.0.0
func (*Base) SuccessWithData ¶ added in v1.0.0
func (p *Base) SuccessWithData(data interface{})
func (*Base) SuccessWithList ¶ added in v1.0.0
func (p *Base) SuccessWithList(list interface{}, total interface{})
func (*Base) ValidateParam ¶ added in v1.0.0
func (p *Base) ValidateParam(data interface{})
ValidateParam 参数校验
type ErrorLevel ¶ added in v1.0.0
type ErrorLevel int
const ( LogLevelInfo ErrorLevel = 1 + iota LogLevelError )
type RedisDsg ¶ added in v1.0.0
type RedisDsg struct {
Conn *redis.Client
}
func RedisDefault ¶ added in v1.0.0
func RedisDefault() *RedisDsg
func (*RedisDsg) ErrRedisDel ¶ added in v1.0.0
func (*RedisDsg) ErrRedisExists ¶ added in v1.0.0
func (*RedisDsg) ErrRedisExpire ¶ added in v1.0.0
func (*RedisDsg) ErrRedisGet ¶ added in v1.0.0
func (*RedisDsg) ErrRedisHDel ¶ added in v1.0.0
func (*RedisDsg) ErrRedisHExists ¶ added in v1.0.0
func (*RedisDsg) ErrRedisHGet ¶ added in v1.0.0
func (*RedisDsg) ErrRedisHScan ¶ added in v1.0.0
func (*RedisDsg) ErrRedisHSet ¶ added in v1.0.0
func (*RedisDsg) ErrRedisIncr ¶ added in v1.0.0
func (*RedisDsg) ErrRedisLRange ¶ added in v1.0.0
func (*RedisDsg) ErrRedisPop ¶ added in v1.0.0
func (*RedisDsg) ErrRedisPush ¶ added in v1.0.0
func (*RedisDsg) ErrRedisSMembers ¶ added in v1.0.0
func (*RedisDsg) ErrRedisSadd ¶ added in v1.0.0
func (*RedisDsg) ErrRedisScan ¶ added in v1.0.0
func (*RedisDsg) ErrRedisSet ¶ added in v1.0.0
func (*RedisDsg) ErrRedisZADD ¶ added in v1.0.0
set 类型 ***************************** 有序合集 set *****************************
func (*RedisDsg) ErrRedisZIncrBy ¶ added in v1.0.0
func (*RedisDsg) ErrRedisZRange ¶ added in v1.0.0
***************************** ZRange *****************************
func (*RedisDsg) ErrRedisZRevRange ¶ added in v1.0.0
***************************** ZRevRange *****************************
func (*RedisDsg) ErrRedisZRevRangeWithScores ¶ added in v1.0.0
***************************** ZRevRangeWithScores *****************************
func (*RedisDsg) RedisExists ¶ added in v1.0.0
func (*RedisDsg) RedisExpire ¶ added in v1.0.0
func (*RedisDsg) RedisHExists ¶ added in v1.0.0
func (*RedisDsg) RedisHScan ¶ added in v1.0.0
func (*RedisDsg) RedisLRange ¶ added in v1.0.0
func (*RedisDsg) RedisSMembers ¶ added in v1.0.0
func (*RedisDsg) RedisZIncrBy ¶ added in v1.0.0
func (*RedisDsg) RedisZRange ¶ added in v1.0.0
func (*RedisDsg) RedisZRevRange ¶ added in v1.0.0
func (*RedisDsg) RedisZRevRangeWithScores ¶ added in v1.0.0
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
render
Package render @Author: asus @Description: $ @File: category_render @Data: 2022/2/2816:48
|
Package render @Author: asus @Description: $ @File: category_render @Data: 2022/2/2816:48 |
cond
Package cond @Author: asus @Description: $ @File: cond @Data: 2022/4/129:54
|
Package cond @Author: asus @Description: $ @File: cond @Data: 2022/4/129:54 |
service
|
|
aesService/ecb_aes
Package ecb_aes @Author: asus @Description: $ @File: aes_decrypt @Data: 2022/8/1917:12
|
Package ecb_aes @Author: asus @Description: $ @File: aes_decrypt @Data: 2022/8/1917:12 |
fileService
Package fileService @Author: asus @Description: $ @File: router.go @Data: 2022/4/1116:51
|
Package fileService @Author: asus @Description: $ @File: router.go @Data: 2022/4/1116:51 |
grpcService/userCard
Package userCard @Author: asus @Description: $ @File: userCard @Data: 2022/4/116:46
|
Package userCard @Author: asus @Description: $ @File: userCard @Data: 2022/4/116:46 |
grpcService/userHistory
Package userHistory @Author: asus @Description: $ @File: userHistory @Data: 2022/4/116:53
|
Package userHistory @Author: asus @Description: $ @File: userHistory @Data: 2022/4/116:53 |
validatorService
Package frame @Author: asus @Description: $ @File: registerValidation @Data: 2021/12/311:16
|
Package frame @Author: asus @Description: $ @File: registerValidation @Data: 2021/12/311:16 |
Package service @Author: asus @Description: $ @File: random @Data: 2021/12/2318:44
|
Package service @Author: asus @Description: $ @File: random @Data: 2021/12/2318:44 |
guzzle
Package guzzle @Author: asus @Description: $ @File: client @Data: 2022/1/2016:41
|
Package guzzle @Author: asus @Description: $ @File: client @Data: 2022/1/2016:41 |
Click to show internal directories.
Click to hide internal directories.