Documentation ¶
Overview ¶
Package dsg @Author: asus @Description: $ @File: New @Data: 2022/2/2118:09
Index ¶
- Constants
- Variables
- func AESDeCode(data []byte) string
- func AESEnCode(data string) []byte
- func CheckIDCard(idCard string) bool
- func CheckMobile(mobile string) bool
- func CreateToken(UserID uint32, ExpiresAt time.Duration) string
- func DB() *gorm.DB
- func Default(list ...option)
- func EnIDCard(idCard string) string
- func EnMobile(mobile string) string
- func GetServiceList(serverName string) []etcd.Service
- func Listening(Port int, Tls string, app *iris.Application)
- func Load(configPath string)
- func LoadYml(out interface{}, configPath string)
- func Login(ctx iris.Context)
- func MiddlewareJwt(ctx iris.Context)
- func OptionAes(aesKey string) option
- func OptionEtcd(conf etcd.Config) func() error
- func OptionJwt(JwtKey string) func() error
- func OptionMysql(info mysql.DBInfo) func() error
- func OptionRedis(config redis.Config) func() error
- func ParseToken(token string) *jwt.MapClaims
- func Redis() *redis2.Client
- type Base
- 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() *redis.Client
- 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 Config
- type ResJson
- type ResSign
- type Response
Constants ¶
View Source
const (
CodeSuccess = 0
)
Variables ¶
View Source
var Etcd *etcd.Handler
Functions ¶
func CheckIDCard ¶
func CheckMobile ¶
func CreateToken ¶
CreateToken 创建Token
func GetServiceList ¶ added in v2.0.8
func OptionEtcd ¶
func OptionMysql ¶
func OptionRedis ¶
Types ¶
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
func (*Base) InitAndBackParam ¶
InitAndBackParam Init返回前端传回的参数
func (*Base) MyIdToString ¶
func (*Base) ReplaceParamColumn ¶
func (*Base) SuccessWithData ¶
func (p *Base) SuccessWithData(data interface{})
func (*Base) SuccessWithList ¶
func (p *Base) SuccessWithList(list interface{}, total interface{})
type Config ¶ added in v2.0.8
type Config struct { TLS string `yaml:"tls"` Etcd etcd.Config `yaml:"etcd"` DBInfo mysql.DBInfo `yaml:"db_info"` Redis redis.Config `yaml:"redis"` JwtKey string `yaml:"jwt_key"` AesKey string `yaml:"aes_key"` }
var Conf Config
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
example
|
|
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 |
pkg
|
|
aes/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 |
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 |
util
Package service @Author: asus @Description: $ @File: random @Data: 2021/12/2318:44
|
Package service @Author: asus @Description: $ @File: random @Data: 2021/12/2318:44 |
validator
Package validator @Author: asus @Description: $ @File: registerValidation @Data: 2021/12/311:16
|
Package validator @Author: asus @Description: $ @File: registerValidation @Data: 2021/12/311:16 |
Click to show internal directories.
Click to hide internal directories.