server

package
v0.0.0-...-cb10448 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: MIT Imports: 13 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 {
	Port       int
	DBHost     string
	DBPort     int
	DBUser     string
	DBPassword string
	DBName     string
}

Config are the server parameters

type Server

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

Server holds the http router and the database handle

func New

func New(cfg Config) *Server

New returns a new server

func (*Server) Start

func (s *Server) Start() error

Start connects to the database and serves the endpoint

Jump to

Keyboard shortcuts

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