Documentation ¶
Overview ¶
Package datastream provides access to the Akamai DataStream APIs
Index ¶
- Constants
- Variables
- type AbstractConnector
- type ActivateStreamRequest
- type Activation
- type ActivationHistoryEntry
- type AuthenticationType
- type AzureConnector
- type ClientFunc
- type CreateStreamRequest
- type CustomHTTPSConnector
- type DS
- type DataSetField
- type DataSets
- type DatadogConnector
- type DatasetFieldID
- type DeactivateStreamRequest
- type DeleteStreamRequest
- type DelimiterType
- type DeliveryConfiguration
- type Destination
- type DestinationType
- type DetailedStreamVersion
- type ElasticsearchConnector
- type Error
- type FormatType
- type Frequency
- type GCSConnector
- type GetActivationHistoryRequest
- type GetDatasetFieldsRequest
- type GetPropertiesRequest
- type GetStreamRequest
- type IntervalInSeconds
- type ListStreamsRequest
- type LogglyConnector
- type Mock
- func (m *Mock) ActivateStream(ctx context.Context, r ActivateStreamRequest) (*DetailedStreamVersion, error)
- func (m *Mock) CreateStream(ctx context.Context, r CreateStreamRequest) (*DetailedStreamVersion, error)
- func (m *Mock) DeactivateStream(ctx context.Context, r DeactivateStreamRequest) (*DetailedStreamVersion, error)
- func (m *Mock) DeleteStream(ctx context.Context, r DeleteStreamRequest) error
- func (m *Mock) GetActivationHistory(ctx context.Context, r GetActivationHistoryRequest) ([]ActivationHistoryEntry, error)
- func (m *Mock) GetDatasetFields(ctx context.Context, r GetDatasetFieldsRequest) (*DataSets, error)
- func (m *Mock) GetProperties(ctx context.Context, r GetPropertiesRequest) (*PropertiesDetails, error)
- func (m *Mock) GetStream(ctx context.Context, r GetStreamRequest) (*DetailedStreamVersion, error)
- func (m *Mock) ListStreams(ctx context.Context, r ListStreamsRequest) ([]StreamDetails, error)
- func (m *Mock) UpdateStream(ctx context.Context, r UpdateStreamRequest) (*DetailedStreamVersion, error)
- type NewRelicConnector
- type Option
- type OracleCloudStorageConnector
- type Properties
- type PropertiesDetails
- type Property
- type PropertyDetails
- type PropertyID
- type RequestErrors
- type S3Connector
- type SplunkConnector
- type Stream
- type StreamConfiguration
- type StreamDetails
- type StreamStatus
- type StreamUpdate
- type SumoLogicConnector
- type UpdateStreamRequest
Constants ¶
const ( // DestinationTypeAzure const DestinationTypeAzure DestinationType = "AZURE" // DestinationTypeS3 const DestinationTypeS3 DestinationType = "S3" // DestinationTypeDataDog const DestinationTypeDataDog DestinationType = "DATADOG" // DestinationTypeSplunk const DestinationTypeSplunk DestinationType = "SPLUNK" // DestinationTypeGcs const DestinationTypeGcs DestinationType = "GCS" // DestinationTypeHTTPS const DestinationTypeHTTPS DestinationType = "HTTPS" // DestinationTypeSumoLogic const DestinationTypeSumoLogic DestinationType = "SUMO_LOGIC" // DestinationTypeOracle const DestinationTypeOracle DestinationType = "Oracle_Cloud_Storage" // DestinationTypeLoggly const DestinationTypeLoggly DestinationType = "LOGGLY" // DestinationTypeNewRelic const DestinationTypeNewRelic DestinationType = "NEWRELIC" // DestinationTypeElasticsearch const DestinationTypeElasticsearch DestinationType = "ELASTICSEARCH" // AuthenticationTypeNone const AuthenticationTypeNone AuthenticationType = "NONE" // AuthenticationTypeBasic const AuthenticationTypeBasic AuthenticationType = "BASIC" )
const ( // StreamStatusActivated const StreamStatusActivated StreamStatus = "ACTIVATED" // StreamStatusDeactivated const StreamStatusDeactivated StreamStatus = "DEACTIVATED" // StreamStatusActivating const StreamStatusActivating StreamStatus = "ACTIVATING" // StreamStatusDeactivating const state StreamStatusDeactivating StreamStatus = "DEACTIVATING" // StreamStatusInactive const StreamStatusInactive StreamStatus = "INACTIVE" // DelimiterTypeSpace const DelimiterTypeSpace DelimiterType = "SPACE" // FormatTypeStructured const FormatTypeStructured FormatType = "STRUCTURED" // FormatTypeJson const FormatTypeJson FormatType = "JSON" // IntervalInSeconds30 const IntervalInSeconds30 IntervalInSeconds = 30 // IntervalInSeconds60 const IntervalInSeconds60 IntervalInSeconds = 60 )
Variables ¶
var ( // ErrGetProperties is returned when GetProperties fails ErrGetProperties = errors.New("list properties") // ErrGetDatasetFields is returned when GetDatasetFields fails ErrGetDatasetFields = errors.New("list data set fields") )
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") )
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") )
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 { SetDestinationType() 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 Activation ¶
type Activation interface { // ActivateStream activates stream with given ID. // // See: https://techdocs.akamai.com/datastream2/v2/reference/put-stream-activate ActivateStream(context.Context, ActivateStreamRequest) (*DetailedStreamVersion, error) // DeactivateStream deactivates stream with given ID. // // See: https://techdocs.akamai.com/datastream2/v2/reference/put-stream-deactivate DeactivateStream(context.Context, DeactivateStreamRequest) (*DetailedStreamVersion, error) // GetActivationHistory returns a history of activation status changes for all versions of a stream. // // See: https://techdocs.akamai.com/datastream2/v2/reference/get-stream-activation-history GetActivationHistory(context.Context, GetActivationHistoryRequest) ([]ActivationHistoryEntry, error) }
Activation is a ds stream activations API interface.
type ActivationHistoryEntry ¶
type ActivationHistoryEntry struct { ModifiedBy string `json:"modifiedBy"` ModifiedDate string `json:"modifiedDate"` Status StreamStatus `json:"status"` StreamID int64 `json:"streamId"` StreamVersion int64 `json:"streamVersion"` }
ActivationHistoryEntry contains single ActivationHistory item
type AuthenticationType ¶
type AuthenticationType string
AuthenticationType is used to create an "enum" of possible AuthenticationTypes of the CustomHTTPSConnector
type AzureConnector ¶
type AzureConnector struct { DestinationType DestinationType `json:"destinationType"` AccessKey string `json:"accessKey"` AccountName string `json:"accountName"` DisplayName string `json:"displayName"` ContainerName string `json:"containerName"` Path string `json:"path"` }
AzureConnector provides details about the Azure Storage destination configuration in a data stream See: https://techdocs.akamai.com/datastream2/v2/reference/post-stream
func (*AzureConnector) SetDestinationType ¶
func (c *AzureConnector) SetDestinationType()
SetDestinationType for AzureConnector
func (*AzureConnector) Validate ¶
func (c *AzureConnector) Validate() error
Validate validates AzureConnector
type ClientFunc ¶
ClientFunc is a ds client new method, this can be used for mocking
type CreateStreamRequest ¶
type CreateStreamRequest struct { StreamConfiguration StreamConfiguration Activate bool }
CreateStreamRequest is passed to CreateStream
func (CreateStreamRequest) Validate ¶
func (r CreateStreamRequest) Validate() error
Validate validates CreateStreamRequest
type CustomHTTPSConnector ¶
type CustomHTTPSConnector struct { DestinationType DestinationType `json:"destinationType"` AuthenticationType AuthenticationType `json:"authenticationType"` CompressLogs bool `json:"compressLogs"` DisplayName string `json:"displayName"` Password string `json:"password,omitempty"` Endpoint string `json:"endpoint"` 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/v2/reference/post-stream
func (*CustomHTTPSConnector) SetDestinationType ¶
func (c *CustomHTTPSConnector) SetDestinationType()
SetDestinationType for CustomHTTPSConnector
func (*CustomHTTPSConnector) Validate ¶
func (c *CustomHTTPSConnector) Validate() error
Validate validates CustomHTTPSConnector
type DataSetField ¶
type DataSetField struct { DatasetFieldID int `json:"datasetFieldId"` DatasetFieldDescription string `json:"datasetFieldDescription"` DatasetFieldJsonKey string `json:"datasetFieldJsonKey"` DatasetFieldName string `json:"datasetFieldName"` DatasetFieldGroup string `json:"datasetFieldGroup"` }
DataSetField is a data set field selected from the associated template that the stream monitors in logs
type DataSets ¶
type DataSets struct {
DataSetFields []DataSetField `json:"datasetFields"`
}
DataSets is a list of fields selected from the associated template that the stream monitors in logs
type DatadogConnector ¶
type DatadogConnector struct { DestinationType DestinationType `json:"destinationType"` AuthToken string `json:"authToken"` CompressLogs bool `json:"compressLogs"` DisplayName string `json:"displayName"` Service string `json:"service,omitempty"` Source string `json:"source,omitempty"` Tags string `json:"tags,omitempty"` Endpoint string `json:"endpoint"` }
DatadogConnector provides detailed information about Datadog destination See: https://techdocs.akamai.com/datastream2/v2/reference/post-stream
func (*DatadogConnector) SetDestinationType ¶
func (c *DatadogConnector) SetDestinationType()
SetDestinationType for DatadogConnector
func (*DatadogConnector) Validate ¶
func (c *DatadogConnector) Validate() error
Validate validates DatadogConnector
type DatasetFieldID ¶
type DatasetFieldID struct {
DatasetFieldID int `json:"datasetFieldId"`
}
DatasetFieldID is a dataset field value used in create stream request
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 DeleteStreamRequest ¶
type DeleteStreamRequest struct {
StreamID int64
}
DeleteStreamRequest is passed to DeleteStream
func (DeleteStreamRequest) Validate ¶
func (r DeleteStreamRequest) Validate() error
Validate validates DeleteStreamRequest
type DelimiterType ¶
type DelimiterType string
DelimiterType enum
func DelimiterTypePtr ¶
func DelimiterTypePtr(d DelimiterType) *DelimiterType
DelimiterTypePtr returns the address of the DelimiterType
type DeliveryConfiguration ¶
type DeliveryConfiguration struct { Delimiter *DelimiterType `json:"fieldDelimiter,omitempty"` Format FormatType `json:"format"` Frequency Frequency `json:"frequency"` UploadFilePrefix string `json:"uploadFilePrefix,omitempty"` UploadFileSuffix string `json:"uploadFileSuffix,omitempty"` }
DeliveryConfiguration of the configuration of log lines, names of the files sent to a destination, and delivery frequency for these files
type Destination ¶
type Destination struct { AuthenticationType AuthenticationType `json:"authenticationType"` CompressLogs bool `json:"compressLogs"` DestinationType DestinationType `json:"destinationType"` DisplayName string `json:"displayName"` Path string `json:"path"` 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"` }
Destination provides detailed information about the destination’s configuration in the stream
type DestinationType ¶
type DestinationType string
DestinationType is used to create an "enum" of possible DestinationTypes
type DetailedStreamVersion ¶
type DetailedStreamVersion struct { ContractID string `json:"contractId"` CreatedBy string `json:"createdBy"` CreatedDate string `json:"createdDate"` CollectMidgress bool `json:"collectMidgress,omitempty"` DatasetFields []DataSetField `json:"datasetFields"` DeliveryConfiguration DeliveryConfiguration `json:"deliveryConfiguration"` Destination Destination `json:"destination"` GroupID int `json:"groupId,omitempty"` LatestVersion int `json:"latestVersion"` ModifiedBy string `json:"modifiedBy"` ModifiedDate string `json:"modifiedDate"` NotificationEmails []string `json:"notificationEmails"` ProductID string `json:"productId"` Properties []Property `json:"properties"` StreamID int64 `json:"streamId"` StreamName string `json:"streamName"` StreamVersion int64 `json:"streamVersion"` StreamStatus StreamStatus `json:"streamStatus"` }
DetailedStreamVersion is returned from GetStream
type ElasticsearchConnector ¶
type ElasticsearchConnector struct { DestinationType DestinationType `json:"destinationType"` DisplayName string `json:"displayName"` 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 destination. See: https://techdocs.akamai.com/datastream2/v2/reference/post-stream
func (*ElasticsearchConnector) SetDestinationType ¶
func (c *ElasticsearchConnector) SetDestinationType()
SetDestinationType 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
type Frequency ¶
type Frequency struct {
IntervalInSeconds IntervalInSeconds `json:"intervalInSeconds"`
}
The Frequency of collecting logs from each uploader and sending these logs to a destination.
type GCSConnector ¶
type GCSConnector struct { DestinationType DestinationType `json:"destinationType"` Bucket string `json:"bucket"` DisplayName string `json:"displayName"` 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 destination See: https://techdocs.akamai.com/datastream2/v2/reference/post-stream
func (*GCSConnector) SetDestinationType ¶
func (c *GCSConnector) SetDestinationType()
SetDestinationType 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 {
ProductID *string
}
GetDatasetFieldsRequest contains parameters necessary to send a GetDatasetFields request
type GetPropertiesRequest ¶
type GetPropertiesRequest struct {
GroupId int
}
GetPropertiesRequest contains parameters necessary to send a GetProperties request
func (GetPropertiesRequest) Validate ¶
func (r GetPropertiesRequest) Validate() error
Validate performs validation on GetPropertiesRequest
type GetStreamRequest ¶
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 { DestinationType DestinationType `json:"destinationType"` DisplayName string `json:"displayName"` 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 destination. See: https://techdocs.akamai.com/datastream2/v2/reference/post-stream
func (*LogglyConnector) SetDestinationType ¶
func (c *LogglyConnector) SetDestinationType()
SetDestinationType for LogglyConnector
func (*LogglyConnector) Validate ¶
func (c *LogglyConnector) Validate() error
Validate validates LogglyConnector
type Mock ¶
func (*Mock) ActivateStream ¶
func (m *Mock) ActivateStream(ctx context.Context, r ActivateStreamRequest) (*DetailedStreamVersion, error)
func (*Mock) CreateStream ¶
func (m *Mock) CreateStream(ctx context.Context, r CreateStreamRequest) (*DetailedStreamVersion, error)
func (*Mock) DeactivateStream ¶
func (m *Mock) DeactivateStream(ctx context.Context, r DeactivateStreamRequest) (*DetailedStreamVersion, error)
func (*Mock) DeleteStream ¶
func (m *Mock) DeleteStream(ctx context.Context, r DeleteStreamRequest) error
func (*Mock) GetActivationHistory ¶
func (m *Mock) GetActivationHistory(ctx context.Context, r GetActivationHistoryRequest) ([]ActivationHistoryEntry, error)
func (*Mock) GetDatasetFields ¶
func (*Mock) GetProperties ¶
func (m *Mock) GetProperties(ctx context.Context, r GetPropertiesRequest) (*PropertiesDetails, error)
func (*Mock) GetStream ¶
func (m *Mock) GetStream(ctx context.Context, r GetStreamRequest) (*DetailedStreamVersion, error)
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) (*DetailedStreamVersion, error)
type NewRelicConnector ¶
type NewRelicConnector struct { DestinationType DestinationType `json:"destinationType"` DisplayName string `json:"displayName"` Endpoint string `json:"endpoint"` AuthToken string `json:"authToken"` ContentType string `json:"contentType,omitempty"` CustomHeaderName string `json:"customHeaderName,omitempty"` CustomHeaderValue string `json:"customHeaderValue,omitempty"` }
NewRelicConnector contains details about New Relic destination. See: https://techdocs.akamai.com/datastream2/v2/reference/post-stream
func (*NewRelicConnector) SetDestinationType ¶
func (c *NewRelicConnector) SetDestinationType()
SetDestinationType for NewRelicConnector
func (*NewRelicConnector) Validate ¶
func (c *NewRelicConnector) Validate() error
Validate validates NewRelicConnector
type OracleCloudStorageConnector ¶
type OracleCloudStorageConnector struct { DestinationType DestinationType `json:"destinationType"` AccessKey string `json:"accessKey"` Bucket string `json:"bucket"` DisplayName string `json:"displayName"` Namespace string `json:"namespace"` Path string `json:"path"` Region string `json:"region"` SecretAccessKey string `json:"secretAccessKey"` }
OracleCloudStorageConnector provides details about the Oracle Cloud Storage destination See: https://techdocs.akamai.com/datastream2/v2/reference/post-stream
func (*OracleCloudStorageConnector) SetDestinationType ¶
func (c *OracleCloudStorageConnector) SetDestinationType()
SetDestinationType 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/v2/reference/get-group-properties GetProperties(context.Context, GetPropertiesRequest) (*PropertiesDetails, error) // GetDatasetFields returns groups of data set fields available in the template. // // See: https://techdocs.akamai.com/datastream2/v2/reference/get-dataset-fields GetDatasetFields(context.Context, GetDatasetFieldsRequest) (*DataSets, error) }
Properties is an interface for listing various DS API properties
type PropertiesDetails ¶
type PropertiesDetails struct { Properties []PropertyDetails `json:"properties"` GroupID int `json:"groupId"` }
PropertiesDetails identifies the properties belong to the given group.
type Property ¶
type Property struct { PropertyID int `json:"propertyId"` PropertyName string `json:"propertyName"` }
Property identifies brief info about the properties monitored in the stream.
type PropertyDetails ¶
type PropertyDetails struct { Hostnames []string `json:"hostnames"` ProductID string `json:"productId"` ProductName string `json:"productName"` PropertyID int `json:"propertyId"` PropertyName string `json:"propertyName"` ContractID string `json:"contractId"` }
PropertyDetails identifies detailed info about the properties monitored in the stream.
type PropertyID ¶
type PropertyID struct {
PropertyID int `json:"propertyId"`
}
PropertyID identifies property details required in the create stream request.
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 { DestinationType DestinationType `json:"destinationType"` AccessKey string `json:"accessKey"` Bucket string `json:"bucket"` DisplayName string `json:"displayName"` Path string `json:"path"` Region string `json:"region"` SecretAccessKey string `json:"secretAccessKey"` }
S3Connector provides details about the Amazon S3 destination in a stream See: https://techdocs.akamai.com/datastream2/v2/reference/post-stream
func (*S3Connector) SetDestinationType ¶
func (c *S3Connector) SetDestinationType()
SetDestinationType for S3Connector
func (*S3Connector) Validate ¶
func (c *S3Connector) Validate() error
Validate validates S3Connector
type SplunkConnector ¶
type SplunkConnector struct { DestinationType DestinationType `json:"destinationType"` CompressLogs bool `json:"compressLogs"` DisplayName string `json:"displayName"` EventCollectorToken string `json:"eventCollectorToken"` Endpoint string `json:"endpoint"` 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 destination See: https://techdocs.akamai.com/datastream2/v2/reference/post-stream
func (*SplunkConnector) SetDestinationType ¶
func (c *SplunkConnector) SetDestinationType()
SetDestinationType for SplunkConnector
func (*SplunkConnector) Validate ¶
func (c *SplunkConnector) Validate() error
Validate validates SplunkConnector
type Stream ¶
type Stream interface { // CreateStream creates a stream // // See: https://techdocs.akamai.com/datastream2/v2/reference/post-stream CreateStream(context.Context, CreateStreamRequest) (*DetailedStreamVersion, error) // GetStream gets stream details // // See: https://techdocs.akamai.com/datastream2/v2/reference/get-stream GetStream(context.Context, GetStreamRequest) (*DetailedStreamVersion, error) // UpdateStream updates a stream // // See: https://techdocs.akamai.com/datastream2/v2/reference/put-stream UpdateStream(context.Context, UpdateStreamRequest) (*DetailedStreamVersion, error) // DeleteStream deletes a stream // // See: https://techdocs.akamai.com/datastream2/v2/reference/delete-stream DeleteStream(context.Context, DeleteStreamRequest) error // ListStreams retrieves list of streams // // See: https://techdocs.akamai.com/datastream2/v2/reference/get-streams ListStreams(context.Context, ListStreamsRequest) ([]StreamDetails, error) }
Stream is a ds stream operations API interface
type StreamConfiguration ¶
type StreamConfiguration struct { ContractID string `json:"contractId"` CollectMidgress bool `json:"collectMidgress,omitempty"` DatasetFields []DatasetFieldID `json:"datasetFields"` Destination AbstractConnector `json:"destination"` DeliveryConfiguration DeliveryConfiguration `json:"deliveryConfiguration"` GroupID int `json:"groupId,omitempty"` NotificationEmails []string `json:"notificationEmails,omitempty"` Properties []PropertyID `json:"properties"` StreamName string `json:"streamName"` }
StreamConfiguration is used in CreateStream as a request body
type StreamDetails ¶
type StreamDetails struct { ContractID string `json:"contractId"` CreatedBy string `json:"createdBy"` CreatedDate string `json:"createdDate"` GroupID int `json:"groupId"` LatestVersion int64 `json:"latestVersion"` ModifiedBy string `json:"modifiedBy"` ModifiedDate string `json:"modifiedDate"` Properties []Property `json:"properties"` ProductID string `json:"productId"` StreamID int64 `json:"streamId"` StreamName string `json:"streamName"` StreamStatus StreamStatus `json:"streamStatus"` StreamVersion int64 `json:"streamVersion"` }
StreamDetails contains information about stream
type StreamStatus ¶
type StreamStatus string
StreamStatus is used to create an enum of possible StreamStatus values
type StreamUpdate ¶
type StreamUpdate struct { StreamID int64 `json:"streamId"` StreamVersion int64 `json:"streamVersion"` }
StreamUpdate contains information about stream ID and version
type SumoLogicConnector ¶
type SumoLogicConnector struct { DestinationType DestinationType `json:"destinationType"` CollectorCode string `json:"collectorCode"` CompressLogs bool `json:"compressLogs"` DisplayName string `json:"displayName"` 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 destination See: https://techdocs.akamai.com/datastream2/v2/reference/post-stream
func (*SumoLogicConnector) SetDestinationType ¶
func (c *SumoLogicConnector) SetDestinationType()
SetDestinationType for SumoLogicConnector
func (*SumoLogicConnector) Validate ¶
func (c *SumoLogicConnector) Validate() error
Validate validates SumoLogicConnector
type UpdateStreamRequest ¶
type UpdateStreamRequest struct { StreamID int64 StreamConfiguration StreamConfiguration Activate bool }
UpdateStreamRequest is passed to UpdateStream
func (UpdateStreamRequest) Validate ¶
func (r UpdateStreamRequest) Validate() error
Validate validates UpdateStreamRequest