api

package
v0.0.0-...-13e8c2f Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 ConfigureFromEnv

func ConfigureFromEnv() (*OPNsense, error)

func (*OPNsense) EndpointForModule

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

EndpointForModule so basically api/<plugin>

func (*OPNsense) EndpointForModuleController

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

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

func (*OPNsense) EndpointForPluginControllerMethod

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

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

func (*OPNsense) Send

func (opn *OPNsense) Send(request *http.Request) (*http.Response, error)

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