api

package
v0.0.0-...-ade0808 Latest Latest
Warning

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

Go to latest
Published: May 21, 2017 License: MIT Imports: 5 Imported by: 6

Documentation

Index

Constants

View Source
const (
	ErrFailedToReadBody       = "Failed to read body of http request"
	ErrFailedToCloseBody      = "Failed to close body of http request"
	ErrFailedToMarshalJSON    = "Failed to marshal json"
	ErrFailedToUnmarshalJSON  = "Failed to unmarshal json"
	ErrFailedToValidateStruct = "Failed to validate an object/request"
	ErrInternalServerError    = "Internal Server Error"

	// Specific TYpe Errors
	ErrUnknownEndpointTYpe = "Unknown endpoint type"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	Handlers []ApiHandler
	// contains filtered or unexported fields
}

func NewApi

func NewApi() *Api

func (*Api) CreateServer

func (api *Api) CreateServer(isUnixDomain bool) *http.Server

func (*Api) InitHandler

func (api *Api) InitHandler(isUnixDomain bool)

type ApiHandler

type ApiHandler interface {
	AddRoutes(router *mux.Router, isUnixDomain bool)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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