server

package
v0.0.0-...-eaf11b8 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2019 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DataDir = "."

DataDir points to the directory where the public/ and templates/ directories are.

Functions

This section is empty.

Types

type Breadcrumb struct {
	// contains filtered or unexported fields
}
func (b *Breadcrumb) Add(title, path string, active bool)
func (b *Breadcrumb) Items() []BreadcrumbItem
type BreadcrumbItem struct {
	Title  string
	Path   string
	Active bool
}

type Context

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

func NewContext

func NewContext(r *http.Request, w http.ResponseWriter) *Context

func (*Context) ActiveTab

func (c *Context) ActiveTab() string

func (*Context) Breadcrumb

func (c *Context) Breadcrumb() *Breadcrumb

func (*Context) Data

func (c *Context) Data() interface{}

func (*Context) NoLayout

func (c *Context) NoLayout() bool

func (*Context) Params

func (c *Context) Params() httprouter.Params

func (*Context) SetActiveTab

func (c *Context) SetActiveTab(activeTab string)

func (*Context) SetData

func (c *Context) SetData(data interface{})

func (*Context) SetNoLayout

func (c *Context) SetNoLayout(noLayout bool)

func (*Context) SetParams

func (c *Context) SetParams(ps httprouter.Params)

func (*Context) SetStart

func (c *Context) SetStart(start time.Time)

func (*Context) SetTitle

func (c *Context) SetTitle(title string)

func (*Context) SetUser

func (c *Context) SetUser(user *models.User)

func (*Context) Start

func (c *Context) Start() time.Time

func (*Context) Title

func (c *Context) Title() string

func (*Context) User

func (c *Context) User() *models.User

type HandlerFunc

type HandlerFunc func(w http.ResponseWriter, r *http.Request)

type Server

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

func New

func New(conf *config.Config, db db.DB) (*Server, error)

func (*Server) HandleDashboard

func (s *Server) HandleDashboard(w http.ResponseWriter, r *http.Request)

func (*Server) HandleDeleteLog

func (s *Server) HandleDeleteLog(w http.ResponseWriter, r *http.Request)

func (*Server) HandleDownloadLog

func (s *Server) HandleDownloadLog(w http.ResponseWriter, r *http.Request)

func (*Server) HandleGetLog

func (s *Server) HandleGetLog(w http.ResponseWriter, r *http.Request)

func (*Server) HandleGetLogs

func (s *Server) HandleGetLogs(w http.ResponseWriter, r *http.Request)

func (*Server) HandleGetSignIn

func (s *Server) HandleGetSignIn(w http.ResponseWriter, r *http.Request)

func (*Server) HandlePatchLog

func (s *Server) HandlePatchLog(w http.ResponseWriter, r *http.Request)

func (*Server) HandlePostLog

func (s *Server) HandlePostLog(w http.ResponseWriter, r *http.Request)

func (*Server) HandlePostSignIn

func (s *Server) HandlePostSignIn(w http.ResponseWriter, r *http.Request)

func (*Server) HandlePostSignOut

func (s *Server) HandlePostSignOut(w http.ResponseWriter, r *http.Request)

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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