http

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(config *Config)

Types

type Addr

type Addr struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
}

type Config

type Config struct {
	Server ServConf `yaml:"server"`
	View   View     `yaml:"view"`
	Test   Test     `yaml:"test"`
}

func GetConfig

func GetConfig() *Config

type Handler

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

func NewHandler

func NewHandler() *Handler

func (*Handler) Routers

func (h *Handler) Routers() *router.Routers

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(response http.ResponseWriter, request *http.Request)

type ServConf

type ServConf struct {
	Addr     Addr   `yaml:"addr"`
	LogDir   string `yaml:"log-dir"`
	LogLevel string `yaml:"log-level"`
}

type Server

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

func NewServer

func NewServer(config *Config) *Server

func (*Server) Config

func (s *Server) Config() *Config

func (*Server) SetHandler

func (s *Server) SetHandler(handler *Handler)

func (*Server) Start

func (s *Server) Start()

type Test

type Test struct {
	Open string `yaml:"open"`
}

type View

type View struct {
	Path   string `yaml:"path"`
	Static string `yaml:"static"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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