api

package
v0.3.2-0...-95e55d2 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Conn   opc.Connection
	Router *mux.Router
	Config Config
}

App contains the opc connection and the API routes

func (*App) Initialize

func (a *App) Initialize(conn opc.Connection)

Initialize sets OPC connection and creates routes

func (*App) Run

func (a *App) Run(addr string)

Run starts serving the API

type Config

type Config struct {
	WriteTag  bool `toml:"allow_write"`
	AddTag    bool `toml:"allow_add"`
	DeleteTag bool `toml:"allow_remove"`
}

Config determines what services shall be exposed through the App

Jump to

Keyboard shortcuts

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