server

package
v0.0.0-...-bc17f5c Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUsernameOrPasswordIncorrect = errors.New("username or password incorrect")
)

Functions

func Context

func Context(ctx context.Context, a *model.Account) context.Context

func FromContext

func FromContext(ctx context.Context) *model.Account

Types

type IndexPage

type IndexPage struct {
	context.Context
	*guard.Guard
}

func (*IndexPage) Title

func (p *IndexPage) Title() string

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(
	h hash.Hasher,
	g gen.Generater,
	m memory.Memorer,
	str *Store,
) (*Server, error)

func (*Server) Router

func (s *Server) Router() http.Handler

type SignInPage

type SignInPage struct {
	context.Context
	*guard.Guard
	Username string
}

func (*SignInPage) Title

func (p *SignInPage) Title() string

type Store

type Store struct {
	Office  office.Repositer
	Account account.Repositer
}

Jump to

Keyboard shortcuts

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