Documentation
¶
Index ¶
Constants ¶
View Source
const LocalInstallID = "local"
Variables ¶
View Source
var ( ErrScopeUserRequired = errors.New("speechkit storage: user scope is required") ErrScopeTenantRequired = errors.New("speechkit storage: tenant scope is required") )
Functions ¶
func NormalizeBackendName ¶
func NormalizeIdentifier ¶
Types ¶
type BackendInfo ¶
type BackendInfo struct {
Name string `json:"name"`
DisplayName string `json:"displayName,omitempty"`
ScopePolicy ScopePolicy `json:"scopePolicy"`
Capabilities Capabilities `json:"capabilities"`
}
type Capabilities ¶
type Config ¶
type Config struct {
Backend string
DefaultScope Scope
ScopePolicy ScopePolicy
Options map[string]string
}
type Registry ¶
type Registry[T any] struct { // contains filtered or unexported fields }
func NewRegistry ¶
type Scope ¶
type Scope struct {
InstallID string `json:"installId,omitempty"`
DeviceID string `json:"deviceId,omitempty"`
UserID string `json:"userId,omitempty"`
TenantID string `json:"tenantId,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
}
func NormalizeScope ¶
func ScopeFromContext ¶
type ScopePolicy ¶
type ScopePolicy string
const ( ScopeOptional ScopePolicy = "optional" ScopeUserRequired ScopePolicy = "user-required" ScopeTenantRequired ScopePolicy = "tenant-required" )
func (ScopePolicy) Validate ¶
func (p ScopePolicy) Validate(scope Scope) error
Click to show internal directories.
Click to hide internal directories.