Documentation ¶
Overview ¶
Package direct defines Direct object definitions.
Index ¶
- func IsValidDirectType(directType v1alpha.DataSourceType) bool
- type AppDynamicsConfig
- type AzureMonitorConfig
- type BigQueryConfig
- type CloudWatchConfig
- type DatadogConfig
- type Direct
- func (d Direct) GetKind() manifest.Kind
- func (d Direct) GetManifestSource() string
- func (d Direct) GetName() string
- func (d Direct) GetOrganization() string
- func (d Direct) GetProject() string
- func (d Direct) GetVersion() manifest.Version
- func (d Direct) SetManifestSource(src string) manifest.Object
- func (d Direct) SetOrganization(org string) manifest.Object
- func (d Direct) SetProject(project string) manifest.Object
- func (d Direct) Validate() error
- type DynatraceConfig
- type GCMConfig
- type HoneycombConfig
- type InfluxDBConfig
- type InstanaConfig
- type LightstepConfig
- type Metadata
- type NewRelicConfig
- type PingdomConfig
- type RedshiftConfig
- type Spec
- type SplunkConfig
- type SplunkObservabilityConfig
- type Status
- type SumoLogicConfig
- type ThousandEyesConfig
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidDirectType ¶
func IsValidDirectType(directType v1alpha.DataSourceType) bool
Types ¶
type AppDynamicsConfig ¶
type AppDynamicsConfig struct { URL string `json:"url"` ClientID string `json:"clientID"` ClientName string `json:"clientName"` AccountName string `json:"accountName"` ClientSecret string `json:"clientSecret"` }
AppDynamicsConfig represents content of AppDynamics Configuration typical for Direct Object.
type AzureMonitorConfig ¶
type AzureMonitorConfig struct { TenantID string `json:"tenantId"` ClientID string `json:"clientId"` ClientSecret string `json:"clientSecret"` }
AzureMonitorConfig represents content of AzureMonitor Configuration typical for Direct Object.
type BigQueryConfig ¶
type BigQueryConfig struct {
ServiceAccountKey string `json:"serviceAccountKey"`
}
BigQueryConfig represents content of BigQuery configuration typical for Direct Object.
type CloudWatchConfig ¶
type CloudWatchConfig struct { // Deprecated: Access Keys are no longer supported. Switch to Cross Account IAM Roles. AccessKeyID string `json:"accessKeyID,omitempty"` // Deprecated: Access Keys are no longer supported. Switch to Cross Account IAM Roles. SecretAccessKey string `json:"secretAccessKey,omitempty"` RoleARN string `json:"roleARN,omitempty"` }
CloudWatchConfig represents content of CloudWatch Configuration typical for Direct Object.
type DatadogConfig ¶
type DatadogConfig struct { Site string `json:"site"` APIKey string `json:"apiKey"` ApplicationKey string `json:"applicationKey"` }
DatadogConfig represents content of Datadog Configuration typical for Direct Object.
type Direct ¶
type Direct struct { APIVersion manifest.Version `json:"apiVersion"` Kind manifest.Kind `json:"kind"` Metadata Metadata `json:"metadata"` Spec Spec `json:"spec"` Status *Status `json:"status,omitempty"` Organization string `json:"organization,omitempty"` ManifestSource string `json:"manifestSrc,omitempty"` }
Direct struct which mapped one to one with kind: Direct yaml definition
Example ¶
package main import ( "context" "log" "github.com/nobl9/nobl9-go/internal/examples" "github.com/nobl9/nobl9-go/manifest" "github.com/nobl9/nobl9-go/manifest/v1alpha/direct" ) func main() { // Create the object: myDirect := direct.New( direct.Metadata{ Name: "my-direct", DisplayName: "My Direct", Project: "default", }, direct.Spec{ Description: "Example Direct", Datadog: &direct.DatadogConfig{ Site: "eu", APIKey: "secret", ApplicationKey: "secret", }, }, ) // Verify the object: if err := myDirect.Validate(); err != nil { log.Fatalf("direct validation failed, err: %v", err) } // Apply the object: client := examples.GetOfflineEchoClient() if err := client.Objects().V1().Apply(context.Background(), []manifest.Object{myDirect}); err != nil { log.Fatalf("failed to apply direct, err: %v", err) } }
Output: apiVersion: n9/v1alpha kind: Direct metadata: name: my-direct displayName: My Direct project: default spec: description: Example Direct datadog: site: eu apiKey: secret applicationKey: secret
func (Direct) GetManifestSource ¶
func (Direct) GetOrganization ¶
func (Direct) GetProject ¶
func (Direct) GetVersion ¶
type DynatraceConfig ¶
type DynatraceConfig struct { URL string `json:"url"` DynatraceToken string `json:"dynatraceToken"` }
DynatraceConfig represents content of Dynatrace configuration typical for Direct Object.
type GCMConfig ¶
type GCMConfig struct {
ServiceAccountKey string `json:"serviceAccountKey"`
}
GCMConfig represents content of GCM configuration typical for Direct Object.
type HoneycombConfig ¶
type HoneycombConfig struct {
APIKey string `json:"apiKey"`
}
HoneycombConfig represents content of Honeycomb Configuration typical for Direct Object.
type InfluxDBConfig ¶
type InfluxDBConfig struct { URL string `json:"url"` APIToken string `json:"apiToken"` OrganizationID string `json:"organizationID"` }
InfluxDBConfig represents content of InfluxDB configuration typical for Direct Object.
type InstanaConfig ¶
InstanaConfig represents content of Instana configuration typical for Direct Object.
type LightstepConfig ¶
type NewRelicConfig ¶
type NewRelicConfig struct { AccountID int `json:"accountId"` InsightsQueryKey string `json:"insightsQueryKey"` }
NewRelicConfig represents content of NewRelic Configuration typical for Direct Object.
type PingdomConfig ¶
type PingdomConfig struct {
APIToken string `json:"apiToken"`
}
PingdomConfig represents content of Pingdom Configuration typical for Direct Object.
type RedshiftConfig ¶
type RedshiftConfig struct { // Deprecated: Access Keys are no longer supported. Switch to Cross Account IAM Roles. AccessKeyID string `json:"accessKeyID,omitempty"` // Deprecated: Access Keys are no longer supported. Switch to Cross Account IAM Roles. SecretAccessKey string `json:"secretAccessKey,omitempty"` SecretARN string `json:"secretARN"` RoleARN string `json:"roleARN,omitempty"` }
RedshiftConfig represents content of Redshift configuration typical for Direct Object.
type Spec ¶
type Spec struct { Description string `json:"description,omitempty"` ReleaseChannel v1alpha.ReleaseChannel `json:"releaseChannel,omitempty"` LogCollectionEnabled *bool `json:"logCollectionEnabled,omitempty"` Datadog *DatadogConfig `json:"datadog,omitempty"` NewRelic *NewRelicConfig `json:"newRelic,omitempty"` AppDynamics *AppDynamicsConfig `json:"appDynamics,omitempty"` SplunkObservability *SplunkObservabilityConfig `json:"splunkObservability,omitempty"` ThousandEyes *ThousandEyesConfig `json:"thousandEyes,omitempty"` BigQuery *BigQueryConfig `json:"bigQuery,omitempty"` Splunk *SplunkConfig `json:"splunk,omitempty"` CloudWatch *CloudWatchConfig `json:"cloudWatch,omitempty"` Pingdom *PingdomConfig `json:"pingdom,omitempty"` Redshift *RedshiftConfig `json:"redshift,omitempty"` SumoLogic *SumoLogicConfig `json:"sumoLogic,omitempty"` Instana *InstanaConfig `json:"instana,omitempty"` InfluxDB *InfluxDBConfig `json:"influxdb,omitempty"` GCM *GCMConfig `json:"gcm,omitempty"` Lightstep *LightstepConfig `json:"lightstep,omitempty"` Dynatrace *DynatraceConfig `json:"dynatrace,omitempty"` AzureMonitor *AzureMonitorConfig `json:"azureMonitor,omitempty"` Honeycomb *HoneycombConfig `json:"honeycomb,omitempty"` HistoricalDataRetrieval *v1alpha.HistoricalDataRetrieval `json:"historicalDataRetrieval,omitempty"` QueryDelay *v1alpha.QueryDelay `json:"queryDelay,omitempty"` // Interval, Timeout and Jitter are readonly and cannot be set via API Interval *v1alpha.Interval `json:"interval,omitempty"` Timeout *v1alpha.Timeout `json:"timeout,omitempty"` Jitter *v1alpha.Jitter `json:"jitter,omitempty"` }
Spec represents content of Spec typical for Direct Object
type SplunkConfig ¶
SplunkConfig represents content of Splunk Configuration typical for Direct Object.
type SplunkObservabilityConfig ¶
type SplunkObservabilityConfig struct { Realm string `json:"realm"` AccessToken string `json:"accessToken"` }
SplunkObservabilityConfig represents content of SplunkObservability Configuration typical for Direct Object.
type Status ¶
type Status struct {
DirectType string `json:"directType"`
}
Status represents content of Status optional for Direct Object
type SumoLogicConfig ¶
type SumoLogicConfig struct { AccessID string `json:"accessID"` AccessKey string `json:"accessKey"` URL string `json:"url"` }
SumoLogicConfig represents content of SumoLogic configuration typical for Direct Object.
type ThousandEyesConfig ¶
type ThousandEyesConfig struct {
OauthBearerToken string `json:"oauthBearerToken"`
}
ThousandEyesConfig represents content of ThousandEyes Configuration typical for Direct Object.