Documentation
¶
Index ¶
- func CheckPassword(password, plain string) bool
- func Err(c *Ctx, statusCode, code int) error
- func Error(c *Ctx, statusCode int, err error) error
- func GetAdminObjects() []model.AdminObject
- func HashPassword(password string) string
- func I32(c *Ctx, key string, defaultValue ...string) int32
- func I64(c *Ctx, key string, defaultValue ...string) int64
- func IP(c *Ctx) string
- func Int(c *Ctx, key string, defaultValue ...string) int
- func Lang() string
- func Msg(c *Ctx, code int, msg string) error
- func Ok(c *fiber.Ctx, data interface{}) error
- func Push(c *fiber.Ctx, code int) error
- func RegisterAPIAuth(fn func(ctx *fiber.Ctx) error)
- func RegisterAPICheckRouter(routerType string, f func(fiber.Router))
- func RegisterAPINoCheckRouter(routerType string, f func(fiber.Router))
- func RegisterAdminAuth(fn func(ctx *fiber.Ctx) error)
- func RegisterAdminCheckRouter(routerType string, f func(fiber.Router))
- func RegisterAdminObject(objs []model.AdminObject)
- func RegisterDatabase(dbType string, f func([]*gorm.DB))
- func RegisterPublicNoCheckRouter(routerType string, f func(fiber.Router))
- func RegisterRootCheckRouter(routerType string, f func(fiber.Router))
- func Render(c *Ctx, name string, bind interface{}, layouts ...string) error
- func SafeCall(f func() error, failHandle func(error)) error
- func SetLang(l string)
- func SetupDatabase(dbs []*gorm.DB)
- func SetupRouter(app *fiber.App)
- func Str(c *Ctx, key string, defaultValue ...string) string
- func StructAsMap(form any, fields []string) (vals map[string]any)
- func U32(c *Ctx, key string, defaultValue ...string) uint32
- func U64(c *Ctx, key string, defaultValue ...string) uint64
- func Uint(c *Ctx, key string, defaultValue ...string) uint
- func Validate(i interface{}) error
- func ViewEngineStart() *html.Engine
- type Ctx
- type ExpiredLRUCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
func GetAdminObjects ¶
func GetAdminObjects() []model.AdminObject
func HashPassword ¶
func RegisterAPIAuth ¶ added in v0.2.1
func RegisterAPIAuth(fn func(ctx *fiber.Ctx) error)
func RegisterAPICheckRouter ¶ added in v0.2.0
func RegisterAPICheckRouter(routerType string, f func(fiber.Router))
func RegisterAPINoCheckRouter ¶ added in v0.2.0
func RegisterAPINoCheckRouter(routerType string, f func(fiber.Router))
func RegisterAdminAuth ¶ added in v0.2.1
func RegisterAdminAuth(fn func(ctx *fiber.Ctx) error)
func RegisterAdminCheckRouter ¶
func RegisterAdminCheckRouter(routerType string, f func(fiber.Router))
func RegisterAdminObject ¶
func RegisterAdminObject(objs []model.AdminObject)
func RegisterDatabase ¶
func RegisterPublicNoCheckRouter ¶ added in v0.2.1
func RegisterPublicNoCheckRouter(routerType string, f func(fiber.Router))
func RegisterRootCheckRouter ¶ added in v0.2.0
func RegisterRootCheckRouter(routerType string, f func(fiber.Router))
func SetupDatabase ¶
func SetupRouter ¶
func SetupRouter(app *fiber.App)
func ViewEngineStart ¶
func ViewEngineStart() *html.Engine
Types ¶
type ExpiredLRUCache ¶
type ExpiredLRUCache[K comparable, V any] struct { *lru.Cache[K, expiredLRUCacheValue[V]] // contains filtered or unexported fields }
func NewExpiredLRUCache ¶
func NewExpiredLRUCache[K comparable, V any](size int, expired time.Duration) *ExpiredLRUCache[K, V]
func (*ExpiredLRUCache[K, V]) Add ¶
func (c *ExpiredLRUCache[K, V]) Add(key K, value V) (evicted bool)
func (*ExpiredLRUCache[K, V]) Contains ¶
func (c *ExpiredLRUCache[K, V]) Contains(key K) bool
func (*ExpiredLRUCache[K, V]) Get ¶
func (c *ExpiredLRUCache[K, V]) Get(key K) (value V, ok bool)
func (*ExpiredLRUCache[K, V]) Remove ¶
func (c *ExpiredLRUCache[K, V]) Remove(key K) (present bool)
Click to show internal directories.
Click to hide internal directories.