whitelists

package
v0.5.19 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PutResult

type PutResult struct {
	golangsdk.ErrResult
}

PutResult is a struct from which can get the result of put method

func Put

func Put(client *golangsdk.ServiceClient, id string, ops WhitelistOptsBuilder) (r PutResult)

Put an instance whitelist with given parameters.

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.

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.

func (WhitelistOpts) ToInstanceWhitelistMap

func (ops WhitelistOpts) ToInstanceWhitelistMap() (map[string]interface{}, error)

ToInstanceWhitelistMap is used for type convert

type WhitelistOptsBuilder

type WhitelistOptsBuilder interface {
	ToInstanceWhitelistMap() (map[string]interface{}, error)
}

WhitelistOptsBuilder is used for creating, updating, deleting instance whitelists parameters. any struct providing the parameters should implement this interface

type WhitelistResult

type WhitelistResult struct {
	golangsdk.Result
}

WhitelistResult is a struct from which can get the result of get method

func Get

func Get(client *golangsdk.ServiceClient, id string) (r WhitelistResult)

Get the instance whitelist groups by instance id

func (WhitelistResult) Extract

func (r WhitelistResult) Extract() (*Whitelist, error)

Extract from WhitelistResult

Jump to

Keyboard shortcuts

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