web

package
v0.0.0-...-5c8fa84 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: AGPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FuncMap = map[string]interface{}{
	"size": SizeFunc,
	"sizef": func(size float64) string {
		return SizeFunc(int64(size))
	},
	"ms": func(d time.Duration) string {

		return fmt.Sprintf("%d ms", d.Milliseconds())
	},
}

Functions

func LoginEndpoints

func LoginEndpoints(e *echo.Echo, cookieSecret string, domain string)

func Module

func Module(ball *mud.Ball)

func NewDevRender

func NewDevRender() echo.Renderer

func NewProdRender

func NewProdRender() echo.Renderer

func SizeFunc

func SizeFunc(size int64) string

Types

type DynamicTemplate

type DynamicTemplate struct{}

func (*DynamicTemplate) Render

func (t *DynamicTemplate) Render(w io.Writer, name string, data interface{}, c echo.Context) error

type Server

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

func NewServer

func NewServer(nodes *db.Persistence, port int, cookieSecret string, domain string) *Server

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

type Template

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

func (*Template) Render

func (t *Template) Render(w io.Writer, name string, data interface{}, c echo.Context) error

Jump to

Keyboard shortcuts

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