Versions in this module Expand all Collapse all v1 v1.0.0 Feb 14, 2024 Changes in this version + const AfterUpdateHook + var DB *gorm.DB + var FS *embed.FS + var Flags = KeySet + var Hooks = AppHooks + var Properties = map[string]string + func AddModelHook(modelName, hookType string, fn func(*gorm.DB)) + func DeleteSession(key string) + func PutSession(key string, session *Session) + type AppHooks struct + Models map[string]map[string]*ModelHook + type Hook struct + Funcs []T + Names []string + func (h *Hook[T]) Add(name string, hook T) *Hook[T] + func (h *Hook[T]) After(name string) *Hook[T] + func (h *Hook[T]) Before(name string) *Hook[T] + func (h *Hook[T]) Index() int + func (h *Hook[T]) Remove(name string) *Hook[T] + type KeySet struct + func (s *KeySet) Add(key string) + func (s *KeySet) Clear() + func (s *KeySet) Has(key ...string) bool + func (s *KeySet) HasOne(keys ...string) bool + type ModelHook struct + func GetModelHook(modelName, hookType string) *ModelHook + func (h *ModelHook) Run(db *gorm.DB) + type Session struct + func CreateSession() *Session + func FindSession(key string) *Session + func GetSession(c *gin.Context) *Session + func (s *Session) Check(c *gin.Context, permissions ...string) message.Message + func (s *Session) CheckOne(c *gin.Context, permissions ...string) message.Message + func (s *Session) Get(key string) interface{} + func (s *Session) Has(permissions ...string) bool + func (s *Session) HasOne(permissions ...string) bool + func (s *Session) IsExpired() bool + func (s *Session) RefreshExpiration() + func (s *Session) Set(key string, value interface{}) + func (s *Session) SetExpired() + type SessionModel struct + EXPIRES_AT time.Time + KEY string + PROPERTIES string + func (s SessionModel) TableName() string + type Webhook struct + BODY string + CONTEXT string + ID_WEBHOOK int + METHOD string + QUERY_ARGS string + TYPE string + URL string + func (Webhook) TableName() string