datastream

package
v5.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Overview

Package datastream provides access to the Akamai DataStream APIs

See: https://techdocs.akamai.com/datastream2/reference/api

Index

Constants

View Source
const (
	// ConnectorTypeAzure const
	ConnectorTypeAzure ConnectorType = "AZURE"
	// ConnectorTypeS3 const
	ConnectorTypeS3 ConnectorType = "S3"
	// ConnectorTypeDataDog const
	ConnectorTypeDataDog ConnectorType = "DATADOG"
	// ConnectorTypeSplunk const
	ConnectorTypeSplunk ConnectorType = "SPLUNK"
	// ConnectorTypeGcs const
	ConnectorTypeGcs ConnectorType = "GCS"
	// ConnectorTypeHTTPS const
	ConnectorTypeHTTPS ConnectorType = "HTTPS"
	// ConnectorTypeSumoLogic const
	ConnectorTypeSumoLogic ConnectorType = "SUMO_LOGIC"
	// ConnectorTypeOracle const
	ConnectorTypeOracle ConnectorType = "Oracle_Cloud_Storage"
	// ConnectorTypeLoggly const
	ConnectorTypeLoggly ConnectorType = "LOGGLY"
	// ConnectorTypeNewRelic const
	ConnectorTypeNewRelic ConnectorType = "NEWRELIC"
	// ConnectorTypeElasticsearch const
	ConnectorTypeElasticsearch ConnectorType = "ELASTICSEARCH"

	// AuthenticationTypeNone const
	AuthenticationTypeNone AuthenticationType = "NONE"
	// AuthenticationTypeBasic const
	AuthenticationTypeBasic AuthenticationType = "BASIC"
)
View Source
const (
	// ActivationStatusActivated const
	ActivationStatusActivated ActivationStatus = "ACTIVATED"
	// ActivationStatusDeactivated const
	ActivationStatusDeactivated ActivationStatus = "DEACTIVATED"
	// ActivationStatusActivating const
	ActivationStatusActivating ActivationStatus = "ACTIVATING"
	// ActivationStatusDeactivating const state
	ActivationStatusDeactivating ActivationStatus = "DEACTIVATING"
	// ActivationStatusInactive const
	ActivationStatusInactive ActivationStatus = "INACTIVE"

	// StreamTypeRawLogs const
	StreamTypeRawLogs StreamType = "RAW_LOGS"

	// TemplateNameEdgeLogs const
	TemplateNameEdgeLogs TemplateName = "EDGE_LOGS"

	// DelimiterTypeSpace const
	DelimiterTypeSpace DelimiterType = "SPACE"

	// FormatTypeStructured const
	FormatTypeStructured FormatType = "STRUCTURED"
	// FormatTypeJson const
	FormatTypeJson FormatType = "JSON"

	// TimeInSec30 const
	TimeInSec30 TimeInSec = 30
	// TimeInSec60 const
	TimeInSec60 TimeInSec = 60
)

Variables

View Source
var (
	// ErrGetProperties is returned when GetProperties fails
	ErrGetProperties = errors.New("list properties")
	// ErrGetPropertiesByGroup is returned when GetPropertiesByGroup fails
	ErrGetPropertiesByGroup = errors.New("list properties by group")
	// ErrGetDatasetFields is returned when GetDatasetFields fails
	ErrGetDatasetFields = errors.New("list data set fields")
)
View Source
var (
	// ErrCreateStream represents error when creating stream fails
	ErrCreateStream = errors.New("creating stream")
	// ErrGetStream represents error when fetching stream fails
	ErrGetStream = errors.New("fetching stream information")
	// ErrUpdateStream represents error when updating stream fails
	ErrUpdateStream = errors.New("updating stream")
	// ErrDeleteStream represents error when deleting stream fails
	ErrDeleteStream = errors.New("deleting stream")
	// ErrListStreams represents error when listing streams fails
	ErrListStreams = errors.New("listing streams")
)
View Source
var (
	// ErrActivateStream is returned when ActivateStream fails
	ErrActivateStream = errors.New("activate stream")
	// ErrDeactivateStream is returned when DeactivateStream fails
	ErrDeactivateStream = errors.New("deactivate stream")
	// ErrGetActivationHistory is returned when DeactivateStream fails
	ErrGetActivationHistory = errors.New("view activation history")
)
View Source
var (
	// ErrStructValidation is returned when given struct validation failed
	ErrStructValidation = errors.New("struct validation")
)

Functions

This section is empty.

Types

type AbstractConnector

type AbstractConnector interface {
	SetConnectorType()
	Validate() error
}

AbstractConnector is an interface for all Connector types

type ActivateStreamRequest

type ActivateStreamRequest struct {
	StreamID int64
}

ActivateStreamRequest contains parameters necessary to send a ActivateStream request

func (ActivateStreamRequest) Validate

func (r ActivateStreamRequest) Validate() error

Validate performs validation on ActivateStreamRequest

type ActivateStreamResponse

type ActivateStreamResponse struct {
	StreamVersionKey StreamVersionKey `json:"streamVersionKey"`
}

ActivateStreamResponse contains response body returned after successful stream activation

type Activation

type Activation interface {
	// ActivateStream activates stream with given ID.
	//
	// See: https://techdocs.akamai.com/datastream2/reference/put-stream-activate
	ActivateStream(context.Context, ActivateStreamRequest) (*ActivateStreamResponse, error)

	// DeactivateStream deactivates stream with given ID.
	//
	// See: https://techdocs.akamai.com/datastream2/reference/put-stream-deactivate
	DeactivateStream(context.Context, DeactivateStreamRequest) (*DeactivateStreamResponse, error)

	// GetActivationHistory returns a history of activation status changes for all versions of a stream.
	//
	// See: https://techdocs.akamai.com/datastream2/reference/get-stream-activation-history
	GetActivationHistory(context.Context, GetActivationHistoryRequest) ([]ActivationHistoryEntry, error)
}

Activation is a ds stream activations API interface.

type ActivationHistoryEntry

type ActivationHistoryEntry struct {
	CreatedBy       string `json:"createdBy"`
	CreatedDate     string `json:"createdDate"`
	IsActive        bool   `json:"isActive"`
	StreamID        int64  `json:"streamId"`
	StreamVersionID int64  `json:"streamVersionId"`
}

ActivationHistoryEntry contains single ActivationHistory item

type ActivationStatus

type ActivationStatus string

ActivationStatus is used to create an enum of possible ActivationStatus values

type AuthenticationType

type AuthenticationType string

AuthenticationType is used to create an "enum" of possible AuthenticationTypes of the CustomHTTPSConnector

type AzureConnector

type AzureConnector struct {
	ConnectorType ConnectorType `json:"connectorType"`
	AccessKey     string        `json:"accessKey"`
	AccountName   string        `json:"accountName"`
	ConnectorName string        `json:"connectorName"`
	ContainerName string        `json:"containerName"`
	Path          string        `json:"path"`
}

AzureConnector provides details about the Azure Storage connector configuration in a data stream.

See: https://techdocs.akamai.com/datastream2/docs/stream-azure-storage

func (*AzureConnector) SetConnectorType

func (c *AzureConnector) SetConnectorType()

SetConnectorType for AzureConnector

func (*AzureConnector) Validate

func (c *AzureConnector) Validate() error

Validate validates AzureConnector

type ClientFunc

type ClientFunc func(sess session.Session, ops ...Option) DS

ClientFunc is a ds client new method, this can be used for mocking

type Config

type Config struct {
	Delimiter        *DelimiterType `json:"delimiter,omitempty"`
	Format           FormatType     `json:"format,omitempty"`
	Frequency        Frequency      `json:"frequency"`
	UploadFilePrefix string         `json:"uploadFilePrefix,omitempty"`
	UploadFileSuffix string         `json:"uploadFileSuffix,omitempty"`
}

Config of the configuration of log lines, names of the files sent to a destination, and delivery frequency for these files

type ConnectorDetails

type ConnectorDetails struct {
	AuthenticationType AuthenticationType `json:"authenticationType"`
	ConnectorID        int                `json:"connectorId"`
	CompressLogs       bool               `json:"compressLogs"`
	ConnectorName      string             `json:"connectorName"`
	ConnectorType      ConnectorType      `json:"connectorType"`
	Path               string             `json:"path"`
	URL                string             `json:"url"`
	Endpoint           string             `json:"endpoint"`
	IndexName          string             `json:"indexName"`
	ServiceAccountName string             `json:"serviceAccountName"`
	ProjectID          string             `json:"projectId"`
	Service            string             `json:"service"`
	Bucket             string             `json:"bucket"`
	Tags               string             `json:"tags"`
	Region             string             `json:"region"`
	AccountName        string             `json:"accountName"`
	Namespace          string             `json:"namespace"`
	ContainerName      string             `json:"containerName"`
	Source             string             `json:"source"`
	ContentType        string             `json:"contentType"`
	CustomHeaderName   string             `json:"customHeaderName"`
	CustomHeaderValue  string             `json:"customHeaderValue"`
	TLSHostname        string             `json:"tlsHostname"`
	MTLS               string             `json:"mTLS"`
}

ConnectorDetails provides detailed information about the connector’s configuration in the stream

type ConnectorType

type ConnectorType string

ConnectorType is used to create an "enum" of possible ConnectorTypes

type CreateStreamRequest

type CreateStreamRequest struct {
	StreamConfiguration StreamConfiguration
}

CreateStreamRequest is passed to CreateStream

func (CreateStreamRequest) Validate

func (r CreateStreamRequest) Validate() error

Validate validates CreateStreamRequest

type CustomHTTPSConnector

type CustomHTTPSConnector struct {
	ConnectorType      ConnectorType      `json:"connectorType"`
	AuthenticationType AuthenticationType `json:"authenticationType"`
	CompressLogs       bool               `json:"compressLogs"`
	ConnectorName      string             `json:"connectorName"`
	Password           string             `json:"password,omitempty"`
	URL                string             `json:"url"`
	UserName           string             `json:"userName,omitempty"`
	ContentType        string             `json:"contentType,omitempty"`
	CustomHeaderName   string             `json:"customHeaderName,omitempty"`
	CustomHeaderValue  string             `json:"customHeaderValue,omitempty"`
	TLSHostname        string             `json:"tlsHostname,omitempty"`
	CACert             string             `json:"caCert,omitempty"`
	ClientCert         string             `json:"clientCert,omitempty"`
	ClientKey          string             `json:"clientKey,omitempty"`
}

CustomHTTPSConnector provides detailed information about the custom HTTPS endpoint.

See: https://techdocs.akamai.com/datastream2/docs/stream-custom-https

func (*CustomHTTPSConnector) SetConnectorType

func (c *CustomHTTPSConnector) SetConnectorType()

SetConnectorType for CustomHTTPSConnector

func (*CustomHTTPSConnector) Validate

func (c *CustomHTTPSConnector) Validate() error

Validate validates CustomHTTPSConnector

type DS

type DS interface {
	Activation
	Properties
	Stream
}

DS is the ds api interface

func Client

func Client(sess session.Session, opts ...Option) DS

Client returns a new ds Client instance with the specified controller

type DataSets

type DataSets struct {
	DatasetFields           []DatasetFields `json:"datasetFields"`
	DatasetGroupDescription string          `json:"datasetGroupDescription"`
	DatasetGroupName        string          `json:"datasetGroupName"`
}

DataSets is a list of fields selected from the associated template that the stream monitors in logs

type DatadogConnector

type DatadogConnector struct {
	ConnectorType ConnectorType `json:"connectorType"`
	AuthToken     string        `json:"authToken"`
	CompressLogs  bool          `json:"compressLogs"`
	ConnectorName string        `json:"connectorName"`
	Service       string        `json:"service,omitempty"`
	Source        string        `json:"source,omitempty"`
	Tags          string        `json:"tags,omitempty"`
	URL           string        `json:"url"`
}

DatadogConnector provides detailed information about Datadog connector.

See: https://techdocs.akamai.com/datastream2/docs/stream-datadog

func (*DatadogConnector) SetConnectorType

func (c *DatadogConnector) SetConnectorType()

SetConnectorType for DatadogConnector

func (*DatadogConnector) Validate

func (c *DatadogConnector) Validate() error

Validate validates DatadogConnector

type DatasetFields

type DatasetFields struct {
	DatasetFieldID          int    `json:"datasetFieldId"`
	DatasetFieldDescription string `json:"datasetFieldDescription"`
	DatasetFieldJsonKey     string `json:"datasetFieldJsonKey"`
	DatasetFieldName        string `json:"datasetFieldName"`
	Order                   int    `json:"order"`
}

DatasetFields is list of data set fields selected from the associated template that the stream monitors in logs

type DeactivateStreamRequest

type DeactivateStreamRequest ActivateStreamRequest

DeactivateStreamRequest contains parameters necessary to send a DeactivateStream request

func (DeactivateStreamRequest) Validate

func (r DeactivateStreamRequest) Validate() error

Validate performs validation on DeactivateStreamRequest

type DeactivateStreamResponse

type DeactivateStreamResponse ActivateStreamResponse

DeactivateStreamResponse contains response body returned after successful stream activation

type DeleteStreamRequest

type DeleteStreamRequest struct {
	StreamID int64
}

DeleteStreamRequest is passed to DeleteStream

func (DeleteStreamRequest) Validate

func (r DeleteStreamRequest) Validate() error

Validate validates DeleteStreamRequest

type DeleteStreamResponse

type DeleteStreamResponse struct {
	Message string `json:"message"`
}

DeleteStreamResponse is returned from DeleteStream

type DelimiterType

type DelimiterType string

DelimiterType enum

func DelimiterTypePtr

func DelimiterTypePtr(d DelimiterType) *DelimiterType

DelimiterTypePtr returns the address of the DelimiterType

type DetailedStreamVersion

type DetailedStreamVersion struct {
	ActivationStatus ActivationStatus   `json:"activationStatus"`
	Config           Config             `json:"config"`
	Connectors       []ConnectorDetails `json:"connectors"`
	ContractID       string             `json:"contractId"`
	CreatedBy        string             `json:"createdBy"`
	CreatedDate      string             `json:"createdDate"`
	Datasets         []DataSets         `json:"datasets"`
	EmailIDs         string             `json:"emailIds"`
	Errors           []Errors           `json:"errors"`
	GroupID          int                `json:"groupId"`
	GroupName        string             `json:"groupName"`
	ModifiedBy       string             `json:"modifiedBy"`
	ModifiedDate     string             `json:"modifiedDate"`
	ProductID        string             `json:"productId"`
	ProductName      string             `json:"productName"`
	Properties       []Property         `json:"properties"`
	StreamID         int64              `json:"streamId"`
	StreamName       string             `json:"streamName"`
	StreamType       StreamType         `json:"streamType"`
	StreamVersionID  int64              `json:"streamVersionId"`
	TemplateName     TemplateName       `json:"templateName"`
}

DetailedStreamVersion is returned from GetStream

type ElasticsearchConnector

type ElasticsearchConnector struct {
	ConnectorType     ConnectorType `json:"connectorType"`
	ConnectorName     string        `json:"connectorName"`
	Endpoint          string        `json:"endpoint"`
	IndexName         string        `json:"indexName"`
	UserName          string        `json:"userName"`
	Password          string        `json:"password"`
	ContentType       string        `json:"contentType,omitempty"`
	CustomHeaderName  string        `json:"customHeaderName,omitempty"`
	CustomHeaderValue string        `json:"customHeaderValue,omitempty"`
	TLSHostname       string        `json:"tlsHostname,omitempty"`
	CACert            string        `json:"caCert,omitempty"`
	ClientCert        string        `json:"clientCert,omitempty"`
	ClientKey         string        `json:"clientKey,omitempty"`
}

ElasticsearchConnector contains details about Elasticsearch connector.

See: https://techdocs.akamai.com/datastream2/docs/stream-elasticsearch

func (*ElasticsearchConnector) SetConnectorType

func (c *ElasticsearchConnector) SetConnectorType()

SetConnectorType for ElasticsearchConnector

func (*ElasticsearchConnector) Validate

func (c *ElasticsearchConnector) Validate() error

Validate validates ElasticsearchConnector

type Error

type Error struct {
	Type       string          `json:"type"`
	Title      string          `json:"title"`
	Detail     string          `json:"detail"`
	Instance   string          `json:"instance"`
	StatusCode int             `json:"statusCode"`
	Errors     []RequestErrors `json:"errors"`
}

Error is a ds error interface

func (*Error) Error

func (e *Error) Error() string

func (*Error) Is

func (e *Error) Is(target error) bool

Is handles error comparisons

type Errors

type Errors struct {
	Detail string `json:"detail"`
	Title  string `json:"title"`
	Type   string `json:"type"`
}

Errors associated to the stream

type FormatType

type FormatType string

FormatType enum

type Frequency

type Frequency struct {
	TimeInSec TimeInSec `json:"timeInSec"`
}

The Frequency of collecting logs from each uploader and sending these logs to a destination.

type GCSConnector

type GCSConnector struct {
	ConnectorType      ConnectorType `json:"connectorType"`
	Bucket             string        `json:"bucket"`
	ConnectorName      string        `json:"connectorName"`
	Path               string        `json:"path,omitempty"`
	PrivateKey         string        `json:"privateKey"`
	ProjectID          string        `json:"projectId"`
	ServiceAccountName string        `json:"serviceAccountName"`
}

GCSConnector provides detailed information about the Google Cloud Storage connector.

See: https://techdocs.akamai.com/datastream2/docs/stream-google-cloud

func (*GCSConnector) SetConnectorType

func (c *GCSConnector) SetConnectorType()

SetConnectorType for GCSConnector

func (*GCSConnector) Validate

func (c *GCSConnector) Validate() error

Validate validates GCSConnector

type GetActivationHistoryRequest

type GetActivationHistoryRequest ActivateStreamRequest

GetActivationHistoryRequest contains parameters necessary to send a GetActivationHistory request

func (GetActivationHistoryRequest) Validate

func (r GetActivationHistoryRequest) Validate() error

Validate performs validation on DeactivateStreamRequest

type GetDatasetFieldsRequest

type GetDatasetFieldsRequest struct {
	TemplateName TemplateName
}

GetDatasetFieldsRequest contains parameters necessary to send a GetDatasetFields request

func (GetDatasetFieldsRequest) Validate

func (r GetDatasetFieldsRequest) Validate() error

Validate performs validation on GetDatasetFieldsRequest

type GetPropertiesByGroupRequest

type GetPropertiesByGroupRequest struct {
	GroupId int
}

GetPropertiesByGroupRequest contains parameters necessary to send a GetPropertiesByGroup request

func (GetPropertiesByGroupRequest) Validate

func (r GetPropertiesByGroupRequest) Validate() error

Validate performs validation on GetPropertiesRequest

type GetPropertiesRequest

type GetPropertiesRequest struct {
	GroupId   int
	ProductId string
}

GetPropertiesRequest contains parameters necessary to send a GetProperties request

func (GetPropertiesRequest) Validate

func (r GetPropertiesRequest) Validate() error

Validate performs validation on GetPropertiesRequest

type GetStreamRequest

type GetStreamRequest struct {
	StreamID int64
	Version  *int64
}

GetStreamRequest is passed to GetStream

func (GetStreamRequest) Validate

func (r GetStreamRequest) Validate() error

Validate validates GetStreamRequest

type ListStreamsRequest

type ListStreamsRequest struct {
	GroupID *int
}

ListStreamsRequest is passed to ListStreams

type LogglyConnector

type LogglyConnector struct {
	ConnectorType     ConnectorType `json:"connectorType"`
	ConnectorName     string        `json:"connectorName"`
	Endpoint          string        `json:"endpoint"`
	AuthToken         string        `json:"authToken"`
	Tags              string        `json:"tags,omitempty"`
	ContentType       string        `json:"contentType,omitempty"`
	CustomHeaderName  string        `json:"customHeaderName,omitempty"`
	CustomHeaderValue string        `json:"customHeaderValue,omitempty"`
}

LogglyConnector contains details about Loggly connector.

See: https://techdocs.akamai.com/datastream2/docs/stream-loggly

func (*LogglyConnector) SetConnectorType

func (c *LogglyConnector) SetConnectorType()

SetConnectorType for LogglyConnector

func (*LogglyConnector) Validate

func (c *LogglyConnector) Validate() error

Validate validates LogglyConnector

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) ActivateStream

func (m *Mock) ActivateStream(ctx context.Context, r ActivateStreamRequest) (*ActivateStreamResponse, error)

func (*Mock) CreateStream

func (m *Mock) CreateStream(ctx context.Context, r CreateStreamRequest) (*StreamUpdate, error)

func (*Mock) DeactivateStream

func (*Mock) DeleteStream

func (m *Mock) DeleteStream(ctx context.Context, r DeleteStreamRequest) (*DeleteStreamResponse, error)

func (*Mock) GetActivationHistory

func (m *Mock) GetActivationHistory(ctx context.Context, r GetActivationHistoryRequest) ([]ActivationHistoryEntry, error)

func (*Mock) GetDatasetFields

func (m *Mock) GetDatasetFields(ctx context.Context, r GetDatasetFieldsRequest) ([]DataSets, error)

func (*Mock) GetProperties

func (m *Mock) GetProperties(ctx context.Context, r GetPropertiesRequest) ([]Property, error)

func (*Mock) GetPropertiesByGroup

func (m *Mock) GetPropertiesByGroup(ctx context.Context, r GetPropertiesByGroupRequest) ([]Property, error)

func (*Mock) GetStream

func (*Mock) ListStreams

func (m *Mock) ListStreams(ctx context.Context, r ListStreamsRequest) ([]StreamDetails, error)

func (*Mock) UpdateStream

func (m *Mock) UpdateStream(ctx context.Context, r UpdateStreamRequest) (*StreamUpdate, error)

type NewRelicConnector

type NewRelicConnector struct {
	ConnectorType     ConnectorType `json:"connectorType"`
	ConnectorName     string        `json:"connectorName"`
	Endpoint          string        `json:"endpoint"`
	AuthToken         string        `json:"authToken"`
	ContentType       string        `json:"contentType,omitempty"`
	CustomHeaderName  string        `json:"customHeaderName,omitempty"`
	CustomHeaderValue string        `json:"customHeaderValue,omitempty"`
}

NewRelicConnector connector contains details about New Relic connector.

See: https://techdocs.akamai.com/datastream2/docs/stream-new-relic

func (*NewRelicConnector) SetConnectorType

func (c *NewRelicConnector) SetConnectorType()

SetConnectorType for NewRelicConnector

func (*NewRelicConnector) Validate

func (c *NewRelicConnector) Validate() error

Validate validates NewRelicConnector

type Option

type Option func(*ds)

Option defines a DS option

type OracleCloudStorageConnector

type OracleCloudStorageConnector struct {
	ConnectorType   ConnectorType `json:"connectorType"`
	AccessKey       string        `json:"accessKey"`
	Bucket          string        `json:"bucket"`
	ConnectorName   string        `json:"connectorName"`
	Namespace       string        `json:"namespace"`
	Path            string        `json:"path"`
	Region          string        `json:"region"`
	SecretAccessKey string        `json:"secretAccessKey"`
}

OracleCloudStorageConnector provides details about the Oracle Cloud Storage connector.

See: https://techdocs.akamai.com/datastream2/docs/stream-oracle-cloud

func (*OracleCloudStorageConnector) SetConnectorType

func (c *OracleCloudStorageConnector) SetConnectorType()

SetConnectorType for OracleCloudStorageConnector

func (*OracleCloudStorageConnector) Validate

func (c *OracleCloudStorageConnector) Validate() error

Validate validates OracleCloudStorageConnector

type Properties

type Properties interface {
	// GetProperties returns properties that are active on the production and staging network for a specific product type that are available within a group.
	//
	// See: https://techdocs.akamai.com/datastream2/reference/get-product-properties
	GetProperties(context.Context, GetPropertiesRequest) ([]Property, error)

	// GetPropertiesByGroup returns properties that are active on the production and staging network and available within a specific group.
	//
	// See: https://techdocs.akamai.com/datastream2/reference/get-group-properties
	GetPropertiesByGroup(context.Context, GetPropertiesByGroupRequest) ([]Property, error)

	// GetDatasetFields returns groups of data set fields available in the template.
	//
	// See: https://techdocs.akamai.com/datastream2/reference/get-template
	GetDatasetFields(context.Context, GetDatasetFieldsRequest) ([]DataSets, error)
}

Properties is an interface for listing various DS API properties.

type Property

type Property struct {
	Hostnames    []string `json:"hostnames"`
	ProductID    string   `json:"productId"`
	ProductName  string   `json:"productName"`
	PropertyID   int      `json:"propertyId"`
	PropertyName string   `json:"propertyName"`
}

Property identifies the properties monitored in the stream.

type RequestErrors

type RequestErrors struct {
	Type     string `json:"type"`
	Title    string `json:"title"`
	Instance string `json:"instance,omitempty"`
	Detail   string `json:"detail"`
}

RequestErrors is an optional errors array that lists potentially more than one problem detected in the request

type S3Connector

type S3Connector struct {
	ConnectorType   ConnectorType `json:"connectorType"`
	AccessKey       string        `json:"accessKey"`
	Bucket          string        `json:"bucket"`
	ConnectorName   string        `json:"connectorName"`
	Path            string        `json:"path"`
	Region          string        `json:"region"`
	SecretAccessKey string        `json:"secretAccessKey"`
}

S3Connector provides details about the Amazon S3 connector in a stream.

See: https://techdocs.akamai.com/datastream2/docs/stream-amazon-s3

func (*S3Connector) SetConnectorType

func (c *S3Connector) SetConnectorType()

SetConnectorType for S3Connector

func (*S3Connector) Validate

func (c *S3Connector) Validate() error

Validate validates S3Connector

type SplunkConnector

type SplunkConnector struct {
	ConnectorType       ConnectorType `json:"connectorType"`
	CompressLogs        bool          `json:"compressLogs"`
	ConnectorName       string        `json:"connectorName"`
	EventCollectorToken string        `json:"eventCollectorToken"`
	URL                 string        `json:"url"`
	CustomHeaderName    string        `json:"customHeaderName,omitempty"`
	CustomHeaderValue   string        `json:"customHeaderValue,omitempty"`
	TLSHostname         string        `json:"tlsHostname,omitempty"`
	CACert              string        `json:"caCert,omitempty"`
	ClientCert          string        `json:"clientCert,omitempty"`
	ClientKey           string        `json:"clientKey,omitempty"`
}

SplunkConnector provides detailed information about the Splunk connector.

See: https://techdocs.akamai.com/datastream2/docs/stream-splunk

func (*SplunkConnector) SetConnectorType

func (c *SplunkConnector) SetConnectorType()

SetConnectorType for SplunkConnector

func (*SplunkConnector) Validate

func (c *SplunkConnector) Validate() error

Validate validates SplunkConnector

type Stream

Stream is a ds stream operations API interface

type StreamConfiguration

type StreamConfiguration struct {
	ActivateNow     bool                `json:"activateNow"`
	Config          Config              `json:"config"`
	Connectors      []AbstractConnector `json:"connectors,omitempty"`
	ContractID      string              `json:"contractId"`
	DatasetFieldIDs []int               `json:"datasetFieldIds"`
	EmailIDs        string              `json:"emailIds,omitempty"`
	GroupID         *int                `json:"groupId"`
	PropertyIDs     []int               `json:"propertyIds"`
	StreamName      string              `json:"streamName"`
	StreamType      StreamType          `json:"streamType"`
	TemplateName    TemplateName        `json:"templateName"`
}

StreamConfiguration is used in CreateStream as a request body

type StreamDetails

type StreamDetails struct {
	ActivationStatus ActivationStatus `json:"activationStatus"`
	Archived         bool             `json:"archived"`
	Connectors       string           `json:"connectors"`
	ContractID       string           `json:"contractId"`
	CreatedBy        string           `json:"createdBy"`
	CreatedDate      string           `json:"createdDate"`
	CurrentVersionID int64            `json:"currentVersionId"`
	Errors           []Errors         `json:"errors"`
	GroupID          int              `json:"groupId"`
	GroupName        string           `json:"groupName"`
	Properties       []Property       `json:"properties"`
	StreamID         int64            `json:"streamId"`
	StreamName       string           `json:"streamName"`
	StreamTypeName   string           `json:"streamTypeName"`
	StreamVersionID  int64            `json:"streamVersionId"`
}

StreamDetails contains information about stream

type StreamType

type StreamType string

StreamType enum

type StreamUpdate

type StreamUpdate struct {
	StreamVersionKey StreamVersionKey `json:"streamVersionKey"`
}

StreamUpdate contains information about stream ID and version

type StreamVersionKey

type StreamVersionKey struct {
	StreamID        int64 `json:"streamId"`
	StreamVersionID int64 `json:"streamVersionId"`
}

StreamVersionKey contains information about stream ID and version

type SumoLogicConnector

type SumoLogicConnector struct {
	ConnectorType     ConnectorType `json:"connectorType"`
	CollectorCode     string        `json:"collectorCode"`
	CompressLogs      bool          `json:"compressLogs"`
	ConnectorName     string        `json:"connectorName"`
	Endpoint          string        `json:"endpoint"`
	ContentType       string        `json:"contentType,omitempty"`
	CustomHeaderName  string        `json:"customHeaderName,omitempty"`
	CustomHeaderValue string        `json:"customHeaderValue,omitempty"`
}

SumoLogicConnector provides detailed information about the Sumo Logic connector.

See: https://techdocs.akamai.com/datastream2/docs/stream-sumo-logic

func (*SumoLogicConnector) SetConnectorType

func (c *SumoLogicConnector) SetConnectorType()

SetConnectorType for SumoLogicConnector

func (*SumoLogicConnector) Validate

func (c *SumoLogicConnector) Validate() error

Validate validates SumoLogicConnector

type TemplateName

type TemplateName string

TemplateName enum

type TimeInSec

type TimeInSec int

TimeInSec enum

type UpdateStreamRequest

type UpdateStreamRequest struct {
	StreamID            int64
	StreamConfiguration StreamConfiguration
}

UpdateStreamRequest is passed to UpdateStream

func (UpdateStreamRequest) Validate

func (r UpdateStreamRequest) Validate() error

Validate validates UpdateStreamRequest

Jump to

Keyboard shortcuts

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