firewallrules

package
v0.0.0-...-b0bff92 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 10 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 provides the firewallrules facade APIs for v1.

func NewAPI

func NewAPI(
	backend Backend,
	authorizer facade.Authorizer,
	blockChecker BlockChecker,
) (*API, error)

NewAPI returns a new firewallrules API facade.

func NewFacade

func NewFacade(ctx facade.Context) (*API, error)

NewFacade provides the signature required for facade registration.

func (*API) ListFirewallRules

func (api *API) ListFirewallRules() (params.ListFirewallRulesResults, error)

ListFirewallRules returns all the firewall rules.

func (*API) SetFirewallRules

func (api *API) SetFirewallRules(args params.FirewallRuleArgs) (params.ErrorResults, error)

SetFirewallRules creates or updates the specified firewall rules.

type Backend

type Backend interface {
	ModelTag() names.ModelTag
	SaveFirewallRule(state.FirewallRule) error
	ListFirewallRules() ([]*state.FirewallRule, error)
}

Backend defines the state functionality required by the firewallrules facade. For details on the methods, see the methods on state.State with the same names.

func NewStateBackend

func NewStateBackend(st *state.State) (Backend, error)

NewStateBackend converts a state.State into a Backend.

type BlockChecker

type BlockChecker interface {
	ChangeAllowed() error
}

BlockChecker defines the block-checking functionality required by the firewallrules facade. This is implemented by apiserver/common.BlockChecker.

Jump to

Keyboard shortcuts

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