app

package
v0.0.0-...-f6da3f2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Router chi.Router

	Config   config.Config
	Database *sql.Base
}

func NewApp

func NewApp(cfg config.Config, db *sql.Base) *App

func (*App) Account

func (a *App) Account(q ...sql.Querier) *sql.AccountStore

func (*App) Blog

func (a *App) Blog(q ...sql.Querier) *sql.BlogStore

func (*App) Logger

func (a *App) Logger(next http.Handler) http.Handler

func (*App) Post

func (a *App) Post(q ...sql.Querier) *sql.PostStore

func (*App) WriteError

func (a *App) WriteError(w http.ResponseWriter, r *http.Request, status int, messages ...string)

WriteError writes an error message to w. If one or more messages are passed, a JSON response is also sent, with the first message becoming `error` and the second becoming `error_description`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL