server

package
v0.0.0-...-e1ed8ea Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDirsFinder

func NewDirsFinder(dirs ...string) *dirsFinder

func RunServer

func RunServer(cfg *Config, handler http.Handler)

Types

type Config

type Config struct {
	Hostname      string `toml:"hostname" yaml:"hostname" env:"SERVICE_HOSTNAME" env-default:""`
	ListenAddress string `toml:"listen_address" yaml:"listen_address" env:"SERVICE_LISTEN_ADDRESS" env-default:"localhost"`
	Port          int    `toml:"port" yaml:"port" env:"SERVICE_PORT" env-default:""`
}

func NewConfig

func NewConfig(path string) *Config

type TemplateFinder

type TemplateFinder interface {
	Find(templateName string) (*template.Template, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳