clientlists

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 clientlists contains implementation for Akamai Terraform sub-provider responsible for creation, deployment, and management of client lists

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitTemplates

func InitTemplates(otm map[string]*OutputTemplate)

InitTemplates populates map of templates given as argument with output templates

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 Option

type Option func(p *Subprovider)

Option is a clientlists provider option

func WithClient

func WithClient(c clientlists.ClientLists) 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

type Subprovider

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

Subprovider gathers clientlists 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) clientlists.ClientLists

Client returns the CLIENTLISTS interface

func (*Subprovider) DataSources

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

DataSources returns terraform data sources for clientlists

func (*Subprovider) Resources

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

Resources returns terraform resources for clientlists

Jump to

Keyboard shortcuts

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