networklists

package
v5.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MPL-2.0 Imports: 23 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
)

Variables

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

	// CreateActivationRetry poll wait time code waits between retries for activation creation
	CreateActivationRetry = 10 * time.Second
)

Functions

func InitTemplates

func InitTemplates(otm map[string]*OutputTemplate)

InitTemplates populates map of templates given as argument with output templates

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

Types

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

type Subprovider

type Subprovider struct {
	// contains filtered or unexported fields
}

Subprovider gathers networklists resources and data sources

func NewSubprovider

func NewSubprovider(opts ...option) *Subprovider

NewSubprovider returns a core sub provider

func (*Subprovider) Client

func (p *Subprovider) Client(meta meta.Meta) networklists.NTWRKLISTS

Client returns the PAPI interface

func (*Subprovider) DataSources

func (p *Subprovider) DataSources() map[string]*schema.Resource

DataSources returns terraform data sources for networklists

func (*Subprovider) Resources

func (p *Subprovider) Resources() map[string]*schema.Resource

Resources returns terraform resources for networklists

Jump to

Keyboard shortcuts

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