networklists

package
v2.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: MPL-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Append  = "APPEND"
	Replace = "REPLACE"
	Remove  = "REMOVE"

	IP  = "IP"
	Geo = "GEO"
)

Append Replace Remove mode flags

View Source
const (
	// ActivationPollMinimum is the minumum polling interval for activation creation
	ActivationPollMinimum = time.Minute
)
View Source
const NetworkProviderVersion string = "v1.0.0"

NetworkProviderVersion update version string anytime provider adds new features

Variables

View Source
var (
	// ActivationPollInterval is the interval for polling an activation status on creation
	ActivationPollInterval = ActivationPollMinimum
)

Functions

func InitTemplates

func InitTemplates(otm map[string]*OutputTemplate)

InitTemplates populates map of templates given as argument with output templates

func Provider

func Provider() *schema.Provider

Provider returns the Akamai terraform.Resource provider.

func RemoveIndex

func RemoveIndex(hl []string, index int) []string

RemoveIndex removes an element from the slice and returns it

func RenderTemplates

func RenderTemplates(ots map[string]*OutputTemplate, key string, str interface{}) (string, error)

RenderTemplates renders template and returns it as a string

func Subprovider

func Subprovider(opts ...Option) akamai.Subprovider

Subprovider returns a core sub provider

func VerifyContractGroupUnchanged

func VerifyContractGroupUnchanged(_ context.Context, d *schema.ResourceDiff, m interface{}) error

VerifyContractGroupUnchanged compares the configuration's value for the contract_id and group_id with the resource's value specified in the resources's ID, to ensure that the user has not inadvertently modified the configuration's value; any such modifications indicate an incorrect understanding of the Update operation.

Types

type Option

type Option func(p *provider)

Option is a networklist provider option

func WithClient

func WithClient(c networklists.NTWRKLISTS) Option

WithClient sets the client interface function, used for mocking and testing

type OutputTemplate

type OutputTemplate struct {
	TemplateName   string
	TemplateType   string
	TableTitle     string
	TemplateString string
}

OutputTemplate contains template data

func GetTemplate

func GetTemplate(ots map[string]*OutputTemplate, key string) (*OutputTemplate, error)

GetTemplate given map of templates and a key, returns template stored under this key

type OutputTemplates

type OutputTemplates map[string]*OutputTemplate

OutputTemplates is a map of templates

Jump to

Keyboard shortcuts

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