rest

package
v0.0.0-...-3f85c9d Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2020 License: Apache-2.0 Imports: 9 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 {
	RestHost        string
	RestPort        int
	ShutdownTimeout int
	ServerAppConfig *ServerAppConfig
}

Config -

type RestServer

type RestServer struct {
	Config     *Config
	Router     *mux.Router
	HttpServer *http.Server
}

RestServer -

func NewRestServer

func NewRestServer() (*RestServer, error)

NewRestServer - Create new REST server

func (*RestServer) Shutdown

func (s *RestServer) Shutdown()

Shutdown - Shutdown REST server

func (*RestServer) Start

func (s *RestServer) Start()

Start - Start REST server

type ServerAppConfig

type ServerAppConfig struct {
	Protocol string
	Host     string
	Port     int
	UrlRoot  string
	Url      string
}

ServerAppConfig -

type User

type User struct {
	Id           int64  `json:"id"`
	Email        string `json:"email"`
	Name         string `json:"name"`
	Age          int    `json:"age"`
	ErrorMessage string `json:"errorMessage"`
}

Jump to

Keyboard shortcuts

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