api

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller int64
const (
	Settings Controller = iota
	Service  Controller = iota
)

func (Controller) String

func (s Controller) String() string

type Module

type Module int64
const (
	Unbound Module = iota
)

func (Module) String

func (s Module) String() string

type NotFoundError

type NotFoundError struct {
	Name string
	Err  error
}

func (*NotFoundError) Error

func (f *NotFoundError) Error() string

type OPNsense

type OPNsense struct {
	BaseUrl     url.URL
	ApiKey      string
	ApiSecret   string
	NoSslVerify bool
}

func (*OPNsense) Client

func (opn *OPNsense) Client() *resty.Request

func (*OPNsense) EndpointForModule

func (opn *OPNsense) EndpointForModule(module Module) string

EndpointForModule so basically api/<plugin>

func (*OPNsense) EndpointForModuleController

func (opn *OPNsense) EndpointForModuleController(module Module, controller Controller) string

EndpointForModuleController so basically api/<plugin>/<controller>

func (*OPNsense) EndpointForPluginControllerMethod

func (opn *OPNsense) EndpointForPluginControllerMethod(module Module, controller Controller, method string) string

EndpointForPluginControllerMethod so basically api/<plugin>/<controller>/<method>

type ServerError

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

type ServerResult

type ServerResult struct {
	ResultStatus string `json:"result"`
	Uuid         string `json:"uuid,omitempty"`
}

type TooManyFoundError

type TooManyFoundError struct {
	Name string
	Err  error
}

func (*TooManyFoundError) Error

func (f *TooManyFoundError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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