api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API represents a Rest API instance of a ALoLStats instance

func NewAPI

func NewAPI(cfg config.API) (*API, error)

NewAPI creates a new Rest API instance

func (*API) AttachModuleGet

func (a *API) AttachModuleGet(path string, f func(http.ResponseWriter, *http.Request))

AttachModuleGet registers a new GET handler for the API

func (*API) AttachModulePost

func (a *API) AttachModulePost(path string, f func(http.ResponseWriter, *http.Request))

AttachModulePost registers a new POST handler for the API

func (*API) Start

func (a *API) Start()

Start the REST API

func (*API) Stop

func (a *API) Stop()

Stop the REST API

Jump to

Keyboard shortcuts

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