api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VERSION = "v1"

Functions

This section is empty.

Types

type API

type API interface {
	RelativePath() string
	SetHandlers(group *gin.RouterGroup)
}

type DaemonAPI

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

DaemonAPI ..

func NewDaemonAPI

func NewDaemonAPI(daemon *daemon.Daemon) (api *DaemonAPI)

func (*DaemonAPI) RelativePath

func (api *DaemonAPI) RelativePath() string

func (*DaemonAPI) SetHandlers

func (api *DaemonAPI) SetHandlers(group *gin.RouterGroup)

type Server

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

Server ..

func NewServer

func NewServer(dm *daemon.Daemon) (server *Server)

NewServer create new API Server

func (*Server) AddAPI

func (server *Server) AddAPI(api API)

func (*Server) Error

func (server *Server) Error() <-chan error

func (*Server) Group

func (server *Server) Group(relativePath string, handlers ...gin.HandlerFunc) *gin.RouterGroup

Group : delegate *gin.RouterGroup.Group

func (*Server) Start

func (server *Server) Start(listenAddress string)

Start ..

Jump to

Keyboard shortcuts

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