Documentation
¶
Index ¶
- Constants
- type App
- func (a *App) AuthService() *auth.Service
- func (a *App) Bundle() *i18n.Bundle
- func (a *App) CSRF(next http.Handler) http.Handler
- func (a *App) Cache() cache.Cache
- func (a *App) CacheByAlias(alias string) (cache.Cache, error)
- func (a *App) CacheStats() []cache.Stats
- func (a *App) CheckCaches(ctx context.Context) error
- func (a *App) CloseDB() error
- func (a *App) Config() Settings
- func (a *App) Context(r *http.Request, data Data) Data
- func (a *App) DB() (*gorm.DB, error)
- func (a *App) DBByAlias(alias string) (*gorm.DB, error)
- func (a *App) DBFor(entity any) (*gorm.DB, error)
- func (a *App) Describe(entity any) (*model.Schema, error)
- func (a *App) Handler() http.Handler
- func (a *App) Jobs() *jobs.Runner
- func (a *App) Locale(r *http.Request) *i18n.Locale
- func (a *App) Locales() *i18n.Detector
- func (a *App) Log() *slog.Logger
- func (a *App) ManageableSessions() (session.ManageableStore, bool)
- func (a *App) MediaURL(ref upload.Ref) string
- func (a *App) Models() []model.Model
- func (a *App) PermissionResources() ([]string, error)
- func (a *App) Pool() (*sql.DB, error)
- func (a *App) ProbeCaches(ctx context.Context) []cache.Status
- func (a *App) Queue() jobs.Queue
- func (a *App) RegisterModel(models ...model.Model)
- func (a *App) Registry() *model.Registry
- func (a *App) Render(w http.ResponseWriter, r *http.Request, page string, data Data)
- func (a *App) RenderStatus(w http.ResponseWriter, r *http.Request, status int, page string, data Data)
- func (a *App) Run() error
- func (a *App) Serve() error
- func (a *App) SessionStore() session.Store
- func (a *App) SetNotFound(handler http.Handler)
- func (a *App) Static(prefix string, fsys fs.FS)
- func (a *App) StaticURL(name string) string
- func (a *App) Store() (model.Store, error)
- func (a *App) StoreFor(entity any) (model.Store, error)
- func (a *App) StoreForAlias(alias string) (model.Store, error)
- func (a *App) SyncPermissions(ctx context.Context) (auth.SyncReport, error)
- func (a *App) Transaction(ctx context.Context, fn func(*Tx) error) error
- func (a *App) Use(mw ...Middleware)
- func (a *App) Worker(workers int, queues []string) (*jobs.Runner, error)
- type Data
- type Middleware
- type Route
- type Router
- type Settings
- type Tx
- type UnreachableCache
Constants ¶
View Source
const ( SweepUploads = "coyote.uploads.sweep" SweepTokens = "coyote.tokens.sweep" )
View Source
const Version = "0.1.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
*router.Router
Settings Settings
Logger *slog.Logger
Sessions *session.Manager
Auth *auth.Service
Templates *template.Engine
Uploads *upload.Service
Started time.Time
// contains filtered or unexported fields
}
func (*App) AuthService ¶
func (*App) CacheStats ¶
func (*App) ManageableSessions ¶
func (a *App) ManageableSessions() (session.ManageableStore, bool)
func (*App) PermissionResources ¶
func (*App) RegisterModel ¶
func (*App) RenderStatus ¶
func (*App) SessionStore ¶
func (*App) SetNotFound ¶
func (*App) SyncPermissions ¶
func (*App) Use ¶
func (a *App) Use(mw ...Middleware)
type Middleware ¶
type Middleware = router.Middleware
type UnreachableCache ¶
func (*UnreachableCache) Error ¶
func (e *UnreachableCache) Error() string
func (*UnreachableCache) Unwrap ¶
func (e *UnreachableCache) Unwrap() error
Click to show internal directories.
Click to hide internal directories.