web

package
v0.0.0-...-de806f4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Server

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

func NewServer

func NewServer(
	config *ServerConfig,
	template *Template,
	controller *controller.Controller,
) *Server

func (*Server) Shutdown

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

func (*Server) Start

func (s *Server) Start() error

type ServerConfig

type ServerConfig struct {
	Port   int    `env:"PORT" envDefault:"8080"`
	Origin string `env:"ORIGIN,required"`
}

func (ServerConfig) Secure

func (s ServerConfig) Secure() bool

type Template

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

func NewTemplate

func NewTemplate(cfg *TemplateConfig) *Template

func (*Template) Render

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

type TemplateConfig

type TemplateConfig struct {
	Origin string `env:"ORIGIN,required"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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