Documentation ¶
Index ¶
- func ClientIP(c *gin.Context) string
- func CreateToken(appId string, openid int64) (tokenStr string, err error)
- func GrpcContext(c *gin.Context) context.Context
- func Handler(controller iController) gin.HandlerFunc
- func LoadJsonConfig(jsonFile string, conf interface{}) (err error)
- func LoadYamlConfig(yamlFile string, conf interface{}) (err error)
- func RequestBody(c *gin.Context) interface{}
- func RequestId(c *gin.Context) string
- func ValidationMessage(err error, messages map[string]string) string
- type Config
- type Encryption
- type LocalUpload
- type Option
- func CorsHeaderOption(corsHeaders ...string) Option
- func EnableEncryptionOption(encryptKey, encryptSecret string, excludeUris ...string) Option
- func EnvOption(env goio.Environment) Option
- func NoAccessPathsOption(noAccessPaths ...string) Option
- func NoLogPathsOption(noLogPaths ...string) Option
- func PProfEnableOption(pprofEnable bool) Option
- func ServerNameOption(serverName string) Option
- type Response
- type Server
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateToken ¶ added in v1.2.95
func LoadJsonConfig ¶ added in v1.2.95
func LoadYamlConfig ¶ added in v1.2.95
Types ¶
type Config ¶ added in v1.2.95
type Config struct { Env goio.Environment `yaml:"env"` Server struct { Addr string `yaml:"addr"` Name string `yaml:"name"` } `yaml:"server"` Prometheus prometheusx.Config `yaml:"prometheus"` MongoDB gomongo.Config `yaml:"mongodb"` Mysql gogorm.Config `yaml:"mysql"` Postgres gogorm.Config `yaml:"postgres"` Sqlite gogorm.Config `yaml:"sqlite"` Clickhouse1 gogorm.Config `yaml:"clickhouse1"` Redis goredis.Config `yaml:"redis"` Kafka gokafka.Config `yaml:"kafka"` Clickhouse goclickhouse.Config `yaml:"clickhouse"` Es goes.Config `yaml:"es"` Etcd goetcd.Config `yaml:"etcd"` FeiShu string `yaml:"feishu"` }
type Encryption ¶ added in v1.2.95
type LocalUpload ¶ added in v1.2.95
type LocalUpload struct { }
type Option ¶ added in v1.2.95
type Option interface {
// contains filtered or unexported methods
}
func EnableEncryptionOption ¶ added in v1.2.95
启用加密传输
func NoAccessPathsOption ¶ added in v1.2.95
禁止访问的path
func NoLogPathsOption ¶ added in v1.2.95
不记录日志的path
type Response ¶ added in v1.2.95
type Response struct { Code int32 `json:"code"` Message string `json:"message"` Data interface{} `json:"data"` Errors []interface{} `json:"-"` }
func ErrorWithValidate ¶ added in v1.2.95
Click to show internal directories.
Click to hide internal directories.