securitygroup

package
v0.0.0-...-8fc61e2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(restClient *client.RestClient, securitygroupId string, requestOpts *client.RequestOpts) error

func DeleteRule

func DeleteRule(restClient *client.RestClient, securitygroupId string, requestOpts *client.RequestOpts, ruleID string) error

func List

func List(restClient *client.RestClient, requestOpts *client.RequestOpts) (*[]SecurityGroupInfo, error)

func ListRule

func ListRule(restClient *client.RestClient, securitygroupId string, requestOpts *client.RequestOpts) (*[]SecurityGroupRules, error)

func ListRulesinSG

func ListRulesinSG(restClient *client.RestClient, securitygroupId string, requestOpts *client.RequestOpts) (*[]SecurityGroupRules, error)

Types

type SecurityGroupInfo

type SecurityGroupInfo struct {
	ID          string
	Name        string
	TenantID    string
	Creator     string
	State       string
	CreatedAt   string
	Protection  int
	Rules       []SecurityGroupRules
	RulesCount  int
	Description string
	AsID        string
}

func Create

func Create(restClient *client.RestClient, requestOpts *client.RequestOpts) (*SecurityGroupInfo, error)

func Get

func Get(restClient *client.RestClient, securitygroupId string, requestOpts *client.RequestOpts) (*SecurityGroupInfo, error)

type SecurityGroupRules

type SecurityGroupRules struct {
	ID         string `json:"id"`
	SecGroupID string `json:"secgroupId"`
	Name       string `json:"name"`
	Type       string `json:"type"`
	Port       string `json:"port"`
	Target     string `json:"target"`
	Protocol   string `json:"protocol"`
	Creator    string `json:"creator"`
	CreatedAt  string `json:"createdAt"`
}

func AddRule

func AddRule(restClient *client.RestClient, securitygroupId string, requestOpts *client.RequestOpts, rule string) (*SecurityGroupRules, error)

type SecurityReqInfo

type SecurityReqInfo struct {
	Name       string               `json:"name" required:"true"`
	Rules      []SecurityGroupRules `json:"rules" required:"false"`
	Protection int                  `json:"protection" required:"false"`
}

Jump to

Keyboard shortcuts

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