web

package
v0.0.0-...-b8f9f05 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 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 BuildInfoResponse

type BuildInfoResponse struct {
	model.Build
	Body []byte `json:"body,omitempty"`
}

BuildInfoResponse is same to model.Build but without encoding body to json (for build body see getBuild action)

type Server

type Server struct {
	Db        storage.Engine
	Conf      *config.Config
	Signer    crypto.Signer
	PublicKey []byte
}

Server is storing web dependencies

func (*Server) GetRoutes

func (s *Server) GetRoutes() *chi.Mux

GetRoutes returning all web server routes

func (*Server) HTTPError

func (s *Server) HTTPError(w http.ResponseWriter, r *http.Request, status int, error string)

func (*Server) JSON

func (s *Server) JSON(w http.ResponseWriter, r *http.Request, data interface{})

func (*Server) Run

func (s *Server) Run() error

Run is running web server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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