firewalls

package
v0.0.0-...-d823fe1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteURL

func DeleteURL(c *golangsdk.ServiceClient, firewallId string) string

func GetURL

func GetURL(c *golangsdk.ServiceClient, firewallId string) string

func UpdateRuleURL

func UpdateRuleURL(c *golangsdk.ServiceClient, firewallId string) string

func UpdateURL

func UpdateURL(c *golangsdk.ServiceClient, firewallId string) string

Types

type CreateOpts

type CreateOpts struct {
	Name        string `json:"name,true"`
	Description string `json:"description,omitempty"`
}

func (CreateOpts) ToFirewallCreateMap

func (opts CreateOpts) ToFirewallCreateMap() (map[string]interface{}, error)

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToFirewallCreateMap() (map[string]interface{}, error)
}

type CreateResult

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

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)

func (CreateResult) Extract

func (r CreateResult) Extract() (*Firewall, error)

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

func Delete

func Delete(client *golangsdk.ServiceClient, firewallID string) (r DeleteResult)

type Firewall

type Firewall struct {
	ID                 string           `json:"id"`
	DomainID           string           `json:"domain_id"`
	Name               string           `json:"name"`
	Description        string           `json:"description"`
	AdminStateUp       bool             `json:"admin_state_up"`
	Status             string           `json:"status"`
	IngressFWPolicy    RespPolicyEntity `json:"ingress_firewall_policy"`
	EgressFWPolicy     RespPolicyEntity `json:"egress_firewall_policy"`
	IngressFWRuleCount int64            `json:"ingress_firewall_rule_count,omitempty"`
	EgressFWRuleCount  int64            `json:"egress_firewall_rule_count,omitempty"`
	Subnets            []common.Subnet  `json:"subnets,omitempty"`
}

type Firewalls

type Firewalls struct {
	Firewalls []Firewall `json:"firewalls"`
	Count     int        `json:"count"`
}

Firewalls firewall列表对象

type GetResult

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

func Get

func Get(client *golangsdk.ServiceClient, fwID string) (r GetResult)

func (GetResult) Extract

func (r GetResult) Extract() (*Firewall, error)

type ListFirewallsOptsBuilder

type ListFirewallsOptsBuilder interface {
	ToListFirewallsQuery() (string, error)
}

type ListOpts

type ListOpts struct {
	Limit  int    `q:"limit"`
	Offset int    `q:"offset"`
	ID     string `q:"id"`
	Name   string `q:"name"`
}

func (ListOpts) ToListFirewallsQuery

func (opts ListOpts) ToListFirewallsQuery() (string, error)

type ListResult

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

func (ListResult) Extract

func (r ListResult) Extract() (*Firewalls, error)

type ReqFirewallRulesOpts

type ReqFirewallRulesOpts struct {
	ID          string `json:"id,omitempty"`
	Description string `json:"description"`
	Enabled     *bool  `json:"enabled,omitempty"`
	Name        string `json:"name"`
	Protocol    string `json:"protocol"`
	Action      string `json:"action"`
	IPVersion   int    `json:"ip_version,omitempty"`
	DstIPAddr   string `json:"destination_ip_address"`
	DstPort     string `json:"destination_port"`
	SrcIPAddr   string `json:"source_ip_address"`
	SrcPort     string `json:"source_port"`
	OperateType string `json:"operate_type"`
}

type ReqPolicyOpts

type ReqPolicyOpts struct {
	PolicyID      string                  `json:"id"`
	FirewallRules *[]ReqFirewallRulesOpts `json:"firewall_rules,omitempty"`
}

type ReqSubnet

type ReqSubnet struct {
	ID    string `json:"id"`
	VpcID string `json:"vpc_id"`
}

type RespFirewallRulesEntity

type RespFirewallRulesEntity struct {
	ID          string `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Enabled     bool   `json:"enabled,omitempty"`
	Action      string `json:"action,omitempty"`
	Protocol    string `json:"protocol,omitempty"`
	IPVersion   int    `json:"ip_version,omitempty"`
	DstIPAddr   string `json:"destination_ip_address,omitempty"`
	DstPort     string `json:"destination_port,omitempty"`
	SrcIPAddr   string `json:"source_ip_address,omitempty"`
	SrcPort     string `json:"source_port,omitempty"`
	OperateType string `json:"operate_type,omitempty"`
}

type RespPolicyEntity

type RespPolicyEntity struct {
	ID            string                    `json:"id"`
	Name          string                    `json:"name,omitempty"`
	Description   string                    `json:"description,omitempty"`
	Audited       bool                      `json:"audited,omitempty"`
	Shared        bool                      `json:"shared,omitempty"`
	FirewallRules []RespFirewallRulesEntity `json:"firewall_rules,omitempty"`
}

type UpdateFirewallResp

type UpdateFirewallResp struct {
	ID     string `json:"id"`
	Status string `json:"status"`
}

type UpdateOpts

type UpdateOpts struct {
	Name         string       `json:"name,omitempty"`
	Description  *string      `json:"description,omitempty"`
	AdminStateUp *bool        `json:"admin_state_up,omitempty"`
	Subnets      *[]ReqSubnet `json:"subnets,omitempty"`
}

func (UpdateOpts) ToUpdateFirewallMap

func (opts UpdateOpts) ToUpdateFirewallMap() (map[string]interface{}, error)

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToUpdateFirewallMap() (map[string]interface{}, error)
}

type UpdateResult

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

func Update

func Update(client *golangsdk.ServiceClient, fwID string, opts UpdateOptsBuilder) (r UpdateResult)

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*UpdateFirewallResp, error)

type UpdateRuleOpts

type UpdateRuleOpts struct {
	ReqFirewallOutPolicy *ReqPolicyOpts `json:"egress_firewall_policy,omitempty"`
	ReqFirewallInPolicy  *ReqPolicyOpts `json:"ingress_firewall_policy,omitempty"`
}

func (UpdateRuleOpts) ToUpdateFirewallRuleMap

func (opts UpdateRuleOpts) ToUpdateFirewallRuleMap() (map[string]interface{}, error)

type UpdateRuleOptsBuilder

type UpdateRuleOptsBuilder interface {
	ToUpdateFirewallRuleMap() (map[string]interface{}, error)
}

type UpdateRuleResult

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

func UpdateRule

func UpdateRule(client *golangsdk.ServiceClient, fwID string, opts UpdateRuleOptsBuilder) (r UpdateRuleResult)

func (UpdateRuleResult) Extract

func (r UpdateRuleResult) Extract() (*Firewall, error)

Jump to

Keyboard shortcuts

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