Versions in this module Expand all Collapse all v1 v1.0.0 Dec 7, 2024 Changes in this version + const ErrCodeDefault + const ErrCodeFrequentRequests + const ErrCodeLoginFailed + const FTS_SEARCH_END_IDX + const FTS_SEARCH_START_IDX + var FtsSearchIdxLen = len(FTS_SEARCH_START_IDX) + len(FTS_SEARCH_END_IDX) + func AtoISlice(originSlice []string) (strSlice []int, err error) + func CreateSlice[T int | string | interface{}](length int, value T) []T + func ItoaSlice(originSlice []int) []string + func NewSettings() (s settings, err error) + func NewTmplManager(name string) *tmplManager + func P(err error) + func PanicErr(message string, code int) + type App struct + Cache Cache + O *orm + OssClient *oss + RootCmd *cli.App + Settings *settings + TmplManager *tmplManager + TokenAuth *jwtauth.JWTAuth + Validator *Validator + func NewApp() *App + func (app *App) AddSubcommand(cmd *cli.Command) + func (app *App) HTML(w http.ResponseWriter, tmplName string, data any) error + func (app *App) InitCache() error + func (app *App) InitORM() error + func (app *App) InitOSS() error + func (app *App) InitSetting() error + func (app *App) InitTmpl() error + func (app *App) InitTokenAuth() + func (app *App) InitValidator() + func (app *App) IsDev() bool + func (app *App) JSON(w http.ResponseWriter, data any) error + func (app *App) Run() error + type AtomicLock struct + func (l *AtomicLock) TryLock() bool + func (l *AtomicLock) Unlock() + type Cache interface + Del func(key string) bool + Get func(key string) any + Set func(key string, value any, ttl time.Duration) bool + TTL func(key string) time.Duration + func NewCache(addr string) (cache Cache, err error) + type Err struct + Code int + Message string + func NewErr(message string, code int) *Err + func (e *Err) Error() string + type SystemSet struct + AttachmentCDN string + TokenExpiryHours time.Duration + type Validator struct + func NewValidator() *Validator + func (v *Validator) Struct(data any) map[string]string