datastream

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: 16 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// DefaultUploadFilePrefix specifies default upload file prefix for supported connectors
	DefaultUploadFilePrefix = "ak"

	// DefaultUploadFileSuffix specifies default upload file suffix for supported connectors
	DefaultUploadFileSuffix = "ds"
)
View Source
const ProviderVersion string = "v0.0.1"

ProviderVersion update version string anytime provider adds new features

Variables

View Source
var (
	// PollForActivationStatusChangeInterval defines retry interval for getting status of a pending change
	PollForActivationStatusChangeInterval = 10 * time.Minute

	// ExactlyOneConnectorRule defines connector fields names
	ExactlyOneConnectorRule = []string{
		"s3_connector", "azure_connector", "gcs_connector", "https_connector",
		"splunk_connector", "datadog_connector", "oracle_connector", "sumologic_connector",
	}

	// ConnectorsWithoutFilenameOptionsConfig defines connectors wtihout option to configure prefix and suffix
	ConnectorsWithoutFilenameOptionsConfig = []string{
		"https_connector", "datadog_connector", "splunk_connector", "sumologic_connector",
	}

	// DatastreamResourceTimeout is the default timeout for the resource operations (max activation time + polling interval)
	DatastreamResourceTimeout = 180 * time.Minute
)

Functions

func ConfigToSet

func ConfigToSet(cfg datastream.Config) []map[string]interface{}

ConfigToSet converts Config struct to set

func ConnectorToMap

func ConnectorToMap(connectors []datastream.ConnectorDetails, d *schema.ResourceData) (string, map[string]interface{}, error)

ConnectorToMap converts ConnectorDetails struct to map of properties

func DataSetFieldsToList

func DataSetFieldsToList(dataSets []datastream.DataSets) []int

DataSetFieldsToList converts slice of DataSets to slice of ints

func FrequencyToSet

func FrequencyToSet(freq datastream.Frequency) []map[string]interface{}

FrequencyToSet converts Frequency struct to map

func GetAzureConnector

func GetAzureConnector(props map[string]interface{}) datastream.AbstractConnector

GetAzureConnector builds AzureConnector structure

func GetConfig

func GetConfig(set *schema.Set) (*datastream.Config, error)

GetConfig builds Config structure

func GetConnectors

func GetConnectors(d *schema.ResourceData, keys []string) ([]datastream.AbstractConnector, error)

GetConnectors builds Connectors list

func GetDatadogConnector

func GetDatadogConnector(props map[string]interface{}) datastream.AbstractConnector

GetDatadogConnector builds DatadogConnector structure

func GetFrequency

func GetFrequency(set *schema.Set) (*datastream.Frequency, error)

GetFrequency builds Frequency structure

func GetGCSConnector

func GetGCSConnector(props map[string]interface{}) datastream.AbstractConnector

GetGCSConnector builds GCSConnector structure

func GetHTTPSConnector

func GetHTTPSConnector(props map[string]interface{}) datastream.AbstractConnector

GetHTTPSConnector builds CustomHTTPSConnector structure

func GetOracleConnector

func GetOracleConnector(props map[string]interface{}) datastream.AbstractConnector

GetOracleConnector builds OracleCloudStorageConnector structure

func GetPropertiesList

func GetPropertiesList(properties []interface{}) ([]int, error)

GetPropertiesList converts propertyIDs with and without "prp_" prefix to slice of ints

func GetS3Connector

func GetS3Connector(props map[string]interface{}) datastream.AbstractConnector

GetS3Connector builds S3Connector structure

func GetSplunkConnector

func GetSplunkConnector(props map[string]interface{}) datastream.AbstractConnector

GetSplunkConnector builds SplunkConnector structure

func GetSumoLogicConnector

func GetSumoLogicConnector(props map[string]interface{}) datastream.AbstractConnector

GetSumoLogicConnector builds SumoLogicConnector structure

func InterfaceSliceToIntSlice

func InterfaceSliceToIntSlice(list []interface{}) []int

InterfaceSliceToIntSlice converts schema.Set to slice of ints

func InterfaceSliceToStringSlice

func InterfaceSliceToStringSlice(list []interface{}) []string

InterfaceSliceToStringSlice converts schema.Set to slice of ints

func MapAzureConnector

func MapAzureConnector(c datastream.ConnectorDetails, s map[string]interface{}) map[string]interface{}

MapAzureConnector selects fields needed for AzureConnector

func MapDatadogConnector

func MapDatadogConnector(c datastream.ConnectorDetails, s map[string]interface{}) map[string]interface{}

MapDatadogConnector selects fields needed for DatadogConnector

func MapGCSConnector

func MapGCSConnector(c datastream.ConnectorDetails, s map[string]interface{}) map[string]interface{}

MapGCSConnector selects fields needed for GCSConnector

func MapHTTPSConnector

func MapHTTPSConnector(c datastream.ConnectorDetails, s map[string]interface{}) map[string]interface{}

MapHTTPSConnector selects fields needed for CustomHTTPSConnector

func MapOracleConnector

func MapOracleConnector(c datastream.ConnectorDetails, s map[string]interface{}) map[string]interface{}

MapOracleConnector selects fields needed for OracleCloudStorageConnector

func MapS3Connector

func MapS3Connector(c datastream.ConnectorDetails, s map[string]interface{}) map[string]interface{}

MapS3Connector selects fields needed for S3Connector

func MapSplunkConnector

func MapSplunkConnector(c datastream.ConnectorDetails, s map[string]interface{}) map[string]interface{}

MapSplunkConnector selects fields needed for SplunkConnector

func MapSumoLogicConnector

func MapSumoLogicConnector(c datastream.ConnectorDetails, s map[string]interface{}) map[string]interface{}

MapSumoLogicConnector selects fields needed for SumoLogicConnector

func PropertyToList

func PropertyToList(properties []datastream.Property) []string

PropertyToList converts slice of Properties to slice of ints

func Provider

func Provider() *schema.Provider

Provider returns the Akamai terraform.Resource provider.

func StreamIDToPapiJSON

func StreamIDToPapiJSON(id int64) string

StreamIDToPapiJSON generates PAPI JSON with given id of a stream

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 ds provider option

func WithClient

func WithClient(c datastream.DS) Option

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

Jump to

Keyboard shortcuts

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