Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultOAuth2Config() *oauth2.Config
- type Account
- type Action
- type Application
- type ApplicationLogs
- type ApplicationResource
- type ApplicationState
- type ApplicationStatus
- type Build
- type BuildStatus
- type Client
- type Connector
- type ConnectorState
- type ConnectorType
- type CreateApplicationInput
- type CreateBuildInput
- type CreateConnectorInput
- type CreateDeploymentInput
- type CreateEnvironmentInput
- type CreateFlinkJobInput
- type CreateFunctionInput
- type CreatePipelineInput
- type CreateResourceInput
- type CreateSourceInputV2
- type Credentials
- type Deployment
- type DeploymentState
- type DeploymentStatus
- type EntityDetails
- type EntityIdentifier
- type Environment
- type EnvironmentAction
- type EnvironmentProvider
- type EnvironmentRegion
- type EnvironmentState
- type EnvironmentType
- type EnvironmentViewStatus
- type FlinkJob
- type FlinkJobDesiredState
- type FlinkJobLifecycleState
- type FlinkJobManagerDeploymentState
- type FlinkJobReconciliationState
- type FlinkJobStatus
- type Function
- type FunctionState
- type FunctionStatus
- type LogData
- type Logs
- type Metadata
- type Option
- func WithAccountUUID(accountUUID string) Option
- func WithAuthentication(conf *oauth2.Config, accessToken, refreshToken string, ...) Option
- func WithBaseURL(rawurl string) Option
- func WithClient(httpClient *http.Client) Option
- func WithClientTimeout(timeout time.Duration) Option
- func WithDumpTransport(writer io.Writer) Option
- func WithHeader(key, value string) Option
- func WithUserAgent(ua string) Option
- type Pipeline
- type PipelineIdentifier
- type PipelineState
- type PreflightDetails
- type PreflightLimits
- type PreflightPermissions
- type Property
- type RepairEnvironmentInput
- type Requester
- type Resource
- type ResourceCollection
- type ResourceIntrospection
- type ResourceSSHTunnel
- type ResourceSSHTunnelInput
- type ResourceState
- type ResourceStatus
- type ResourceType
- type ResourceTypeName
- type ResourceTypeReleaseStage
- type Source
- type SourceBlob
- type TokenObserver
- type Transform
- type UpdateConnectorInput
- type UpdateEnvironmentInput
- type UpdatePipelineInput
- type UpdateResourceInput
- type User
Constants ¶
const ( FlinkJobLifecycleStateCreated FlinkJobLifecycleState = "created" FlinkJobLifecycleStateDeploying FlinkJobLifecycleState = "deploying" FlinkJobLifecycleStateDoa FlinkJobLifecycleState = "doa" FlinkJobLifecycleStateFailed FlinkJobLifecycleState = "failed" FlinkJobLifecycleStateRolledBack FlinkJobLifecycleState = "rolled_back" FlinkJobLifecycleStateRollingBack FlinkJobLifecycleState = "rolling_back" FlinkJobLifecycleStateStable FlinkJobLifecycleState = "stable" FlinkJobLifecycleStateSuspended FlinkJobLifecycleState = "suspended" FlinkJobLifecycleStateUninitialized FlinkJobLifecycleState = "uninitialized" FlinkJobLifecycleStateUpgrading FlinkJobLifecycleState = "upgrading" FlinkJobDesiredStateRunning FlinkJobDesiredState = "running" FlinkJobDesiredStateSuspended FlinkJobDesiredState = "suspended" FlinkJobReconciliationStateDeployed FlinkJobReconciliationState = "deployed" FlinkJobReconciliationStateRolledBack FlinkJobReconciliationState = "rolled_back" FlinkJobReconciliationStateRollingBack FlinkJobReconciliationState = "rolling_back" FlinkJobReconciliationStateUpgrading FlinkJobReconciliationState = "upgrading" FlinkJobManagerDeploymentStateDeployedNotReady FlinkJobManagerDeploymentState = "deployed_not_ready" FlinkJobManagerDeploymentStateDeploying FlinkJobManagerDeploymentState = "deploying" FlinkJobManagerDeploymentStateError FlinkJobManagerDeploymentState = "error" FlinkJobManagerDeploymentStateFailing FlinkJobManagerDeploymentState = "failing" FlinkJobManagerDeploymentStateMissing FlinkJobManagerDeploymentState = "missing" FlinkJobManagerDeploymentStateReady FlinkJobManagerDeploymentState = "ready" )
const ( ResourceTypePostgres ResourceTypeName = "postgres" ResourceTypeMysql ResourceTypeName = "mysql" ResourceTypeRedshift ResourceTypeName = "redshift" ResourceTypeUrl ResourceTypeName = "url" ResourceTypeS3 ResourceTypeName = "s3" ResourceTypeMongodb ResourceTypeName = "mongodb" ResourceTypeElasticsearch ResourceTypeName = "elasticsearch" ResourceTypeSnowflake ResourceTypeName = "snowflakedb" ResourceTypeBigquery ResourceTypeName = "bigquery" ResourceTypeSqlserver ResourceTypeName = "sqlserver" ResourceTypeCosmosdb ResourceTypeName = "cosmosdb" ResourceTypeKafka ResourceTypeName = "kafka" ResourceTypeConfluentCloud ResourceTypeName = "confluentcloud" ResourceTypeNotion ResourceTypeName = "notion" ResourceTypeAirtable ResourceTypeName = "airtable" ResourceTypeAlgolia ResourceTypeName = "algolia" ResourceTypeDynamoDB ResourceTypeName = "aws_dynamodb" ResourceTypeKinesis ResourceTypeName = "aws_kinesis" ResourceTypeApacheWebLogs ResourceTypeName = "apache_web_logs" ResourceTypeAppDynamics ResourceTypeName = "app_dynamics" ResourceTypeAtlassianConfluence ResourceTypeName = "atlassian_confluence" ResourceTypeAtlassianJira ResourceTypeName = "atlassian_jira" ResourceTypeAzureBlobStorage ResourceTypeName = "azure_blob_storage" ResourceTypeAzureEventHub ResourceTypeName = "azure_event_hub" ResourceTypeBox ResourceTypeName = "box" ResourceTypeCassandra ResourceTypeName = "cassandra" ResourceTypeClickhouse ResourceTypeName = "clickhouse" ResourceTypeCockroach ResourceTypeName = "cockroach" ResourceTypeDropbox ResourceTypeName = "dropbox" ResourceTypeFacebookAds ResourceTypeName = "facebook_ads" ResourceTypeFile ResourceTypeName = "file" ResourceTypeFirebaseFirestore ResourceTypeName = "firebase_firestore" ResourceTypeFirebolt ResourceTypeName = "firebolt" ResourceTypeFluentbit ResourceTypeName = "fluentbit" ResourceTypeFtpSftp ResourceTypeName = "ftp_sftp" ResourceTypeGitHub ResourceTypeName = "github" ResourceTypeGitLab ResourceTypeName = "gitlab" ResourceTypeGoogleAnalytics ResourceTypeName = "google_analytics" ResourceTypeGoogleCloudStorage ResourceTypeName = "google_cloud_storage" ResourceTypeGoogleDrive ResourceTypeName = "google_drive" ResourceTypeGooglePubSub ResourceTypeName = "google_pub_sub" ResourceTypeGoogleSheets ResourceTypeName = "google_sheets" ResourceTypeHubspot ResourceTypeName = "hubspot" ResourceTypeIbmDb2 ResourceTypeName = "ibm_db2" ResourceTypeKlayvio ResourceTypeName = "klayvio" ResourceTypeK8sLogs ResourceTypeName = "kubernetes_logs" ResourceTypeLogstash ResourceTypeName = "logstash" ResourceTypeMailchimp ResourceTypeName = "mailchimp" ResourceTypeMarketo ResourceTypeName = "marketo" ResourceTypeMaterialize ResourceTypeName = "materialize" ResourceTypeMsTeams ResourceTypeName = "microsoft_teams" ResourceTypeNatsJetstream ResourceTypeName = "nats_jetstream" ResourceTypeNetsuite ResourceTypeName = "netsuite" ResourceTypeNginx ResourceTypeName = "nginx" ResourceTypeOpenTelemetry ResourceTypeName = "open_telemetry" ResourceTypeOracle ResourceTypeName = "oracle" ResourceTypeOsquery ResourceTypeName = "osquery" ResourceTypePrometheus ResourceTypeName = "prometheus" ResourceTypePulsar ResourceTypeName = "pulsar" ResourceTypeRedis ResourceTypeName = "redis" ResourceTypeSalesforceSalesCloud ResourceTypeName = "salesforce_sales_cloud" ResourceTypeSalesforceMarketingCloud ResourceTypeName = "salesforce_marketing_cloud" ResourceTypeSalesforcePardot ResourceTypeName = "salesforce_pardot" ResourceTypeSapHana ResourceTypeName = "sap_hana" ResourceTypeShopify ResourceTypeName = "shopify" ResourceTypeSlack ResourceTypeName = "slack" ResourceTypeSocket ResourceTypeName = "socket" ResourceTypeSpireMaritimeAIS ResourceTypeName = "spire_maritime_ais" ResourceTypeSplunk ResourceTypeName = "splunk" ResourceTypeStatsD ResourceTypeName = "statsd" ResourceTypeStripe ResourceTypeName = "stripe" ResourceTypeSyslog ResourceTypeName = "syslog" ResourceTypeSybase ResourceTypeName = "sybase" ResourceTypeTeradata ResourceTypeName = "teradata" ResourceTypeVitess ResourceTypeName = "vitess" ResourceTypeWorkday ResourceTypeName = "workday" ResourceTypeZendeskSupport ResourceTypeName = "zendesk_support" ResourceTypeReleaseStageGA ResourceTypeReleaseStage = "ga" ResourceTypeReleaseStageBeta ResourceTypeReleaseStage = "beta" ResourceTypeReleaseStageDevPreview ResourceTypeReleaseStage = "developer_preview" )
const (
ClientID = "2VC9z0ZxtzTcQLDNygeEELV3lYFRZwpb" // TODO this is the CLI ID, create separate client ID for 3rd party apps and provide it as default
)
const ResourceTypeFormConfigHumanReadableKey = "label"
const ResourcesBasePath = "/v1/resources"
const ResourcesTypeBasePathV1 = "/v1/resource-types"
const ResourcesTypeBasePathV2 = "/v2/resource-types"
Variables ¶
var ErrMissingScheme = errors.New("URL scheme required")
var (
OAuth2Endpoint = oauth2.Endpoint{
AuthURL: "https://auth.meroxa.io/authorize",
TokenURL: "https://auth.meroxa.io/oauth/token",
}
)
Functions ¶
func DefaultOAuth2Config ¶
Types ¶
type Application ¶
type Application struct { UUID string `json:"uuid"` Name string `json:"name"` Language string `json:"language"` GitSha string `json:"git_sha,omitempty"` Status ApplicationStatus `json:"status,omitempty"` Environment *EntityIdentifier `json:"environment,omitempty"` Pipeline EntityDetails `json:"pipeline,omitempty"` Connectors []EntityDetails `json:"connectors,omitempty"` Functions []EntityDetails `json:"functions,omitempty"` Resources []ApplicationResource `json:"resources,omitempty"` Deployments []EntityIdentifier `json:"deployments,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt time.Time `json:"deleted_at,omitempty"` }
Application represents the Meroxa Application type within the Meroxa API
type ApplicationLogs ¶
type ApplicationResource ¶
type ApplicationResource struct { EntityIdentifier ResourceType string `json:"type,omitempty"` Status string `json:"status,omitempty"` Collection ResourceCollection `json:"collection,omitempty"` }
type ApplicationState ¶
type ApplicationState string
const ( ApplicationStateInitialized ApplicationState = "initialized" ApplicationStateDeploying ApplicationState = "deploying" ApplicationStatePending ApplicationState = "pending" ApplicationStateRunning ApplicationState = "running" ApplicationStateDegraded ApplicationState = "degraded" ApplicationStateFailed ApplicationState = "failed" )
type ApplicationStatus ¶
type ApplicationStatus struct { State ApplicationState `json:"state"` Details string `json:"details,omitempty"` }
type Build ¶
type Build struct { Uuid string `json:"uuid"` Status BuildStatus `json:"status"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` SourceBlob SourceBlob `json:"source_blob"` Image string `json:"image"` Environment *EntityIdentifier `json:"environment,omitempty"` }
type BuildStatus ¶
type Client ¶
type Client interface { CreateApplication(ctx context.Context, input *CreateApplicationInput) (*Application, error) CreateApplicationV2(ctx context.Context, input *CreateApplicationInput) (*Application, error) DeleteApplication(ctx context.Context, nameOrUUID string) error DeleteApplicationEntities(ctx context.Context, nameOrUUID string) (*http.Response, error) GetApplication(ctx context.Context, nameOrUUID string) (*Application, error) GetApplicationLogsV2(ctx context.Context, nameOrUUID string) (*Logs, error) ListApplications(ctx context.Context) ([]*Application, error) CreateBuild(ctx context.Context, input *CreateBuildInput) (*Build, error) GetBuild(ctx context.Context, uuid string) (*Build, error) GetBuildLogsV2(ctx context.Context, uuid string) (*Logs, error) CreateConnector(ctx context.Context, input *CreateConnectorInput) (*Connector, error) DeleteConnector(ctx context.Context, nameOrID string) error GetConnectorByNameOrID(ctx context.Context, nameOrID string) (*Connector, error) ListConnectors(ctx context.Context) ([]*Connector, error) UpdateConnector(ctx context.Context, nameOrID string, input *UpdateConnectorInput) (*Connector, error) UpdateConnectorStatus(ctx context.Context, nameOrID string, state Action) (*Connector, error) GetDeployment(ctx context.Context, appIdentifier string, depUUID string) (*Deployment, error) GetLatestDeployment(ctx context.Context, appIdentifier string) (*Deployment, error) CreateDeployment(ctx context.Context, input *CreateDeploymentInput) (*Deployment, error) CreateFlinkJob(ctx context.Context, input *CreateFlinkJobInput) (*FlinkJob, error) DeleteFlinkJob(ctx context.Context, nameOrUUID string) error GetFlinkJob(ctx context.Context, nameOrUUID string) (*FlinkJob, error) ListFlinkJobs(ctx context.Context) ([]*FlinkJob, error) GetFlinkLogsV2(ctx context.Context, nameOrUUID string) (*Logs, error) CreateFunction(ctx context.Context, input *CreateFunctionInput) (*Function, error) GetFunction(ctx context.Context, nameOrUUID string) (*Function, error) ListFunctions(ctx context.Context) ([]*Function, error) DeleteFunction(ctx context.Context, nameOrUUID string) (*Function, error) CreateEnvironment(ctx context.Context, input *CreateEnvironmentInput) (*Environment, error) DeleteEnvironment(ctx context.Context, nameOrUUID string) (*Environment, error) GetEnvironment(ctx context.Context, nameOrUUID string) (*Environment, error) UpdateEnvironment(ctx context.Context, nameOrUUID string, input *UpdateEnvironmentInput) (*Environment, error) ListEnvironments(ctx context.Context) ([]*Environment, error) PerformActionOnEnvironment(ctx context.Context, nameOrUUID string, input *RepairEnvironmentInput) (*Environment, error) CreatePipeline(ctx context.Context, input *CreatePipelineInput) (*Pipeline, error) DeletePipeline(ctx context.Context, nameOrID string) error GetPipeline(ctx context.Context, pipelineID int) (*Pipeline, error) GetPipelineByName(ctx context.Context, name string) (*Pipeline, error) ListPipelines(ctx context.Context) ([]*Pipeline, error) ListPipelineConnectors(ctx context.Context, pipelineNameOrID string) ([]*Connector, error) UpdatePipeline(ctx context.Context, pipelineNameOrID string, input *UpdatePipelineInput) (*Pipeline, error) UpdatePipelineStatus(ctx context.Context, pipelineNameOrID string, action Action) (*Pipeline, error) CreateResource(ctx context.Context, input *CreateResourceInput) (*Resource, error) DeleteResource(ctx context.Context, nameOrID string) error GetResourceByNameOrID(ctx context.Context, nameOrID string) (*Resource, error) ListResources(ctx context.Context) ([]*Resource, error) UpdateResource(ctx context.Context, nameOrID string, input *UpdateResourceInput) (*Resource, error) RotateTunnelKeyForResource(ctx context.Context, nameOrID string) (*Resource, error) ValidateResource(ctx context.Context, nameOrID string) (*Resource, error) IntrospectResource(ctx context.Context, nameOrID string) (*ResourceIntrospection, error) ListResourceTypes(ctx context.Context) ([]string, error) ListResourceTypesV2(ctx context.Context) ([]ResourceType, error) CreateSource(ctx context.Context) (*Source, error) CreateSourceV2(ctx context.Context, input *CreateSourceInputV2) (*Source, error) ListTransforms(ctx context.Context) ([]*Transform, error) GetUser(ctx context.Context) (*User, error) // contains filtered or unexported methods }
Client represents the interface to the Meroxa API
func New ¶
New returns a Meroxa API client. To configure it provide a list of Options. Note that by default the client is not using any authentication, to provide it please use option WithAuthentication or provide your own *http.Client, which takes care of authentication.
Example creating an authenticated client:
c, err := New( WithAuthentication(auth.DefaultConfig(), accessToken, refreshToken), )
type Connector ¶
type Connector struct { Configuration map[string]interface{} `json:"config"` CreatedAt time.Time `json:"created_at"` Environment *EntityIdentifier `json:"environment,omitempty"` Metadata map[string]interface{} `json:"metadata"` Name string `json:"name"` PipelineName string `json:"pipeline_name"` ResourceName string `json:"resource_name"` Streams map[string]interface{} `json:"streams"` State ConnectorState `json:"state"` Trace string `json:"trace,omitempty"` Type ConnectorType `json:"type"` UpdatedAt time.Time `json:"updated_at"` UUID string `json:"uuid"` }
type ConnectorState ¶
type ConnectorState string
const ( ConnectorStatePending ConnectorState = "pending" ConnectorStateRunning ConnectorState = "running" ConnectorStatePaused ConnectorState = "paused" ConnectorStateCrashed ConnectorState = "crashed" ConnectorStateFailed ConnectorState = "failed" ConnectorStateDOA ConnectorState = "doa" )
type ConnectorType ¶
type ConnectorType string
const ( // ConnectorTypeSource should be changed these since they are associated to `Type` where in fact we're representing // source or destination connectors as part of their metadata not this attribute. // `Type` should be simply a string (`jdbc-source`, `s3-destination`) // They're currently being used in the CLI. ConnectorTypeSource ConnectorType = "source" ConnectorTypeDestination ConnectorType = "destination" )
type CreateApplicationInput ¶
type CreateApplicationInput struct { Name string `json:"name"` Language string `json:"language"` GitSha string `json:"git_sha,omitempty"` Pipeline EntityIdentifier `json:"pipeline,omitempty"` Environment *EntityIdentifier `json:"environment,omitempty"` }
CreateApplicationInput represents the input for a Meroxa Application create operation in the API
type CreateBuildInput ¶
type CreateBuildInput struct { SourceBlob SourceBlob `json:"source_blob"` Environment *EntityIdentifier `json:"environment,omitempty"` }
type CreateConnectorInput ¶
type CreateConnectorInput struct { Name string `json:"name,omitempty"` ResourceName string `json:"resource_name"` PipelineName string `json:"pipeline_name"` Configuration map[string]interface{} `json:"config,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Type ConnectorType `json:"connector_type,omitempty"` Input string `json:"input,omitempty"` }
type CreateDeploymentInput ¶
type CreateDeploymentInput struct { GitSha string `json:"git_sha"` Application EntityIdentifier `json:"application"` Spec map[string]interface{} `json:"spec,omitempty"` SpecVersion string `json:"spec_version,omitempty"` }
type CreateEnvironmentInput ¶
type CreateEnvironmentInput struct { Type EnvironmentType `json:"type,omitempty"` Provider EnvironmentProvider `json:"provider,omitempty"` Name string `json:"name,omitempty"` Configuration map[string]interface{} `json:"config"` Region EnvironmentRegion `json:"region,omitempty"` }
CreateEnvironmentInput represents the input for a Meroxa Environment we're creating within the Meroxa API
type CreateFlinkJobInput ¶
type CreateFunctionInput ¶
type CreateFunctionInput struct { Name string `json:"name"` InputStream string `json:"input_stream"` OutputStream string `json:"output_stream"` Pipeline PipelineIdentifier `json:"pipeline"` Image string `json:"image"` Command []string `json:"command"` Args []string `json:"args"` EnvVars map[string]string `json:"env_vars"` }
type CreatePipelineInput ¶
type CreatePipelineInput struct { Name string `json:"name"` Metadata map[string]interface{} `json:"metadata,omitempty"` Environment *EntityIdentifier `json:"environment,omitempty"` }
CreatePipelineInput represents the input when creating a Meroxa Pipeline
type CreateResourceInput ¶
type CreateResourceInput struct { Credentials *Credentials `json:"credentials,omitempty"` Environment *EntityIdentifier `json:"environment,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Name string `json:"name,omitempty"` SSHTunnel *ResourceSSHTunnelInput `json:"ssh_tunnel,omitempty"` Type ResourceTypeName `json:"type"` URL string `json:"url"` }
CreateResourceInput represents the input for a Meroxa Resource type we're creating within the Meroxa API
type CreateSourceInputV2 ¶
type CreateSourceInputV2 struct { Filename string `json:"filename,omitempty"` Environment *EntityIdentifier `json:"environment,omitempty"` }
type Credentials ¶
type Credentials struct { Username string `json:"username"` Password string `json:"password"` CACert string `json:"ca_cert"` ClientCert string `json:"client_cert"` ClientCertKey string `json:"client_cert_key"` UseSSL bool `json:"ssl"` Token string `json:"token"` }
Credentials represents the Meroxa Resource credentials type within the Meroxa API
type Deployment ¶
type Deployment struct { UUID string `json:"uuid"` GitSha string `json:"git_sha"` Application EntityIdentifier `json:"application"` CreatedAt time.Time `json:"created_at"` DeletedAt time.Time `json:"deleted_at,omitempty"` Status DeploymentStatus `json:"status"` Spec map[string]interface{} `json:"spec,omitempty"` SpecVersion string `json:"spec_version,omitempty"` CreatedBy string `json:"created_by"` }
type DeploymentState ¶
type DeploymentState string
const ( DeploymentStateDeploying DeploymentState = "deploying" DeploymentStateDeployingError DeploymentState = "deploying_error" DeploymentStateRollingBack DeploymentState = "rolling_back" DeploymentStateRollingBackError DeploymentState = "rolling_back_error" DeploymentStateDeployed DeploymentState = "deployed" )
type DeploymentStatus ¶
type DeploymentStatus struct { State DeploymentState `json:"state"` Details string `json:"details,omitempty"` }
type EntityDetails ¶
type EntityDetails struct { EntityIdentifier ResourceUUID string `json:"resource_uuid,omitempty"` ResourceType string `json:"type,omitempty"` Status string `json:"status,omitempty"` }
type EntityIdentifier ¶
type EntityIdentifier struct { UUID string `json:"uuid,omitempty"` Name string `json:"name,omitempty"` }
EntityIdentifier represents one or both values for a Meroxa Entity
func (EntityIdentifier) GetNameOrUUID ¶
func (e EntityIdentifier) GetNameOrUUID() (string, error)
type Environment ¶
type Environment struct { UUID string `json:"uuid"` Name string `json:"name"` Provider EnvironmentProvider `json:"provider"` Region EnvironmentRegion `json:"region"` Type EnvironmentType `json:"type"` Configuration map[string]interface{} `json:"config,omitempty"` Status EnvironmentViewStatus `json:"status"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Environment represents the Meroxa Environment type within the Meroxa API
type EnvironmentAction ¶
type EnvironmentAction string
const (
EnvironmentActionRepair EnvironmentAction = "repair"
)
type EnvironmentProvider ¶
type EnvironmentProvider string
const (
EnvironmentProviderAws EnvironmentProvider = "aws"
)
type EnvironmentRegion ¶
type EnvironmentRegion string
const ( EnvironmentRegionApNortheast1 EnvironmentRegion = "ap-northeast-1" EnvironmentRegionEuCentral EnvironmentRegion = "eu-central-1" EnvironmentRegionUsEast1 EnvironmentRegion = "us-east-1" EnvironmentRegionUsEast2 EnvironmentRegion = "us-east-2" EnvironmentRegionUsWest2 EnvironmentRegion = "us-west-2" )
type EnvironmentState ¶
type EnvironmentState string
const ( EnvironmentStateProvisioning EnvironmentState = "provisioning" EnvironmentStateProvisioningError EnvironmentState = "provisioning_error" EnvironmentStateReady EnvironmentState = "ready" EnvironmentStateUpdating EnvironmentState = "updating" EnvironmentStateUpdatingError EnvironmentState = "updating_error" EnvironmentStateRepairing EnvironmentState = "repairing" EnvironmentStateRepairingError EnvironmentState = "repairing_error" EnvironmentStateDeprovisioning EnvironmentState = "deprovisioning" EnvironmentStateDeprovisioningError EnvironmentState = "deprovisioning_error" EnvironmentStateDeprovisioned EnvironmentState = "deprovisioned" EnvironmentStatePreflightSuccess EnvironmentState = "preflight_success" EnvironmentStatePreflightError EnvironmentState = "preflight_error" )
type EnvironmentType ¶
type EnvironmentType string
const ( EnvironmentTypeSelfHosted EnvironmentType = "self_hosted" EnvironmentTypePrivate EnvironmentType = "private" EnvironmentTypeCommon EnvironmentType = "common" )
type EnvironmentViewStatus ¶
type EnvironmentViewStatus struct { State EnvironmentState `json:"state"` Details string `json:"details,omitempty"` PreflightDetails *PreflightDetails `json:"preflight_details,omitempty"` }
type FlinkJob ¶
type FlinkJob struct { UUID string `json:"uuid"` Name string `json:"name"` InputStreams []string `json:"input_streams,omitempty"` OutputStreams []string `json:"output_streams,omitempty"` Environment EntityIdentifier `json:"environment,omitempty"` Status FlinkJobStatus `json:"status"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type FlinkJobDesiredState ¶
type FlinkJobDesiredState string
type FlinkJobLifecycleState ¶
type FlinkJobLifecycleState string
type FlinkJobManagerDeploymentState ¶
type FlinkJobManagerDeploymentState string
type FlinkJobReconciliationState ¶
type FlinkJobReconciliationState string
type FlinkJobStatus ¶
type FlinkJobStatus struct { LifecycleState FlinkJobLifecycleState `json:"lifecycle_state"` State string `json:"state"` ReconciliationState FlinkJobReconciliationState `json:"reconciliation_state"` ManagerDeploymentState FlinkJobManagerDeploymentState `json:"manager_deployment_state"` Details string `json:"details,omitempty"` }
type Function ¶
type Function struct { UUID string `json:"uuid"` Name string `json:"name"` InputStream string `json:"input_stream"` OutputStream string `json:"output_stream"` Image string `json:"image"` Command []string `json:"command"` Args []string `json:"args"` EnvVars map[string]string `json:"env_vars"` Status FunctionStatus `json:"status"` Pipeline PipelineIdentifier `json:"pipeline"` Logs string `json:"logs"` // CLI includes what's returned by GetFunctionLogs CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type FunctionState ¶
type FunctionState string
const ( FunctionStatePending FunctionState = "pending" FunctionStateRunning FunctionState = "running" FunctionStateError FunctionState = "error" )
Enum values for FunctionState
type FunctionStatus ¶
type FunctionStatus struct { State FunctionState `json:"state"` Details string `json:"details"` }
type Option ¶
func WithAccountUUID ¶
WithAccountUUID sets the http client to use for requests.
func WithAuthentication ¶
func WithAuthentication(conf *oauth2.Config, accessToken, refreshToken string, observers ...TokenObserver) Option
WithAuthentication sets an authenticated http client that takes care of adding the access token to requests as well as refreshing it with the refresh token when it expires. Observers will be called each time the token is refreshed. Note: provide WithClientTimeout option before WithAuthentication to set the timeout of the client used for fetching access tokens.
func WithBaseURL ¶
WithBaseURL sets the base url in the client. The default is "https://api.meroxa.io".
func WithClient ¶
WithClient sets the http client to use for requests.
func WithClientTimeout ¶
WithClientTimeout sets the http client timeout. The default is 5 seconds.
func WithDumpTransport ¶
WithDumpTransport will dump the outgoing requests and incoming responses and write them to writer.
func WithHeader ¶
WithHeader allows for setting a generic header to use for requests.
func WithUserAgent ¶
WithUserAgent sets the User-Agent header. The default is "meroxa-go".
type Pipeline ¶
type Pipeline struct { CreatedAt time.Time `json:"created_at"` Environment *EntityIdentifier `json:"environment,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Name string `json:"name"` State PipelineState `json:"state"` UpdatedAt time.Time `json:"updated_at"` UUID string `json:"uuid"` }
Pipeline represents the Meroxa Pipeline type within the Meroxa API
type PipelineIdentifier ¶
type PipelineState ¶
type PipelineState string
const ( PipelineStateHealthy PipelineState = "healthy" PipelineStateDegraded PipelineState = "degraded" )
type PreflightDetails ¶
type PreflightDetails struct { PreflightPermissions *PreflightPermissions `json:"permissions"` PreflightLimits *PreflightLimits `json:"limits"` }
type PreflightLimits ¶
type PreflightPermissions ¶
type PreflightPermissions struct { S3 []string `json:"s3"` ServiceQuotas []string `json:"servicequotas"` MSK []string `json:"msk"` EKS []string `json:"eks"` EC2 []string `json:"ec2"` ECR []string `json:"ecr"` KMS []string `json:"kms"` IAM []string `json:"iam"` Cloudformation []string `json:"cloudformation"` Cloudwatch []string `json:"cloudwatch"` }
type RepairEnvironmentInput ¶
type RepairEnvironmentInput struct {
Action EnvironmentAction `json:"action"`
}
type Resource ¶
type Resource struct { UUID string `json:"uuid"` Type ResourceTypeName `json:"type"` Name string `json:"name"` URL string `json:"url"` Credentials *Credentials `json:"credentials,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` SSHTunnel *ResourceSSHTunnel `json:"ssh_tunnel,omitempty"` Environment *EntityIdentifier `json:"environment,omitempty"` Status ResourceStatus `json:"status"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Resource represents the Meroxa Resource type within the Meroxa API
type ResourceCollection ¶
type ResourceIntrospection ¶
type ResourceIntrospection struct { ID int64 `json:"id"` AccountID int `json:"account_id"` UUID string `json:"uuid"` ResourceID int `json:"resource_id"` Collections []string `json:"collections,omitempty"` Schemas map[string]string `json:"schemas,omitempty"` Capabilities map[string]string `json:"capabilities,omitempty"` Samples map[string][]string `json:"samples,omitempty"` ResourceVersion string `json:"resource_version"` IntrospectedAt time.Time `json:"introspected_at"` }
ResourceIntrospection represents the introspection results of a Resource
type ResourceSSHTunnel ¶
type ResourceSSHTunnelInput ¶
type ResourceState ¶
type ResourceState string
const ( ResourceStatePending ResourceState = "pending" ResourceStateStarting ResourceState = "starting" ResourceStateError ResourceState = "error" ResourceStateReady ResourceState = "ready" )
type ResourceStatus ¶
type ResourceStatus struct { State ResourceState `json:"state"` Details string `json:"details"` LastUpdatedAt time.Time `json:"last_updated_at"` }
type ResourceType ¶
type ResourceType struct { UUID string `json:"uuid"` Name string `json:"name"` ReleaseStage ResourceTypeReleaseStage `json:"release_stage"` Categories []string `json:"categories"` FormConfig map[string]interface{} `json:"form_config"` OptedIn bool `json:"opted_in"` HasAccess bool `json:"has_access"` CliOnly bool `json:"cli_only"` }
type ResourceTypeName ¶
type ResourceTypeName string
type ResourceTypeReleaseStage ¶
type ResourceTypeReleaseStage string
type Source ¶
type Source struct { GetUrl string `json:"get_url"` PutUrl string `json:"put_url"` Environment *EntityIdentifier `json:"environment,omitempty"` }
type SourceBlob ¶
type SourceBlob struct {
Url string `json:"url"`
}
type TokenObserver ¶
TokenObserver is a function that will be notified when a new token is fetched.
type Transform ¶
type Transform struct { ID int `json:"id"` Name string `json:"name"` Required bool `json:"required"` Description string `json:"description"` Type string `json:"type"` Properties []Property `json:"properties"` }
Transform represent the Meroxa Transform type within the Meroxa API
type UpdateConnectorInput ¶
type UpdateEnvironmentInput ¶
type UpdatePipelineInput ¶
type UpdatePipelineInput struct { Name string `json:"name"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
UpdatePipelineInput represents the input when updating a Meroxa Pipeline
type UpdateResourceInput ¶
type UpdateResourceInput struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` Credentials *Credentials `json:"credentials,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` SSHTunnel *ResourceSSHTunnelInput `json:"ssh_tunnel,omitempty"` }
UpdateResourceInput represents the Meroxa Resource we're updating in the Meroxa API
type User ¶
type User struct { UUID string `json:"uuid"` Username string `json:"username,omitempty"` Email string `json:"email,omitempty"` GivenName string `json:"given_name,omitempty"` FamilyName string `json:"family_name,omitempty"` Verified bool `json:"email_verified,omitempty"` LastLogin time.Time `json:"last_login,omitempty"` Features []string `json:"features,omitempty"` }