cmd

package
v0.0.0-...-4b7e737 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TemplatesPath string        `env:"TEMPLATES_PATH" envDefault:"cmd/testdata/"`
	RenderTimeout time.Duration `env:"RENDER_TIMEOUT" envDefault:"10s"`
	ServerHost    string        `env:"SERVER_HOST" envDefault:"localhost"`
	ServerPort    int           `env:"SERVER_PORT" envDefault:"8080"`

	ViewportHeight int `env:"VIEWPORT_HEIGHT" envDefault:"2048"`
	ViewportWidth  int `env:"VIEWPORT_WIDTH" envDefault:"1920"`
}

func ParseConfig

func ParseConfig() (Config, error)

func (Config) BaseUrl

func (config Config) BaseUrl() string

type Module

type Module struct {
	Config Config

	Server *Server
	// contains filtered or unexported fields
}

func NewModule

func NewModule(config Config) *Module

type Server

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

func NewServer

func NewServer(config Config, templateService business.TemplateService, engine data.TemplateEngine, reportService business.ReportService) *Server

func (*Server) Start

func (s *Server) Start() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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