rest

package
v0.0.0-...-c460348 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2018 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 Endpoints

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

func NewEndpoints

func NewEndpoints(vars Variables, service api.Endpoints) *Endpoints

func (*Endpoints) AddEndpoints

func (s *Endpoints) AddEndpoints(w http.ResponseWriter, r *http.Request)

func (*Endpoints) GetEndpoints

func (s *Endpoints) GetEndpoints(w http.ResponseWriter, r *http.Request)

func (*Endpoints) RemoveNodeEndpoints

func (s *Endpoints) RemoveNodeEndpoints(w http.ResponseWriter, r *http.Request)

func (*Endpoints) RemoveServiceEndpoints

func (s *Endpoints) RemoveServiceEndpoints(w http.ResponseWriter, r *http.Request)

type Error

type Error struct {
	Status  int    `json:"status"`
	Message string `json:"message"`
}

func (*Error) Error

func (e *Error) Error() string

type Routes

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

func NewRoutes

func NewRoutes(vars Variables, service api.Routes) *Routes

func (*Routes) GetServices

func (s *Routes) GetServices(w http.ResponseWriter, r *http.Request)

func (*Routes) RemoveService

func (s *Routes) RemoveService(w http.ResponseWriter, r *http.Request)

func (*Routes) SetService

func (s *Routes) SetService(w http.ResponseWriter, r *http.Request)

type Server

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

func NewServer

func NewServer() *Server

func (*Server) Handler

func (s *Server) Handler() http.Handler

func (*Server) RegisterEndpoints

func (s *Server) RegisterEndpoints(service api.Endpoints)

func (*Server) RegisterRoutes

func (s *Server) RegisterRoutes(service api.Routes)

type Variables

type Variables func(r *http.Request) map[string]string

Jump to

Keyboard shortcuts

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