swagger

package
v0.0.0-...-a143e3c Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	FirewallApi *FirewallApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the firewall API API v1.0.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Chain

type Chain struct {
	// Chain in which the rule will be inserted. Default: INGRESS.
	Name string `json:"name,omitempty"`
	// Default action if no rule matches in the ingress chain. Default is DROP.
	Default_ string       `json:"default,omitempty"`
	Stats    []ChainStats `json:"stats,omitempty"`
	Rule     []ChainRule  `json:"rule,omitempty"`
}

type ChainAppendInput

type ChainAppendInput struct {
	// Source IP Address.
	Src string `json:"src,omitempty"`
	// Destination IP Address.
	Dst string `json:"dst,omitempty"`
	// Level 4 Protocol.
	L4proto string `json:"l4proto,omitempty"`
	// Source L4 Port
	Sport int32 `json:"sport,omitempty"`
	// Destination L4 Port
	Dport int32 `json:"dport,omitempty"`
	// TCP flags. Allowed values: SYN, FIN, ACK, RST, PSH, URG, CWR, ECE. ! means set to 0.
	Tcpflags string `json:"tcpflags,omitempty"`
	// Connection status (NEW, ESTABLISHED, RELATED, INVALID)
	Conntrack string `json:"conntrack,omitempty"`
	// Action if the rule matches. Default is DROP.
	Action string `json:"action,omitempty"`
	// Description of the rule.
	Description string `json:"description,omitempty"`
}

type ChainAppendOutput

type ChainAppendOutput struct {
	Id int32 `json:"id,omitempty"`
}

type ChainApplyRulesOutput

type ChainApplyRulesOutput struct {
	// True if the operation is successful
	Result bool `json:"result,omitempty"`
}

type ChainDeleteInput

type ChainDeleteInput struct {
	// Source IP Address.
	Src string `json:"src,omitempty"`
	// Destination IP Address.
	Dst string `json:"dst,omitempty"`
	// Level 4 Protocol.
	L4proto string `json:"l4proto,omitempty"`
	// Source L4 Port
	Sport int32 `json:"sport,omitempty"`
	// Destination L4 Port
	Dport int32 `json:"dport,omitempty"`
	// TCP flags. Allowed values: SYN, FIN, ACK, RST, PSH, URG, CWR, ECE. ! means set to 0.
	Tcpflags string `json:"tcpflags,omitempty"`
	// Connection status (NEW, ESTABLISHED, RELATED, INVALID)
	Conntrack string `json:"conntrack,omitempty"`
	// Action if the rule matches. Default is DROP.
	Action string `json:"action,omitempty"`
	// Description of the rule.
	Description string `json:"description,omitempty"`
}

type ChainInsertInput

type ChainInsertInput struct {
	Id int32 `json:"id,omitempty"`
	// Source IP Address.
	Src string `json:"src,omitempty"`
	// Destination IP Address.
	Dst string `json:"dst,omitempty"`
	// Level 4 Protocol.
	L4proto string `json:"l4proto,omitempty"`
	// Source L4 Port
	Sport int32 `json:"sport,omitempty"`
	// Destination L4 Port
	Dport int32 `json:"dport,omitempty"`
	// TCP flags. Allowed values: SYN, FIN, ACK, RST, PSH, URG, CWR, ECE. ! means set to 0.
	Tcpflags string `json:"tcpflags,omitempty"`
	// Connection status (NEW, ESTABLISHED, RELATED, INVALID)
	Conntrack string `json:"conntrack,omitempty"`
	// Action if the rule matches. Default is DROP.
	Action string `json:"action,omitempty"`
	// Description of the rule.
	Description string `json:"description,omitempty"`
}

type ChainInsertOutput

type ChainInsertOutput struct {
	Id int32 `json:"id,omitempty"`
}

type ChainResetCountersOutput

type ChainResetCountersOutput struct {
	// True if the operation is successful
	Result bool `json:"result,omitempty"`
}

type ChainRule

type ChainRule struct {
	// Rule Identifier
	Id int32 `json:"id,omitempty"`
	// Source IP Address.
	Src string `json:"src,omitempty"`
	// Destination IP Address.
	Dst string `json:"dst,omitempty"`
	// Level 4 Protocol.
	L4proto string `json:"l4proto,omitempty"`
	// Source L4 Port
	Sport int32 `json:"sport,omitempty"`
	// Destination L4 Port
	Dport int32 `json:"dport,omitempty"`
	// TCP flags. Allowed values: SYN, FIN, ACK, RST, PSH, URG, CWR, ECE. ! means set to 0.
	Tcpflags string `json:"tcpflags,omitempty"`
	// Connection status (NEW, ESTABLISHED, RELATED, INVALID)
	Conntrack string `json:"conntrack,omitempty"`
	// Action if the rule matches. Default is DROP.
	Action string `json:"action,omitempty"`
	// Description of the rule.
	Description string `json:"description,omitempty"`
}

type ChainStats

type ChainStats struct {
	// Rule Identifier
	Id int32 `json:"id,omitempty"`
	// Number of packets matching the rule
	Pkts int32 `json:"pkts,omitempty"`
	// Number of bytes matching the rule
	Bytes int32 `json:"bytes,omitempty"`
	// Source IP Address.
	Src string `json:"src,omitempty"`
	// Destination IP Address.
	Dst string `json:"dst,omitempty"`
	// Level 4 Protocol.
	L4proto string `json:"l4proto,omitempty"`
	// Source L4 Port
	Sport int32 `json:"sport,omitempty"`
	// Destination L4 Port
	Dport int32 `json:"dport,omitempty"`
	// TCP flags. Allowed values: SYN, FIN, ACK, RST, PSH, URG, CWR, ECE. ! means set to 0.
	Tcpflags string `json:"tcpflags,omitempty"`
	// Connection status (NEW, ESTABLISHED, RELATED, INVALID)
	Conntrack string `json:"conntrack,omitempty"`
	// Action if the rule matches. Default is DROP.
	Action string `json:"action,omitempty"`
	// Description of the rule.
	Description string `json:"description,omitempty"`
}

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type Firewall

type Firewall struct {
	// Name of the firewall service
	Name string `json:"name,omitempty"`
	// UUID of the Cube
	Uuid string `json:"uuid,omitempty"`
	// Type of the Cube (TC, XDP_SKB, XDP_DRV)
	Type_       string `json:"type,omitempty"`
	ServiceName string `json:"service-name,omitempty"`
	// Logging level of a cube, from none (OFF) to the most verbose (TRACE)
	Loglevel string `json:"loglevel,omitempty"`
	// Enables the Connection Tracking module. Mandatory if connection tracking rules are needed. Default is ON.
	Conntrack string `json:"conntrack,omitempty"`
	// If Connection Tracking is enabled, all packets belonging to ESTABLISHED connections will be forwarded automatically. Default is ON.
	AcceptEstablished string `json:"accept-established,omitempty"`
	// Interactive mode applies new rules immediately; if 'false', the command 'apply-rules' has to be used to apply all the rules at once. Default is TRUE.
	Interactive  bool           `json:"interactive,omitempty"`
	SessionTable []SessionTable `json:"session-table,omitempty"`
	Chain        []Chain        `json:"chain,omitempty"`
}

type FirewallApiService

type FirewallApiService service

func (*FirewallApiService) CreateFirewallByID

func (a *FirewallApiService) CreateFirewallByID(ctx context.Context, name string, firewall Firewall) (*http.Response, error)

FirewallApiService Create firewall by ID Create operation of resource: firewall

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param firewall firewallbody object

func (*FirewallApiService) CreateFirewallChainAppendByID

func (a *FirewallApiService) CreateFirewallChainAppendByID(ctx context.Context, name string, chainName string, append ChainAppendInput) (ChainAppendOutput, *http.Response, error)

FirewallApiService Create append by ID Create operation of resource: append

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param append appendbody object

@return ChainAppendOutput

func (*FirewallApiService) CreateFirewallChainApplyRulesByID

func (a *FirewallApiService) CreateFirewallChainApplyRulesByID(ctx context.Context, name string, chainName string) (ChainApplyRulesOutput, *http.Response, error)

FirewallApiService Create apply-rules by ID Create operation of resource: apply-rules

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name

@return ChainApplyRulesOutput

func (*FirewallApiService) CreateFirewallChainByID

func (a *FirewallApiService) CreateFirewallChainByID(ctx context.Context, name string, chainName string, chain Chain) (*http.Response, error)

FirewallApiService Create chain by ID Create operation of resource: chain

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param chain chainbody object

func (*FirewallApiService) CreateFirewallChainDeleteByID

func (a *FirewallApiService) CreateFirewallChainDeleteByID(ctx context.Context, name string, chainName string, delete ChainDeleteInput) (*http.Response, error)

FirewallApiService Create delete by ID Create operation of resource: delete

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param delete deletebody object

func (*FirewallApiService) CreateFirewallChainInsertByID

func (a *FirewallApiService) CreateFirewallChainInsertByID(ctx context.Context, name string, chainName string, insert ChainInsertInput) (ChainInsertOutput, *http.Response, error)

FirewallApiService Create insert by ID Create operation of resource: insert

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param insert insertbody object

@return ChainInsertOutput

func (*FirewallApiService) CreateFirewallChainListByID

func (a *FirewallApiService) CreateFirewallChainListByID(ctx context.Context, name string, chain []Chain) (*http.Response, error)

FirewallApiService Create chain by ID Create operation of resource: chain

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chain chainbody object

func (*FirewallApiService) CreateFirewallChainResetCountersByID

func (a *FirewallApiService) CreateFirewallChainResetCountersByID(ctx context.Context, name string, chainName string) (ChainResetCountersOutput, *http.Response, error)

FirewallApiService Create reset-counters by ID Create operation of resource: reset-counters

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name

@return ChainResetCountersOutput

func (*FirewallApiService) CreateFirewallChainRuleByID

func (a *FirewallApiService) CreateFirewallChainRuleByID(ctx context.Context, name string, chainName string, id int32, rule ChainRule) (*http.Response, error)

FirewallApiService Create rule by ID Create operation of resource: rule

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id
  • @param rule rulebody object

func (*FirewallApiService) CreateFirewallChainRuleListByID

func (a *FirewallApiService) CreateFirewallChainRuleListByID(ctx context.Context, name string, chainName string, rule []ChainRule) (*http.Response, error)

FirewallApiService Create rule by ID Create operation of resource: rule

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param rule rulebody object

func (*FirewallApiService) DeleteFirewallByID

func (a *FirewallApiService) DeleteFirewallByID(ctx context.Context, name string) (*http.Response, error)

FirewallApiService Delete firewall by ID Delete operation of resource: firewall

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name

func (*FirewallApiService) DeleteFirewallChainByID

func (a *FirewallApiService) DeleteFirewallChainByID(ctx context.Context, name string, chainName string) (*http.Response, error)

FirewallApiService Delete chain by ID Delete operation of resource: chain

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name

func (*FirewallApiService) DeleteFirewallChainListByID

func (a *FirewallApiService) DeleteFirewallChainListByID(ctx context.Context, name string) (*http.Response, error)

FirewallApiService Delete chain by ID Delete operation of resource: chain

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name

func (*FirewallApiService) DeleteFirewallChainRuleByID

func (a *FirewallApiService) DeleteFirewallChainRuleByID(ctx context.Context, name string, chainName string, id int32) (*http.Response, error)

FirewallApiService Delete rule by ID Delete operation of resource: rule

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

func (*FirewallApiService) DeleteFirewallChainRuleListByID

func (a *FirewallApiService) DeleteFirewallChainRuleListByID(ctx context.Context, name string, chainName string) (*http.Response, error)

FirewallApiService Delete rule by ID Delete operation of resource: rule

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name

func (*FirewallApiService) ReadFirewallAcceptEstablishedByID

func (a *FirewallApiService) ReadFirewallAcceptEstablishedByID(ctx context.Context, name string) (string, *http.Response, error)

FirewallApiService Read accept-established by ID Read operation of resource: accept-established

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name

@return string

func (*FirewallApiService) ReadFirewallByID

func (a *FirewallApiService) ReadFirewallByID(ctx context.Context, name string) (Firewall, *http.Response, error)

FirewallApiService Read firewall by ID Read operation of resource: firewall

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name

@return Firewall

func (*FirewallApiService) ReadFirewallChainByID

func (a *FirewallApiService) ReadFirewallChainByID(ctx context.Context, name string, chainName string) (Chain, *http.Response, error)

FirewallApiService Read chain by ID Read operation of resource: chain

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name

@return Chain

func (*FirewallApiService) ReadFirewallChainDefaultByID

func (a *FirewallApiService) ReadFirewallChainDefaultByID(ctx context.Context, name string, chainName string) (string, *http.Response, error)

FirewallApiService Read default by ID Read operation of resource: default

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name

@return string

func (*FirewallApiService) ReadFirewallChainListByID

func (a *FirewallApiService) ReadFirewallChainListByID(ctx context.Context, name string) ([]Chain, *http.Response, error)

FirewallApiService Read chain by ID Read operation of resource: chain

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name

@return []Chain

func (*FirewallApiService) ReadFirewallChainRuleActionByID

func (a *FirewallApiService) ReadFirewallChainRuleActionByID(ctx context.Context, name string, chainName string, id int32) (string, *http.Response, error)

FirewallApiService Read action by ID Read operation of resource: action

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return string

func (*FirewallApiService) ReadFirewallChainRuleByID

func (a *FirewallApiService) ReadFirewallChainRuleByID(ctx context.Context, name string, chainName string, id int32) (ChainRule, *http.Response, error)

FirewallApiService Read rule by ID Read operation of resource: rule

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return ChainRule

func (*FirewallApiService) ReadFirewallChainRuleConntrackByID

func (a *FirewallApiService) ReadFirewallChainRuleConntrackByID(ctx context.Context, name string, chainName string, id int32) (string, *http.Response, error)

FirewallApiService Read conntrack by ID Read operation of resource: conntrack

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return string

func (*FirewallApiService) ReadFirewallChainRuleDescriptionByID

func (a *FirewallApiService) ReadFirewallChainRuleDescriptionByID(ctx context.Context, name string, chainName string, id int32) (string, *http.Response, error)

FirewallApiService Read description by ID Read operation of resource: description

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return string

func (*FirewallApiService) ReadFirewallChainRuleDportByID

func (a *FirewallApiService) ReadFirewallChainRuleDportByID(ctx context.Context, name string, chainName string, id int32) (int32, *http.Response, error)

FirewallApiService Read dport by ID Read operation of resource: dport

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return int32

func (*FirewallApiService) ReadFirewallChainRuleDstByID

func (a *FirewallApiService) ReadFirewallChainRuleDstByID(ctx context.Context, name string, chainName string, id int32) (string, *http.Response, error)

FirewallApiService Read dst by ID Read operation of resource: dst

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return string

func (*FirewallApiService) ReadFirewallChainRuleL4protoByID

func (a *FirewallApiService) ReadFirewallChainRuleL4protoByID(ctx context.Context, name string, chainName string, id int32) (string, *http.Response, error)

FirewallApiService Read l4proto by ID Read operation of resource: l4proto

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return string

func (*FirewallApiService) ReadFirewallChainRuleListByID

func (a *FirewallApiService) ReadFirewallChainRuleListByID(ctx context.Context, name string, chainName string) ([]ChainRule, *http.Response, error)

FirewallApiService Read rule by ID Read operation of resource: rule

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name

@return []ChainRule

func (*FirewallApiService) ReadFirewallChainRuleSportByID

func (a *FirewallApiService) ReadFirewallChainRuleSportByID(ctx context.Context, name string, chainName string, id int32) (int32, *http.Response, error)

FirewallApiService Read sport by ID Read operation of resource: sport

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return int32

func (*FirewallApiService) ReadFirewallChainRuleSrcByID

func (a *FirewallApiService) ReadFirewallChainRuleSrcByID(ctx context.Context, name string, chainName string, id int32) (string, *http.Response, error)

FirewallApiService Read src by ID Read operation of resource: src

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return string

func (*FirewallApiService) ReadFirewallChainRuleTcpflagsByID

func (a *FirewallApiService) ReadFirewallChainRuleTcpflagsByID(ctx context.Context, name string, chainName string, id int32) (string, *http.Response, error)

FirewallApiService Read tcpflags by ID Read operation of resource: tcpflags

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return string

func (*FirewallApiService) ReadFirewallChainStatsActionByID

func (a *FirewallApiService) ReadFirewallChainStatsActionByID(ctx context.Context, name string, chainName string, id int32) (string, *http.Response, error)

FirewallApiService Read action by ID Read operation of resource: action

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return string

func (*FirewallApiService) ReadFirewallChainStatsByID

func (a *FirewallApiService) ReadFirewallChainStatsByID(ctx context.Context, name string, chainName string, id int32) (ChainStats, *http.Response, error)

FirewallApiService Read stats by ID Read operation of resource: stats

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return ChainStats

func (*FirewallApiService) ReadFirewallChainStatsBytesByID

func (a *FirewallApiService) ReadFirewallChainStatsBytesByID(ctx context.Context, name string, chainName string, id int32) (int32, *http.Response, error)

FirewallApiService Read bytes by ID Read operation of resource: bytes

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return int32

func (*FirewallApiService) ReadFirewallChainStatsConntrackByID

func (a *FirewallApiService) ReadFirewallChainStatsConntrackByID(ctx context.Context, name string, chainName string, id int32) (string, *http.Response, error)

FirewallApiService Read conntrack by ID Read operation of resource: conntrack

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return string

func (*FirewallApiService) ReadFirewallChainStatsDescriptionByID

func (a *FirewallApiService) ReadFirewallChainStatsDescriptionByID(ctx context.Context, name string, chainName string, id int32) (string, *http.Response, error)

FirewallApiService Read description by ID Read operation of resource: description

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return string

func (*FirewallApiService) ReadFirewallChainStatsDportByID

func (a *FirewallApiService) ReadFirewallChainStatsDportByID(ctx context.Context, name string, chainName string, id int32) (int32, *http.Response, error)

FirewallApiService Read dport by ID Read operation of resource: dport

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return int32

func (*FirewallApiService) ReadFirewallChainStatsDstByID

func (a *FirewallApiService) ReadFirewallChainStatsDstByID(ctx context.Context, name string, chainName string, id int32) (string, *http.Response, error)

FirewallApiService Read dst by ID Read operation of resource: dst

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return string

func (*FirewallApiService) ReadFirewallChainStatsL4protoByID

func (a *FirewallApiService) ReadFirewallChainStatsL4protoByID(ctx context.Context, name string, chainName string, id int32) (string, *http.Response, error)

FirewallApiService Read l4proto by ID Read operation of resource: l4proto

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return string

func (*FirewallApiService) ReadFirewallChainStatsListByID

func (a *FirewallApiService) ReadFirewallChainStatsListByID(ctx context.Context, name string, chainName string) ([]ChainStats, *http.Response, error)

FirewallApiService Read stats by ID Read operation of resource: stats

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name

@return []ChainStats

func (*FirewallApiService) ReadFirewallChainStatsPktsByID

func (a *FirewallApiService) ReadFirewallChainStatsPktsByID(ctx context.Context, name string, chainName string, id int32) (int32, *http.Response, error)

FirewallApiService Read pkts by ID Read operation of resource: pkts

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return int32

func (*FirewallApiService) ReadFirewallChainStatsSportByID

func (a *FirewallApiService) ReadFirewallChainStatsSportByID(ctx context.Context, name string, chainName string, id int32) (int32, *http.Response, error)

FirewallApiService Read sport by ID Read operation of resource: sport

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return int32

func (*FirewallApiService) ReadFirewallChainStatsSrcByID

func (a *FirewallApiService) ReadFirewallChainStatsSrcByID(ctx context.Context, name string, chainName string, id int32) (string, *http.Response, error)

FirewallApiService Read src by ID Read operation of resource: src

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return string

func (*FirewallApiService) ReadFirewallChainStatsTcpflagsByID

func (a *FirewallApiService) ReadFirewallChainStatsTcpflagsByID(ctx context.Context, name string, chainName string, id int32) (string, *http.Response, error)

FirewallApiService Read tcpflags by ID Read operation of resource: tcpflags

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id

@return string

func (*FirewallApiService) ReadFirewallConntrackByID

func (a *FirewallApiService) ReadFirewallConntrackByID(ctx context.Context, name string) (string, *http.Response, error)

FirewallApiService Read conntrack by ID Read operation of resource: conntrack

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name

@return string

func (*FirewallApiService) ReadFirewallInteractiveByID

func (a *FirewallApiService) ReadFirewallInteractiveByID(ctx context.Context, name string) (bool, *http.Response, error)

FirewallApiService Read interactive by ID Read operation of resource: interactive

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name

@return bool

func (*FirewallApiService) ReadFirewallListByID

func (a *FirewallApiService) ReadFirewallListByID(ctx context.Context) ([]Firewall, *http.Response, error)

FirewallApiService Read firewall by ID Read operation of resource: firewall

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []Firewall

func (*FirewallApiService) ReadFirewallLoglevelByID

func (a *FirewallApiService) ReadFirewallLoglevelByID(ctx context.Context, name string) (string, *http.Response, error)

FirewallApiService Read loglevel by ID Read operation of resource: loglevel

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name

@return string

func (*FirewallApiService) ReadFirewallServiceNameByID

func (a *FirewallApiService) ReadFirewallServiceNameByID(ctx context.Context, name string) (string, *http.Response, error)

FirewallApiService Read service-name by ID Read operation of resource: service-name

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name

@return string

func (*FirewallApiService) ReadFirewallSessionTableByID

func (a *FirewallApiService) ReadFirewallSessionTableByID(ctx context.Context, name string, src string, dst string, l4proto string, sport int32, dport int32) (SessionTable, *http.Response, error)

FirewallApiService Read session-table by ID Read operation of resource: session-table

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param src ID of src
  • @param dst ID of dst
  • @param l4proto ID of l4proto
  • @param sport ID of sport
  • @param dport ID of dport

@return SessionTable

func (*FirewallApiService) ReadFirewallSessionTableEtaByID

func (a *FirewallApiService) ReadFirewallSessionTableEtaByID(ctx context.Context, name string, src string, dst string, l4proto string, sport int32, dport int32) (int32, *http.Response, error)

FirewallApiService Read eta by ID Read operation of resource: eta

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param src ID of src
  • @param dst ID of dst
  • @param l4proto ID of l4proto
  • @param sport ID of sport
  • @param dport ID of dport

@return int32

func (*FirewallApiService) ReadFirewallSessionTableListByID

func (a *FirewallApiService) ReadFirewallSessionTableListByID(ctx context.Context, name string) ([]SessionTable, *http.Response, error)

FirewallApiService Read session-table by ID Read operation of resource: session-table

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name

@return []SessionTable

func (*FirewallApiService) ReadFirewallSessionTableStateByID

func (a *FirewallApiService) ReadFirewallSessionTableStateByID(ctx context.Context, name string, src string, dst string, l4proto string, sport int32, dport int32) (string, *http.Response, error)

FirewallApiService Read state by ID Read operation of resource: state

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param src ID of src
  • @param dst ID of dst
  • @param l4proto ID of l4proto
  • @param sport ID of sport
  • @param dport ID of dport

@return string

func (*FirewallApiService) ReadFirewallTypeByID

func (a *FirewallApiService) ReadFirewallTypeByID(ctx context.Context, name string) (string, *http.Response, error)

FirewallApiService Read type by ID Read operation of resource: type

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name

@return string

func (*FirewallApiService) ReadFirewallUuidByID

func (a *FirewallApiService) ReadFirewallUuidByID(ctx context.Context, name string) (string, *http.Response, error)

FirewallApiService Read uuid by ID Read operation of resource: uuid

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name

@return string

func (*FirewallApiService) ReplaceFirewallByID

func (a *FirewallApiService) ReplaceFirewallByID(ctx context.Context, name string, firewall Firewall) (*http.Response, error)

FirewallApiService Replace firewall by ID Replace operation of resource: firewall

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param firewall firewallbody object

func (*FirewallApiService) ReplaceFirewallChainByID

func (a *FirewallApiService) ReplaceFirewallChainByID(ctx context.Context, name string, chainName string, chain Chain) (*http.Response, error)

FirewallApiService Replace chain by ID Replace operation of resource: chain

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param chain chainbody object

func (*FirewallApiService) ReplaceFirewallChainListByID

func (a *FirewallApiService) ReplaceFirewallChainListByID(ctx context.Context, name string, chain []Chain) (*http.Response, error)

FirewallApiService Replace chain by ID Replace operation of resource: chain

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chain chainbody object

func (*FirewallApiService) ReplaceFirewallChainRuleByID

func (a *FirewallApiService) ReplaceFirewallChainRuleByID(ctx context.Context, name string, chainName string, id int32, rule ChainRule) (*http.Response, error)

FirewallApiService Replace rule by ID Replace operation of resource: rule

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id
  • @param rule rulebody object

func (*FirewallApiService) ReplaceFirewallChainRuleListByID

func (a *FirewallApiService) ReplaceFirewallChainRuleListByID(ctx context.Context, name string, chainName string, rule []ChainRule) (*http.Response, error)

FirewallApiService Replace rule by ID Replace operation of resource: rule

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param rule rulebody object

func (*FirewallApiService) UpdateFirewallAcceptEstablishedByID

func (a *FirewallApiService) UpdateFirewallAcceptEstablishedByID(ctx context.Context, name string, acceptEstablished string) (*http.Response, error)

FirewallApiService Update accept-established by ID Update operation of resource: accept-established

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param acceptEstablished If Connection Tracking is enabled, all packets belonging to ESTABLISHED connections will be forwarded automatically. Default is ON.

func (*FirewallApiService) UpdateFirewallByID

func (a *FirewallApiService) UpdateFirewallByID(ctx context.Context, name string, firewall Firewall) (*http.Response, error)

FirewallApiService Update firewall by ID Update operation of resource: firewall

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param firewall firewallbody object

func (*FirewallApiService) UpdateFirewallChainByID

func (a *FirewallApiService) UpdateFirewallChainByID(ctx context.Context, name string, chainName string, chain Chain) (*http.Response, error)

FirewallApiService Update chain by ID Update operation of resource: chain

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param chain chainbody object

func (*FirewallApiService) UpdateFirewallChainDefaultByID

func (a *FirewallApiService) UpdateFirewallChainDefaultByID(ctx context.Context, name string, chainName string, default_ string) (*http.Response, error)

FirewallApiService Update default by ID Update operation of resource: default

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param default_ Default action if no rule matches in the ingress chain. Default is DROP.

func (*FirewallApiService) UpdateFirewallChainListByID

func (a *FirewallApiService) UpdateFirewallChainListByID(ctx context.Context, name string, chain []Chain) (*http.Response, error)

FirewallApiService Update chain by ID Update operation of resource: chain

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chain chainbody object

func (*FirewallApiService) UpdateFirewallChainRuleByID

func (a *FirewallApiService) UpdateFirewallChainRuleByID(ctx context.Context, name string, chainName string, id int32, rule ChainRule) (*http.Response, error)

FirewallApiService Update rule by ID Update operation of resource: rule

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param id ID of id
  • @param rule rulebody object

func (*FirewallApiService) UpdateFirewallChainRuleListByID

func (a *FirewallApiService) UpdateFirewallChainRuleListByID(ctx context.Context, name string, chainName string, rule []ChainRule) (*http.Response, error)

FirewallApiService Update rule by ID Update operation of resource: rule

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param chainName ID of chain_name
  • @param rule rulebody object

func (*FirewallApiService) UpdateFirewallConntrackByID

func (a *FirewallApiService) UpdateFirewallConntrackByID(ctx context.Context, name string, conntrack string) (*http.Response, error)

FirewallApiService Update conntrack by ID Update operation of resource: conntrack

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param conntrack Enables the Connection Tracking module. Mandatory if connection tracking rules are needed. Default is ON.

func (*FirewallApiService) UpdateFirewallInteractiveByID

func (a *FirewallApiService) UpdateFirewallInteractiveByID(ctx context.Context, name string, interactive bool) (*http.Response, error)

FirewallApiService Update interactive by ID Update operation of resource: interactive

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param interactive Interactive mode applies new rules immediately; if 'false', the command 'apply-rules' has to be used to apply all the rules at once. Default is TRUE.

func (*FirewallApiService) UpdateFirewallListByID

func (a *FirewallApiService) UpdateFirewallListByID(ctx context.Context, firewall []Firewall) (*http.Response, error)

FirewallApiService Update firewall by ID Update operation of resource: firewall

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param firewall firewallbody object

func (*FirewallApiService) UpdateFirewallLoglevelByID

func (a *FirewallApiService) UpdateFirewallLoglevelByID(ctx context.Context, name string, loglevel string) (*http.Response, error)

FirewallApiService Update loglevel by ID Update operation of resource: loglevel

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name ID of name
  • @param loglevel Logging level of a cube, from none (OFF) to the most verbose (TRACE)

type GenericSwaggerError

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

GenericSwaggerError Provides access to the body, error and model on returned errors.

func (GenericSwaggerError) Body

func (e GenericSwaggerError) Body() []byte

Body returns the raw bytes of the response

func (GenericSwaggerError) Error

func (e GenericSwaggerError) Error() string

Error returns non-empty string if there was an error.

func (GenericSwaggerError) Model

func (e GenericSwaggerError) Model() interface{}

Model returns the unpacked model of the error

type RuleFields

type RuleFields struct {
	// Source IP Address.
	Src string `json:"src,omitempty"`
	// Destination IP Address.
	Dst string `json:"dst,omitempty"`
	// Level 4 Protocol.
	L4proto string `json:"l4proto,omitempty"`
	// Source L4 Port
	Sport int32 `json:"sport,omitempty"`
	// Destination L4 Port
	Dport int32 `json:"dport,omitempty"`
	// TCP flags. Allowed values: SYN, FIN, ACK, RST, PSH, URG, CWR, ECE. ! means set to 0.
	Tcpflags string `json:"tcpflags,omitempty"`
	// Connection status (NEW, ESTABLISHED, RELATED, INVALID)
	Conntrack string `json:"conntrack,omitempty"`
	// Action if the rule matches. Default is DROP.
	Action string `json:"action,omitempty"`
	// Description of the rule.
	Description string `json:"description,omitempty"`
}

type SessionTable

type SessionTable struct {
	// Source IP
	Src string `json:"src,omitempty"`
	// Destination IP
	Dst string `json:"dst,omitempty"`
	// Level 4 Protocol.
	L4proto string `json:"l4proto,omitempty"`
	// Source Port
	Sport int32 `json:"sport,omitempty"`
	// Destination
	Dport int32 `json:"dport,omitempty"`
	// Connection state.
	State string `json:"state,omitempty"`
	// Last packet matching the connection
	Eta int32 `json:"eta,omitempty"`
}

Jump to

Keyboard shortcuts

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