api

package
v0.0.0-...-abf550e Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: MPL-2.0 Imports: 28 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 holds the API endpoints for the tool

func New

func New(data *data.Data, metrics *metrics.Metrics, version string) *API

New returns the API struct filled with the required objects and configuration

func (*API) Open

func (a *API) Open() error

Open the database with the current information

func (*API) SetMasterkey

func (a *API) SetMasterkey(key []byte)

SetMasterkey sets the key on the data struct

func (*API) Start

func (a *API) Start(serverID, apiPort string, tlsCertificate, tlsKey, tlsCACert string, logger *logging.Logging) error

Start initiates the API server and blocks server execution

Jump to

Keyboard shortcuts

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