Version: v0.0.0-...-d78814b Latest Latest

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

Go to latest
Published: Oct 22, 2019 License: GPL-2.0 Imports: 3 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Account

type Account struct {
	Username     string
	OldPassword  string
	NewPassword  string
	NewPassword2 string
	Email        string
	Name         string

Account is for updating account settings.

func (Account) Validate

func (f Account) Validate() error

Validate the account form.

type Contact

type Contact struct {
	Name    string
	Email   string
	Subject string
	Message string
	Trap1   string // 'contact'
	Trap2   string // 'website'

Contact form for the site admin.

func (*Contact) ParseForm

func (c *Contact) ParseForm(r *http.Request)

ParseForm parses the form.

func (Contact) Validate

func (c Contact) Validate() error

Validate the form.

type Login

type Login struct {
	Username string
	Password string

Login is for signing into an account.

func (Login) Validate

func (f Login) Validate() error

Validate the form.

type Settings

type Settings struct {
	Title        string
	Description  string
	AdminEmail   string
	URL          string
	NSFW         bool
	PostsPerPage int
	PostsPerFeed int
	RedisEnabled bool
	RedisHost    string
	RedisPort    int
	RedisDB      int
	RedisPrefix  string
	MailEnabled  bool
	MailSender   string
	MailHost     string
	MailPort     int
	MailUsername string
	MailPassword string

Settings are the user-facing admin settings.

func (Settings) Validate

func (f Settings) Validate() error

Validate the form.

type Setup

type Setup struct {
	Username string
	Password string
	Confirm  string

Setup is for the initial blog setup page at /initial-setup.

func (*Setup) ParseForm

func (f *Setup) ParseForm(r *http.Request)

Parse form values.

func (Setup) Validate

func (f Setup) Validate() error

Validate the form.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL