Documentation ¶
Index ¶
- Constants
- Variables
- func CreatNestedFile(path string) (*os.File, error)
- func CreateUrl(c *gin.Context)
- func Decode62To10(val string) (uint, error)
- func Encode10To62(val uint) string
- func Exists(name string) bool
- func GetUrl(c *gin.Context)
- func GetUrlJSON(c *gin.Context)
- func Index(c *gin.Context)
- func Init() bool
- func InitConf(conf string) bool
- func InitGin(r *gin.Engine)
- func IsEmpty(name string) (bool, error)
- func RandomStr(str string) string
- func ReadConf(conf string) bool
- func RelativePath(name string) string
- func Run()
- type CommonConf
- type ConfigConf
- type DatabaseConf
- type Url
Constants ¶
View Source
const ( // 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ SCALE = 62 REGEX = "^[0-9a-zA-Z]+$" NUM = 6 )
Variables ¶
View Source
var CHARS = "InsV3Sf0obzp2i4gj1yYGqQv6wUtmBxlMAP7KHd8uTXFk9aRJWNC5EOhZDcLer"
View Source
var Config = new(ConfigConf)
View Source
var DB *gorm.DB
Functions ¶
func CreatNestedFile ¶
CreatNestedFile 给定path创建文件,如果目录不存在就递归创建
func Decode62To10 ¶
func Encode10To62 ¶
func GetUrlJSON ¶
Types ¶
type CommonConf ¶
type ConfigConf ¶
type ConfigConf struct { Common CommonConf `yaml:"common"` Database DatabaseConf `yaml:"database"` }
type DatabaseConf ¶
Click to show internal directories.
Click to hide internal directories.