firewall

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(c HTTPClient) *Client

func (*Client) GetMacros

func (c *Client) GetMacros(ctx context.Context) (*GetMacrosResponse, error)

GetMacros List available macros

func (*Client) GetOptions

func (c *Client) GetOptions(ctx context.Context) (*GetOptionsResponse, error)

GetOptions Get Firewall options.

func (*Client) Index

func (c *Client) Index(ctx context.Context) (*IndexResponse, error)

Index Directory index.

func (*Client) Refs

func (c *Client) Refs(ctx context.Context, req *RefsRequest) (*RefsResponse, error)

Refs Lists possible IPSet/Alias reference which are allowed in source/dest properties.

func (*Client) SetOptions

func (c *Client) SetOptions(ctx context.Context, req *SetOptionsRequest) (*SetOptionsResponse, error)

SetOptions Set Firewall options.

type GetMacrosResponse

type GetMacrosResponse []*struct {
	Descr string `url:"descr",json:"descr"` // More verbose description (if available).
	Macro string `url:"macro",json:"macro"` // Macro name.

}

type GetOptionsResponse

type GetOptionsResponse map[string]interface{}

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type IndexResponse

type IndexResponse []*map[string]interface{}

type RefsRequest

type RefsRequest map[string]interface{}

type RefsResponse

type RefsResponse []*struct {
	Name string `url:"name",json:"name"`
	Ref  string `url:"ref",json:"ref"`
	Type string `url:"type",json:"type"`

	// The following parameters are optional
	Comment *string `url:"comment,omitempty",json:"comment,omitempty"`
}

type SetOptionsRequest

type SetOptionsRequest map[string]interface{}

type SetOptionsResponse

type SetOptionsResponse map[string]interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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