serviceintegration

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndpointTypeChoices

func EndpointTypeChoices() []string

func IntegrationStatusTypeChoices added in v0.3.0

func IntegrationStatusTypeChoices() []string

func IntegrationTypeChoices

func IntegrationTypeChoices() []string

func LikelyErrorCauseTypeChoices added in v0.3.0

func LikelyErrorCauseTypeChoices() []string

Types

type EndpointType

type EndpointType string
const (
	EndpointTypeAutoscaler                   EndpointType = "autoscaler"
	EndpointTypeDatadog                      EndpointType = "datadog"
	EndpointTypeExternalAwsCloudwatchLogs    EndpointType = "external_aws_cloudwatch_logs"
	EndpointTypeExternalAwsCloudwatchMetrics EndpointType = "external_aws_cloudwatch_metrics"
	EndpointTypeExternalAwsS3                EndpointType = "external_aws_s3"
	EndpointTypeExternalClickhouse           EndpointType = "external_clickhouse"
	EndpointTypeExternalElasticsearchLogs    EndpointType = "external_elasticsearch_logs"
	EndpointTypeExternalGoogleCloudBigquery  EndpointType = "external_google_cloud_bigquery"
	EndpointTypeExternalGoogleCloudLogging   EndpointType = "external_google_cloud_logging"
	EndpointTypeExternalKafka                EndpointType = "external_kafka"
	EndpointTypeExternalMysql                EndpointType = "external_mysql"
	EndpointTypeExternalOpensearchLogs       EndpointType = "external_opensearch_logs"
	EndpointTypeExternalPostgresql           EndpointType = "external_postgresql"
	EndpointTypeExternalRedis                EndpointType = "external_redis"
	EndpointTypeExternalSchemaRegistry       EndpointType = "external_schema_registry"
	EndpointTypeExternalSumologicLogs        EndpointType = "external_sumologic_logs"
	EndpointTypeJolokia                      EndpointType = "jolokia"
	EndpointTypePrometheus                   EndpointType = "prometheus"
	EndpointTypeRsyslog                      EndpointType = "rsyslog"
)

type EndpointTypeOut

type EndpointTypeOut struct {
	EndpointType     string         `json:"endpoint_type"`
	ServiceTypes     []string       `json:"service_types"`
	Title            string         `json:"title"`
	UserConfigSchema map[string]any `json:"user_config_schema"`
}

type Handler

type Handler interface {
	// ServiceIntegrationCreate create a new service integration
	// POST /v1/project/{project}/integration
	// https://api.aiven.io/doc/#tag/Service_Integrations/operation/ServiceIntegrationCreate
	ServiceIntegrationCreate(ctx context.Context, project string, in *ServiceIntegrationCreateIn) (*ServiceIntegrationCreateOut, error)

	// ServiceIntegrationDelete delete a service integration
	// DELETE /v1/project/{project}/integration/{integration_id}
	// https://api.aiven.io/doc/#tag/Service_Integrations/operation/ServiceIntegrationDelete
	ServiceIntegrationDelete(ctx context.Context, project string, integrationId string) error

	// ServiceIntegrationEndpointCreate create a new service integration endpoint
	// POST /v1/project/{project}/integration_endpoint
	// https://api.aiven.io/doc/#tag/Service_Integrations/operation/ServiceIntegrationEndpointCreate
	ServiceIntegrationEndpointCreate(ctx context.Context, project string, in *ServiceIntegrationEndpointCreateIn) (*ServiceIntegrationEndpointCreateOut, error)

	// ServiceIntegrationEndpointDelete delete a service integration endpoint
	// DELETE /v1/project/{project}/integration_endpoint/{integration_endpoint_id}
	// https://api.aiven.io/doc/#tag/Service_Integrations/operation/ServiceIntegrationEndpointDelete
	ServiceIntegrationEndpointDelete(ctx context.Context, project string, integrationEndpointId string) error

	// ServiceIntegrationEndpointGet get service integration endpoint
	// GET /v1/project/{project}/integration_endpoint/{integration_endpoint_id}
	// https://api.aiven.io/doc/#tag/Service_Integrations/operation/ServiceIntegrationEndpointGet
	ServiceIntegrationEndpointGet(ctx context.Context, project string, integrationEndpointId string) (*ServiceIntegrationEndpointGetOut, error)

	// ServiceIntegrationEndpointList list available integration endpoints for project
	// GET /v1/project/{project}/integration_endpoint
	// https://api.aiven.io/doc/#tag/Service_Integrations/operation/ServiceIntegrationEndpointList
	ServiceIntegrationEndpointList(ctx context.Context, project string) ([]ServiceIntegrationEndpointOut, error)

	// ServiceIntegrationEndpointTypes list available service integration endpoint types
	// GET /v1/project/{project}/integration_endpoint_types
	// https://api.aiven.io/doc/#tag/Service_Integrations/operation/ServiceIntegrationEndpointTypes
	ServiceIntegrationEndpointTypes(ctx context.Context, project string) ([]EndpointTypeOut, error)

	// ServiceIntegrationEndpointUpdate update service integration endpoint
	// PUT /v1/project/{project}/integration_endpoint/{integration_endpoint_id}
	// https://api.aiven.io/doc/#tag/Service_Integrations/operation/ServiceIntegrationEndpointUpdate
	ServiceIntegrationEndpointUpdate(ctx context.Context, project string, integrationEndpointId string, in *ServiceIntegrationEndpointUpdateIn) (*ServiceIntegrationEndpointUpdateOut, error)

	// ServiceIntegrationGet get service integration
	// GET /v1/project/{project}/integration/{integration_id}
	// https://api.aiven.io/doc/#tag/Service_Integrations/operation/ServiceIntegrationGet
	ServiceIntegrationGet(ctx context.Context, project string, integrationId string) (*ServiceIntegrationGetOut, error)

	// ServiceIntegrationList list available integrations for a service
	// GET /v1/project/{project}/service/{service_name}/integration
	// https://api.aiven.io/doc/#tag/Service_Integrations/operation/ServiceIntegrationList
	ServiceIntegrationList(ctx context.Context, project string, serviceName string) ([]ServiceIntegrationOut, error)

	// ServiceIntegrationTypes list available service integration types
	// GET /v1/project/{project}/integration_types
	// https://api.aiven.io/doc/#tag/Service_Integrations/operation/ServiceIntegrationTypes
	ServiceIntegrationTypes(ctx context.Context, project string) ([]IntegrationTypeOut, error)

	// ServiceIntegrationUpdate update a service integration
	// PUT /v1/project/{project}/integration/{integration_id}
	// https://api.aiven.io/doc/#tag/Service_Integrations/operation/ServiceIntegrationUpdate
	ServiceIntegrationUpdate(ctx context.Context, project string, integrationId string, in *ServiceIntegrationUpdateIn) (*ServiceIntegrationUpdateOut, error)
}

type IntegrationStatusOut

type IntegrationStatusOut struct {
	State          StateOut `json:"state"`
	StatusUserDesc string   `json:"status_user_desc"`
}

type IntegrationStatusType added in v0.3.0

type IntegrationStatusType string
const (
	IntegrationStatusTypeFailed   IntegrationStatusType = "failed"
	IntegrationStatusTypeInactive IntegrationStatusType = "inactive"
	IntegrationStatusTypeRunning  IntegrationStatusType = "running"
	IntegrationStatusTypeStarting IntegrationStatusType = "starting"
	IntegrationStatusTypeUnknown  IntegrationStatusType = "unknown"
)

type IntegrationType

type IntegrationType string
const (
	IntegrationTypeAlertmanager                      IntegrationType = "alertmanager"
	IntegrationTypeAutoscaler                        IntegrationType = "autoscaler"
	IntegrationTypeCaching                           IntegrationType = "caching"
	IntegrationTypeCassandraCrossServiceCluster      IntegrationType = "cassandra_cross_service_cluster"
	IntegrationTypeClickhouseCredentials             IntegrationType = "clickhouse_credentials"
	IntegrationTypeClickhouseKafka                   IntegrationType = "clickhouse_kafka"
	IntegrationTypeClickhousePostgresql              IntegrationType = "clickhouse_postgresql"
	IntegrationTypeDashboard                         IntegrationType = "dashboard"
	IntegrationTypeDatadog                           IntegrationType = "datadog"
	IntegrationTypeDatasource                        IntegrationType = "datasource"
	IntegrationTypeExternalAwsCloudwatchLogs         IntegrationType = "external_aws_cloudwatch_logs"
	IntegrationTypeExternalAwsCloudwatchMetrics      IntegrationType = "external_aws_cloudwatch_metrics"
	IntegrationTypeExternalElasticsearchLogs         IntegrationType = "external_elasticsearch_logs"
	IntegrationTypeExternalGoogleCloudLogging        IntegrationType = "external_google_cloud_logging"
	IntegrationTypeExternalOpensearchLogs            IntegrationType = "external_opensearch_logs"
	IntegrationTypeFlink                             IntegrationType = "flink"
	IntegrationTypeFlinkExternalBigquery             IntegrationType = "flink_external_bigquery"
	IntegrationTypeFlinkExternalKafka                IntegrationType = "flink_external_kafka"
	IntegrationTypeFlinkExternalPostgresql           IntegrationType = "flink_external_postgresql"
	IntegrationTypeInternalConnectivity              IntegrationType = "internal_connectivity"
	IntegrationTypeJolokia                           IntegrationType = "jolokia"
	IntegrationTypeKafkaConnect                      IntegrationType = "kafka_connect"
	IntegrationTypeKafkaConnectPostgresql            IntegrationType = "kafka_connect_postgresql"
	IntegrationTypeKafkaLogs                         IntegrationType = "kafka_logs"
	IntegrationTypeKafkaMirrormaker                  IntegrationType = "kafka_mirrormaker"
	IntegrationTypeLogs                              IntegrationType = "logs"
	IntegrationTypeM3Aggregator                      IntegrationType = "m3aggregator"
	IntegrationTypeM3Coordinator                     IntegrationType = "m3coordinator"
	IntegrationTypeMetrics                           IntegrationType = "metrics"
	IntegrationTypeOpensearchCrossClusterReplication IntegrationType = "opensearch_cross_cluster_replication"
	IntegrationTypeOpensearchCrossClusterSearch      IntegrationType = "opensearch_cross_cluster_search"
	IntegrationTypePrometheus                        IntegrationType = "prometheus"
	IntegrationTypeReadReplica                       IntegrationType = "read_replica"
	IntegrationTypeRsyslog                           IntegrationType = "rsyslog"
	IntegrationTypeSchemaRegistryProxy               IntegrationType = "schema_registry_proxy"
	IntegrationTypeStresstester                      IntegrationType = "stresstester"
	IntegrationTypeThanoscompactor                   IntegrationType = "thanoscompactor"
	IntegrationTypeThanosquery                       IntegrationType = "thanosquery"
	IntegrationTypeThanosstore                       IntegrationType = "thanosstore"
	IntegrationTypeVector                            IntegrationType = "vector"
	IntegrationTypeVmalert                           IntegrationType = "vmalert"
)

type IntegrationTypeOut

type IntegrationTypeOut struct {
	DestDescription    string         `json:"dest_description"`
	DestServiceType    string         `json:"dest_service_type"`
	DestServiceTypes   []string       `json:"dest_service_types"`
	IntegrationType    string         `json:"integration_type"`
	SourceDescription  string         `json:"source_description"`
	SourceServiceTypes []string       `json:"source_service_types"`
	UserConfigSchema   map[string]any `json:"user_config_schema"`
}

type LikelyErrorCauseType added in v0.3.0

type LikelyErrorCauseType string
const (
	LikelyErrorCauseTypeNull        LikelyErrorCauseType = "null"
	LikelyErrorCauseTypeDestination LikelyErrorCauseType = "destination"
	LikelyErrorCauseTypeIntegration LikelyErrorCauseType = "integration"
	LikelyErrorCauseTypeSource      LikelyErrorCauseType = "source"
	LikelyErrorCauseTypeUnknown     LikelyErrorCauseType = "unknown"
)

type ServiceIntegrationCreateIn

type ServiceIntegrationCreateIn struct {
	DestEndpointId   string          `json:"dest_endpoint_id,omitempty"`
	DestProject      string          `json:"dest_project,omitempty"`
	DestService      string          `json:"dest_service,omitempty"`
	IntegrationType  IntegrationType `json:"integration_type"`
	SourceEndpointId string          `json:"source_endpoint_id,omitempty"`
	SourceProject    string          `json:"source_project,omitempty"`
	SourceService    string          `json:"source_service,omitempty"`
	UserConfig       *map[string]any `json:"user_config,omitempty"`
}

type ServiceIntegrationCreateOut

type ServiceIntegrationCreateOut struct {
	Active               bool                  `json:"active"`
	Description          string                `json:"description"`
	DestEndpoint         string                `json:"dest_endpoint,omitempty"`
	DestEndpointId       string                `json:"dest_endpoint_id,omitempty"`
	DestProject          string                `json:"dest_project"`
	DestService          string                `json:"dest_service,omitempty"`
	DestServiceType      string                `json:"dest_service_type"`
	Enabled              bool                  `json:"enabled"`
	IntegrationStatus    *IntegrationStatusOut `json:"integration_status,omitempty"`
	IntegrationType      string                `json:"integration_type"`
	ServiceIntegrationId string                `json:"service_integration_id"`
	SourceEndpoint       string                `json:"source_endpoint,omitempty"`
	SourceEndpointId     string                `json:"source_endpoint_id,omitempty"`
	SourceProject        string                `json:"source_project"`
	SourceService        string                `json:"source_service"`
	SourceServiceType    string                `json:"source_service_type"`
	UserConfig           map[string]any        `json:"user_config,omitempty"`
}

type ServiceIntegrationEndpointCreateIn

type ServiceIntegrationEndpointCreateIn struct {
	EndpointName string         `json:"endpoint_name"`
	EndpointType EndpointType   `json:"endpoint_type"`
	UserConfig   map[string]any `json:"user_config"`
}

type ServiceIntegrationEndpointCreateOut

type ServiceIntegrationEndpointCreateOut struct {
	EndpointConfig map[string]any `json:"endpoint_config"`
	EndpointId     string         `json:"endpoint_id"`
	EndpointName   string         `json:"endpoint_name"`
	EndpointType   EndpointType   `json:"endpoint_type"`
	UserConfig     map[string]any `json:"user_config"`
}

type ServiceIntegrationEndpointGetOut

type ServiceIntegrationEndpointGetOut struct {
	EndpointConfig map[string]any `json:"endpoint_config"`
	EndpointId     string         `json:"endpoint_id"`
	EndpointName   string         `json:"endpoint_name"`
	EndpointType   EndpointType   `json:"endpoint_type"`
	UserConfig     map[string]any `json:"user_config"`
}

type ServiceIntegrationEndpointOut

type ServiceIntegrationEndpointOut struct {
	EndpointConfig map[string]any `json:"endpoint_config"`
	EndpointId     string         `json:"endpoint_id"`
	EndpointName   string         `json:"endpoint_name"`
	EndpointType   EndpointType   `json:"endpoint_type"`
	UserConfig     map[string]any `json:"user_config"`
}

type ServiceIntegrationEndpointUpdateIn

type ServiceIntegrationEndpointUpdateIn struct {
	UserConfig map[string]any `json:"user_config"`
}

type ServiceIntegrationEndpointUpdateOut

type ServiceIntegrationEndpointUpdateOut struct {
	EndpointConfig map[string]any `json:"endpoint_config"`
	EndpointId     string         `json:"endpoint_id"`
	EndpointName   string         `json:"endpoint_name"`
	EndpointType   EndpointType   `json:"endpoint_type"`
	UserConfig     map[string]any `json:"user_config"`
}

type ServiceIntegrationGetOut

type ServiceIntegrationGetOut struct {
	Active               bool                  `json:"active"`
	Description          string                `json:"description"`
	DestEndpoint         string                `json:"dest_endpoint,omitempty"`
	DestEndpointId       string                `json:"dest_endpoint_id,omitempty"`
	DestProject          string                `json:"dest_project"`
	DestService          string                `json:"dest_service,omitempty"`
	DestServiceType      string                `json:"dest_service_type"`
	Enabled              bool                  `json:"enabled"`
	IntegrationStatus    *IntegrationStatusOut `json:"integration_status,omitempty"`
	IntegrationType      string                `json:"integration_type"`
	ServiceIntegrationId string                `json:"service_integration_id"`
	SourceEndpoint       string                `json:"source_endpoint,omitempty"`
	SourceEndpointId     string                `json:"source_endpoint_id,omitempty"`
	SourceProject        string                `json:"source_project"`
	SourceService        string                `json:"source_service"`
	SourceServiceType    string                `json:"source_service_type"`
	UserConfig           map[string]any        `json:"user_config,omitempty"`
}

type ServiceIntegrationHandler

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

func NewHandler

func NewHandler(doer doer) ServiceIntegrationHandler

func (*ServiceIntegrationHandler) ServiceIntegrationCreate

func (*ServiceIntegrationHandler) ServiceIntegrationDelete

func (h *ServiceIntegrationHandler) ServiceIntegrationDelete(ctx context.Context, project string, integrationId string) error

func (*ServiceIntegrationHandler) ServiceIntegrationEndpointCreate

func (*ServiceIntegrationHandler) ServiceIntegrationEndpointDelete

func (h *ServiceIntegrationHandler) ServiceIntegrationEndpointDelete(ctx context.Context, project string, integrationEndpointId string) error

func (*ServiceIntegrationHandler) ServiceIntegrationEndpointGet

func (h *ServiceIntegrationHandler) ServiceIntegrationEndpointGet(ctx context.Context, project string, integrationEndpointId string) (*ServiceIntegrationEndpointGetOut, error)

func (*ServiceIntegrationHandler) ServiceIntegrationEndpointList

func (h *ServiceIntegrationHandler) ServiceIntegrationEndpointList(ctx context.Context, project string) ([]ServiceIntegrationEndpointOut, error)

func (*ServiceIntegrationHandler) ServiceIntegrationEndpointTypes

func (h *ServiceIntegrationHandler) ServiceIntegrationEndpointTypes(ctx context.Context, project string) ([]EndpointTypeOut, error)

func (*ServiceIntegrationHandler) ServiceIntegrationEndpointUpdate

func (h *ServiceIntegrationHandler) ServiceIntegrationEndpointUpdate(ctx context.Context, project string, integrationEndpointId string, in *ServiceIntegrationEndpointUpdateIn) (*ServiceIntegrationEndpointUpdateOut, error)

func (*ServiceIntegrationHandler) ServiceIntegrationGet

func (h *ServiceIntegrationHandler) ServiceIntegrationGet(ctx context.Context, project string, integrationId string) (*ServiceIntegrationGetOut, error)

func (*ServiceIntegrationHandler) ServiceIntegrationList

func (h *ServiceIntegrationHandler) ServiceIntegrationList(ctx context.Context, project string, serviceName string) ([]ServiceIntegrationOut, error)

func (*ServiceIntegrationHandler) ServiceIntegrationTypes

func (h *ServiceIntegrationHandler) ServiceIntegrationTypes(ctx context.Context, project string) ([]IntegrationTypeOut, error)

func (*ServiceIntegrationHandler) ServiceIntegrationUpdate

func (h *ServiceIntegrationHandler) ServiceIntegrationUpdate(ctx context.Context, project string, integrationId string, in *ServiceIntegrationUpdateIn) (*ServiceIntegrationUpdateOut, error)

type ServiceIntegrationOut

type ServiceIntegrationOut struct {
	Active               bool                  `json:"active"`
	Description          string                `json:"description"`
	DestEndpoint         string                `json:"dest_endpoint,omitempty"`
	DestEndpointId       string                `json:"dest_endpoint_id,omitempty"`
	DestProject          string                `json:"dest_project"`
	DestService          string                `json:"dest_service,omitempty"`
	DestServiceType      string                `json:"dest_service_type"`
	Enabled              bool                  `json:"enabled"`
	IntegrationStatus    *IntegrationStatusOut `json:"integration_status,omitempty"`
	IntegrationType      string                `json:"integration_type"`
	ServiceIntegrationId string                `json:"service_integration_id"`
	SourceEndpoint       string                `json:"source_endpoint,omitempty"`
	SourceEndpointId     string                `json:"source_endpoint_id,omitempty"`
	SourceProject        string                `json:"source_project"`
	SourceService        string                `json:"source_service"`
	SourceServiceType    string                `json:"source_service_type"`
	UserConfig           map[string]any        `json:"user_config,omitempty"`
}

type ServiceIntegrationUpdateIn

type ServiceIntegrationUpdateIn struct {
	UserConfig map[string]any `json:"user_config"`
}

type ServiceIntegrationUpdateOut

type ServiceIntegrationUpdateOut struct {
	Active               bool                  `json:"active"`
	Description          string                `json:"description"`
	DestEndpoint         string                `json:"dest_endpoint,omitempty"`
	DestEndpointId       string                `json:"dest_endpoint_id,omitempty"`
	DestProject          string                `json:"dest_project"`
	DestService          string                `json:"dest_service,omitempty"`
	DestServiceType      string                `json:"dest_service_type"`
	Enabled              bool                  `json:"enabled"`
	IntegrationStatus    *IntegrationStatusOut `json:"integration_status,omitempty"`
	IntegrationType      string                `json:"integration_type"`
	ServiceIntegrationId string                `json:"service_integration_id"`
	SourceEndpoint       string                `json:"source_endpoint,omitempty"`
	SourceEndpointId     string                `json:"source_endpoint_id,omitempty"`
	SourceProject        string                `json:"source_project"`
	SourceService        string                `json:"source_service"`
	SourceServiceType    string                `json:"source_service_type"`
	UserConfig           map[string]any        `json:"user_config,omitempty"`
}

type StateOut

type StateOut struct {
	Errors           []string              `json:"errors"`
	LikelyErrorCause LikelyErrorCauseType  `json:"likely_error_cause,omitempty"`
	Nodes            map[string]any        `json:"nodes"`
	Status           IntegrationStatusType `json:"status"`
}

Jump to

Keyboard shortcuts

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