server

package
v0.0.0-...-041553d Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

func NewRestfulAPI

func NewRestfulAPI(setup Setup) (*Server, error)

func (*Server) Run

func (s *Server) Run() error

type Setup

type Setup interface {
	GetAddr() string
	GetLogger() log.Logger
	GetHttpHandler() http.Handler
	GetDatabase() *sqlx.DB
	GetConfig() *config.Config
	GetContext() context.Context
}

type SetupRestfulAPI

type SetupRestfulAPI struct {
	*config.Config
	Logger  log.Logger
	Ctx     context.Context
	DB      *sqlx.DB
	Handler http.Handler
}

func (SetupRestfulAPI) GetAddr

func (s SetupRestfulAPI) GetAddr() string

func (SetupRestfulAPI) GetConfig

func (s SetupRestfulAPI) GetConfig() *config.Config

func (SetupRestfulAPI) GetContext

func (s SetupRestfulAPI) GetContext() context.Context

func (SetupRestfulAPI) GetDatabase

func (s SetupRestfulAPI) GetDatabase() *sqlx.DB

func (SetupRestfulAPI) GetHttpHandler

func (s SetupRestfulAPI) GetHttpHandler() http.Handler

func (SetupRestfulAPI) GetLogger

func (s SetupRestfulAPI) GetLogger() log.Logger

Jump to

Keyboard shortcuts

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