admin

package
v0.0.0-...-a1a91b8 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminRouter

func AdminRouter(dbpool *pgxpool.Pool) *mux.Router

Types

type App

type App struct {
	DB           *pgxpool.Pool
	BustCssCache string
	BustJsCache  string
	SessionStore *redistore.RediStore
}

func (*App) Authenticate

func (app *App) Authenticate(w http.ResponseWriter, r *http.Request)

func (*App) CreateArticle

func (app *App) CreateArticle(w http.ResponseWriter, r *http.Request)

func (*App) CreateUser

func (app *App) CreateUser(w http.ResponseWriter, r *http.Request)

func (*App) Dashboard

func (app *App) Dashboard(w http.ResponseWriter, r *http.Request)

func (*App) DeleteArticle

func (app *App) DeleteArticle(w http.ResponseWriter, r *http.Request)

func (*App) DeleteUser

func (app *App) DeleteUser(w http.ResponseWriter, r *http.Request)

func (*App) ListArticles

func (app *App) ListArticles(w http.ResponseWriter, r *http.Request)

func (*App) ListUsers

func (app *App) ListUsers(w http.ResponseWriter, r *http.Request)

func (*App) Logout

func (app *App) Logout(w http.ResponseWriter, r *http.Request)

func (*App) RegisterUser

func (app *App) RegisterUser(w http.ResponseWriter, r *http.Request)

func (*App) UpdateArticle

func (app *App) UpdateArticle(w http.ResponseWriter, r *http.Request)

func (*App) UpdateUser

func (app *App) UpdateUser(w http.ResponseWriter, r *http.Request)

func (*App) ViewArticle

func (app *App) ViewArticle(w http.ResponseWriter, r *http.Request)

func (*App) ViewUser

func (app *App) ViewUser(w http.ResponseWriter, r *http.Request)

type ArticlePageData

type ArticlePageData struct {
	ID           string
	Title        string
	Description  sql.NullString
	Keywords     sql.NullString
	Body         string
	BustCssCache string
	BustJsCache  string
}

type ArticleUpdateTemplate

type ArticleUpdateTemplate struct {
	Title            string
	Description      sql.NullString
	Keywords         sql.NullString
	Body             string
	ValidationErrors map[string]string
	Article          types.Article
	BustCssCache     string
	BustJsCache      string
}

type ArticlesPageData

type ArticlesPageData struct {
	Title        string
	Description  sql.NullString
	Keywords     sql.NullString
	Articles     []types.Article
	BustCssCache string
	BustJsCache  string
}

type AuthTemplate

type AuthTemplate struct {
	Title            string
	Description      string
	Keywords         string
	Body             string
	ValidationErrors map[string]string
	Auth             types.Auth
	BustCssCache     string
	BustJsCache      string
}

type UserCreateTemplate

type UserCreateTemplate struct {
	Title            string
	Body             string
	ValidationErrors map[string]string
	User             types.CreateUser
	BustCssCache     string
	BustJsCache      string
}

type UserRegistrationTemplate

type UserRegistrationTemplate struct {
	Title            string
	Description      string
	Keywords         string
	Body             string
	ValidationErrors map[string]string
	User             types.RegisterUser
	BustCssCache     string
	BustJsCache      string
}

type UserUpdateTemplate

type UserUpdateTemplate struct {
	Title            string
	Body             string
	ValidationErrors map[string]string
	User             types.User
	BustCssCache     string
	BustJsCache      string
}

type UsersPageData

type UsersPageData struct {
	Title        string
	Users        []types.User
	BustCssCache string
	BustJsCache  string
}

Jump to

Keyboard shortcuts

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