server

package
v0.0.0-...-f809b4b Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(res http.ResponseWriter, code int, err error)

Error ...

func Message

func Message(status bool, message string) map[string]interface{}

Message ...

func Respond

func Respond(res http.ResponseWriter, code int, data map[string]interface{})

Respond ...

Types

type Config

type Config struct {
	Port      string `toml:"port"`
	LogLevel  string `toml:"log_level"`
	Static    string `toml:"static"`
	Templates string `toml:"templates"`
	// contains filtered or unexported fields
}

Config ...

func NewConfig

func NewConfig() *Config

NewConfig ...

type Server

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

Server ...

func New

func New(config *Config) *Server

New ...

func (*Server) Start

func (serve *Server) Start() error

Start ...

Jump to

Keyboard shortcuts

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