whitelists

package
v0.5.25 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Put

func Put(client *golangsdk.ServiceClient, id string, opts WhitelistOpts) (err error)

Put an instance whitelist with given parameters.

Types

type Whitelist

type Whitelist struct {
	// instance id
	InstanceID string `json:"instance_id"`
	// enable or disable the whitelists
	Enable bool `json:"enable_whitelist"`
	// list of whitelist groups
	Groups []WhitelistGroup `json:"whitelist"`
}

Whitelist is a struct that contains all the whitelist parameters.

func Get

func Get(client *golangsdk.ServiceClient, id string) (*Whitelist, error)

Get the instance whitelist groups by instance id

type WhitelistGroup

type WhitelistGroup struct {
	// the group name
	GroupName string `json:"group_name"`
	// list of IP address or range
	IPList []string `json:"ip_list"`
}

WhitelistGroup is a struct that contains the whitelist parameters.

type WhitelistGroupOpts

type WhitelistGroupOpts struct {
	// the group name
	GroupName string `json:"group_name" required:"true"`
	// list of IP address or range
	IPList []string `json:"ip_list" required:"true"`
}

WhitelistGroupOpts is a struct that contains all the whitelist parameters.

type WhitelistOpts

type WhitelistOpts struct {
	// enable or disable the whitelists
	Enable *bool `json:"enable_whitelist" required:"true"`
	// list of whitelist groups
	Groups []WhitelistGroupOpts `json:"whitelist" required:"true"`
}

WhitelistOpts is a struct that contains all the parameters.

Jump to

Keyboard shortcuts

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