Documentation
¶
Index ¶
- Constants
- Variables
- func GetConnectorVersionIdsForConnections(connections []database.Connection) []iface.ConnectorVersionId
- func NewCoreService(cfg config.C, db database.DB, encrypt encrypt.E, r apredis.Client, ...) iface.C
- func NewProbe(cfg *cschema.Probe, s *service, cv *ConnectorVersion, c *connection) iface.Probe
- type Connector
- type ConnectorVersion
- func (cv *ConnectorVersion) GetAnnotations() map[string]string
- func (cv *ConnectorVersion) GetCreatedAt() time.Time
- func (cv *ConnectorVersion) GetDefinition() *cschema.Connector
- func (cv *ConnectorVersion) GetHash() string
- func (cv *ConnectorVersion) GetId() apid.ID
- func (cv *ConnectorVersion) GetLabels() map[string]string
- func (cv *ConnectorVersion) GetNamespace() string
- func (cv *ConnectorVersion) GetState() database.ConnectorVersionState
- func (cv *ConnectorVersion) GetUpdatedAt() time.Time
- func (cv *ConnectorVersion) GetVersion() uint64
- func (cv *ConnectorVersion) Logger() *slog.Logger
- func (cv *ConnectorVersion) SetState(ctx context.Context, state database.ConnectorVersionState) error
- type EncryptionKey
- func (ek *EncryptionKey) GetAnnotations() map[string]string
- func (ek *EncryptionKey) GetCreatedAt() time.Time
- func (ek *EncryptionKey) GetId() apid.ID
- func (ek *EncryptionKey) GetLabels() map[string]string
- func (ek *EncryptionKey) GetNamespace() string
- func (ek *EncryptionKey) GetState() database.EncryptionKeyState
- func (ek *EncryptionKey) GetUpdatedAt() time.Time
- func (ek *EncryptionKey) Logger() *slog.Logger
- type Namespace
- func (ns *Namespace) GetAnnotations() map[string]string
- func (ns *Namespace) GetCreatedAt() time.Time
- func (ns *Namespace) GetEncryptionKeyId() *apid.ID
- func (ns *Namespace) GetLabels() map[string]string
- func (ns *Namespace) GetNamespace() string
- func (ns *Namespace) GetPath() string
- func (ns *Namespace) GetState() database.NamespaceState
- func (ns *Namespace) GetUpdatedAt() time.Time
- func (ns *Namespace) Logger() *slog.Logger
- type RateLimit
- func (r *RateLimit) GetAnnotations() map[string]string
- func (r *RateLimit) GetCreatedAt() time.Time
- func (r *RateLimit) GetDefinition() rlschema.RateLimit
- func (r *RateLimit) GetId() apid.ID
- func (r *RateLimit) GetLabels() map[string]string
- func (r *RateLimit) GetNamespace() string
- func (r *RateLimit) GetUpdatedAt() time.Time
- func (r *RateLimit) Logger() *slog.Logger
Constants ¶
const ( ProbeOutcomeUnknown = "unknown" ProbeOutcomeSuccess = "success" ProbeOutcomeError = "error" )
const MigrateMutexKeyName = "connectors-migrate-lock"
MigrateMutexKeyName is the key that can be used when locking to perform a migration in redis.
Variables ¶
var ErrConnectionNotFound = iface.ErrConnectionNotFound
var ErrDraftAlreadyExists = iface.ErrDraftAlreadyExists
var ErrNotDraft = iface.ErrNotDraft
var ErrNotFound = iface.ErrNotFound
var ErrProbeNotFound = errors.New("probe not found")
var ErrProtected = iface.ErrProtected
var ErrProxyNotImplemented = errors.New("auth type for connection does not implement proxy")
Functions ¶
func GetConnectorVersionIdsForConnections ¶
func GetConnectorVersionIdsForConnections(connections []database.Connection) []iface.ConnectorVersionId
GetConnectorVersionIdsForConnections returns a list of unique connector version ids for the given set of connections. The purpose of this is to support loading connector versions in bulk.
Types ¶
type Connector ¶
type Connector struct {
ConnectorVersion
TotalVersions int64
States database.ConnectorVersionStates
}
Connector object is returned from queries for connectors, with one record per id. It aggregates some information across all versions for a connector.
func (*Connector) GetNamespace ¶
func (*Connector) GetStates ¶
func (c *Connector) GetStates() database.ConnectorVersionStates
func (*Connector) GetTotalVersions ¶
type ConnectorVersion ¶
type ConnectorVersion struct {
database.ConnectorVersion
// contains filtered or unexported fields
}
ConnectorVersion is a wrapper for the lower level database equivalent that handles things like decrypting the configuration, checking upgradability, etc.
func (*ConnectorVersion) GetAnnotations ¶
func (cv *ConnectorVersion) GetAnnotations() map[string]string
func (*ConnectorVersion) GetCreatedAt ¶
func (cv *ConnectorVersion) GetCreatedAt() time.Time
func (*ConnectorVersion) GetDefinition ¶
func (cv *ConnectorVersion) GetDefinition() *cschema.Connector
func (*ConnectorVersion) GetHash ¶
func (cv *ConnectorVersion) GetHash() string
func (*ConnectorVersion) GetId ¶
func (cv *ConnectorVersion) GetId() apid.ID
func (*ConnectorVersion) GetLabels ¶
func (cv *ConnectorVersion) GetLabels() map[string]string
func (*ConnectorVersion) GetNamespace ¶
func (cv *ConnectorVersion) GetNamespace() string
func (*ConnectorVersion) GetState ¶
func (cv *ConnectorVersion) GetState() database.ConnectorVersionState
func (*ConnectorVersion) GetUpdatedAt ¶
func (cv *ConnectorVersion) GetUpdatedAt() time.Time
func (*ConnectorVersion) GetVersion ¶
func (cv *ConnectorVersion) GetVersion() uint64
func (*ConnectorVersion) Logger ¶
func (cv *ConnectorVersion) Logger() *slog.Logger
func (*ConnectorVersion) SetState ¶
func (cv *ConnectorVersion) SetState(ctx context.Context, state database.ConnectorVersionState) error
type EncryptionKey ¶
type EncryptionKey struct {
database.EncryptionKey
// contains filtered or unexported fields
}
EncryptionKey is the core abstraction around encryption keys.
func (*EncryptionKey) GetAnnotations ¶
func (ek *EncryptionKey) GetAnnotations() map[string]string
func (*EncryptionKey) GetCreatedAt ¶
func (ek *EncryptionKey) GetCreatedAt() time.Time
func (*EncryptionKey) GetId ¶
func (ek *EncryptionKey) GetId() apid.ID
func (*EncryptionKey) GetLabels ¶
func (ek *EncryptionKey) GetLabels() map[string]string
func (*EncryptionKey) GetNamespace ¶
func (ek *EncryptionKey) GetNamespace() string
func (*EncryptionKey) GetState ¶
func (ek *EncryptionKey) GetState() database.EncryptionKeyState
func (*EncryptionKey) GetUpdatedAt ¶
func (ek *EncryptionKey) GetUpdatedAt() time.Time
func (*EncryptionKey) Logger ¶
func (ek *EncryptionKey) Logger() *slog.Logger
type Namespace ¶
Namespace is the core abstraction around namespaces.
func (*Namespace) GetAnnotations ¶
func (*Namespace) GetCreatedAt ¶
func (*Namespace) GetEncryptionKeyId ¶
func (*Namespace) GetNamespace ¶
func (*Namespace) GetState ¶
func (ns *Namespace) GetState() database.NamespaceState
func (*Namespace) GetUpdatedAt ¶
type RateLimit ¶
RateLimit is the core abstraction wrapping a database.RateLimit.
func (*RateLimit) GetAnnotations ¶
func (*RateLimit) GetCreatedAt ¶
func (*RateLimit) GetDefinition ¶
func (*RateLimit) GetNamespace ¶
func (*RateLimit) GetUpdatedAt ¶
Source Files
¶
- connection.go
- connection_data_source.go
- connection_health_state.go
- connection_post_auth.go
- connection_probe.go
- connection_proxy.go
- connection_revoke_credentials.go
- connection_state.go
- connection_verify.go
- connector.go
- connector_version.go
- connector_version_builder.go
- connector_version_state.go
- encryption_key.go
- error.go
- namespace.go
- operation.go
- probe.go
- probe_http.go
- probe_no_op.go
- rate_limit.go
- service.go
- service_connection_abort.go
- service_connection_cancel_setup.go
- service_connection_create.go
- service_connection_disconnect.go
- service_connection_get.go
- service_connection_initiate.go
- service_connection_list.go
- service_connection_reconfigure.go
- service_connection_retry.go
- service_connection_submit.go
- service_connector_list.go
- service_connector_version_create.go
- service_connector_version_get.go
- service_connector_version_list.go
- service_connector_version_update.go
- service_encryption_key.go
- service_migration.go
- service_namespace.go
- service_oauth.go
- service_rate_limit.go
- service_tasks.go
- service_verify_connection.go
- task_disconnect_connection.go
- task_migrate_connections_between_connector_versions.go
- task_probe.go
- task_verify_connection.go
- util.go