Documentation
¶
Index ¶
- Variables
- func ResolveCapabilitiesFromSource(source Source, ident, namespace string, log *vlog.Logger) (*capabilities.CapabilityConfig, error)
- func TokenHash(token string) []byte
- type Credential
- type CredentialSupplier
- type Options
- type Overview
- type References
- type Source
- type State
- type TenantOverview
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ResolveCapabilitiesFromSource ¶
func ResolveCapabilitiesFromSource(source Source, ident, namespace string, log *vlog.Logger) (*capabilities.CapabilityConfig, error)
ResolveCapabilitiesFromSource takes the ident, namespace, and version, and looks up the capabilities for that trio from the Source applying the user overrides over the default configurations.
Types ¶
type Credential ¶
Credential implementations are used to authenticate entities.
type CredentialSupplier ¶
type CredentialSupplier func(ctx context.Context) (Credential, error)
type Overview ¶
type Overview struct {
State
TenantRefs References `json:"tenantReferences"`
}
Overview is an overview of all the tenants within the system
type References ¶
type References struct {
// map of all tenant idents to their latest tenant version
Identifiers map[string]int64 `json:"identifiers"`
}
References are maps of all the available tenants in the system
type Source ¶
type Source interface {
// Start indicates to the Source that it should prepare for system startup.
Start(opts Options) error
// State returns the state of the entire system, used for cache invalidation and sync purposes
State() (*State, error)
// Overview returns a the system overview, used for incremental sync of the system's tenants
Overview() (*Overview, error)
// TenantOverview returns the overview for the requested tenant
TenantOverview(ident string) (*TenantOverview, error)
// GetModule attempts to find the given module by its fqmn, and returns ErrRunnableNotFound if it cannot.
GetModule(FQMN string) (*tenant.Module, error)
// Workflows returns the requested workflows for the system.
Workflows(ident, namespace string, version int64) ([]tenant.Workflow, error)
// Connections returns the connections needed for the system.
Connections(ident, namespace string, version int64) ([]tenant.Connection, error)
// Authentication provides any auth headers or metadata for the system.
Authentication(ident, namespace string, version int64) (*tenant.Authentication, error)
// Capabilities provides the tenant's configured capabilities.
Capabilities(ident, namespace string, version int64) (*capabilities.CapabilityConfig, error)
// StaticFile is a source of static files for the tenant
StaticFile(identifier string, tenantVersion int64, path string) ([]byte, error)
// Queries returns the database queries that should be made available.
Queries(ident, namespace string, version int64) ([]tenant.DBQuery, error)
}
Source describes how an entire system relays its state to a client
Click to show internal directories.
Click to hide internal directories.