server

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package server contains the core of the autodeb server. It creates all dependencies injects them at the right place.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DB                    DBConfig
	HTTP                  HTTPServerConfig
	DataDirectory         string
	TemplatesDirectory    string
	StaticFilesDirectory  string
	TemplatesCacheEnabled bool
}

Config contains configuration for Server

type DBConfig

type DBConfig struct {
	Driver           string
	ConnectionString string
}

DBConfig holds configuration related to the database

type HTTPServerConfig

type HTTPServerConfig struct {
	Address string
	Port    int
}

HTTPServerConfig holds configuration related to the HTTP server

type Server

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

Server is the main server. It has dput-compatible interface and provides REST API.

func NewServer

func NewServer(cfg *Config) (*Server, error)

NewServer creates a Server

func (*Server) Close

func (srv *Server) Close() error

Close will shutdown the server

Directories

Path Synopsis
api
Package api provides the main router.
Package api provides the main router.
app
Package app implements most of the application logic
Package app implements most of the application logic
Package database is responsible for all database logic.
Package database is responsible for all database logic.
Package models defines all models used within the application.
Package models defines all models used within the application.

Jump to

Keyboard shortcuts

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