networklists

package
v4.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package networklists contains implementation for Akamai Terraform sub-provider responsible for creation, deployment, and management of network lists

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 minimum 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

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