Documentation
¶
Index ¶
- func AnnotateHistory(entries *[]*ConfigDiffVersionHistoryEntry)
- func CreateConfigCommand(db *gorm.DB) *cli.Command
- func CreateConfigSchemaAddCommand(db *gorm.DB) *cli.Command
- func CreateConfigSchemaCommand(db *gorm.DB) *cli.Command
- type CommitKind
- type CommitORM
- type CommitObject
- type ConfigContextHandle
- type ConfigContextService
- func (s *ConfigContextService) CreateHandle(scope util.ScopeKind, accountId util.AccountId, userId util.UserId) ConfigContextHandle
- func (s *ConfigContextService) GetAccountRoot(handle ConfigContextHandle) *ConfigVersionRef
- func (s *ConfigContextService) GetCurrent(handle ConfigContextHandle) *ConfigVersionRef
- func (s *ConfigContextService) GetUserRoot(handle ConfigContextHandle) *ConfigVersionRef
- func (s *ConfigContextService) LoadContext(ctx context.Context, tx *gorm.DB, handle ConfigContextHandle) error
- func (s *ConfigContextService) Save(ctx context.Context, tx *gorm.DB, handle ConfigContextHandle) (bool, error)
- func (s *ConfigContextService) SetAccountRoot(handle ConfigContextHandle, ref *ConfigVersionRef) bool
- func (s *ConfigContextService) SetCurrent(handle ConfigContextHandle, parentRef *ConfigVersionRef, ref *ConfigVersionRef) bool
- func (s *ConfigContextService) SetUserRoot(handle ConfigContextHandle, ref *ConfigVersionRef) bool
- type ConfigDagNode
- type ConfigDagNodeEmbed
- type ConfigDagNodeKind
- type ConfigDagService
- func (s *ConfigDagService) CommitNode(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, ...) error
- func (s *ConfigDagService) CreateNode(scope util.ScopeKind, accountId util.AccountId, userId util.UserId, ...) (*ConfigNode, error)
- func (s *ConfigDagService) GetExistingNode(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, ...) (*ConfigNodeORM, error)
- func (s *ConfigDagService) GetReferences(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, ...) (RefMap, error)
- type ConfigDataObject
- func (c *ConfigDataObject) GetConfigData() util.Data
- func (c *ConfigDataObject) GetConfigParentVersionRef() *ConfigVersionRef
- func (c *ConfigDataObject) GetConfigVersionRef() *ConfigVersionRef
- func (c *ConfigDataObject) MarshalJSON() ([]byte, error)
- func (c *ConfigDataObject) Scan(src interface{}) error
- func (c *ConfigDataObject) UnmarshalJSON(data []byte) error
- func (c ConfigDataObject) Value() (driver.Value, error)
- type ConfigDataObjectEmbed
- type ConfigDataRecord
- type ConfigDiffParams
- type ConfigDiffService
- type ConfigDiffSpec
- type ConfigDiffVersion
- type ConfigDiffVersionHistoryEntry
- type ConfigDiffVersions
- type ConfigDocumentORM
- func (c *ConfigDocumentORM) AddIndexes(ctx context.Context, tx *sql.Tx) error
- func (c *ConfigDocumentORM) GetConfigDataObject() *ConfigDataObject
- func (c *ConfigDocumentORM) RemoveIndexes(ctx context.Context, tx *sql.Tx) error
- func (c *ConfigDocumentORM) SetRecordConfigData(ctx context.Context, tx *gorm.DB, data util.Data, handle ConfigContextHandle) error
- func (c *ConfigDocumentORM) TableName() string
- type ConfigDocumentRecord
- type ConfigGormQuerier
- type ConfigImmutableDataEmbed
- func (c *ConfigImmutableDataEmbed) AddDataIndexes(ctx context.Context, tx *sql.Tx, tableName string, fields ...string) error
- func (c *ConfigImmutableDataEmbed) GetConfigDataObject() *ConfigDataObject
- func (c *ConfigImmutableDataEmbed) RemoveDataIndexes(ctx context.Context, tx *sql.Tx, tableName string) error
- type ConfigKeyedDataORM
- func (c *ConfigKeyedDataORM) AddIndexes(ctx context.Context, tx *sql.Tx) error
- func (c *ConfigKeyedDataORM) GetConfigDataObject() *ConfigDataObject
- func (c *ConfigKeyedDataORM) RemoveIndexes(ctx context.Context, tx *sql.Tx) error
- func (c *ConfigKeyedDataORM) SetRecordConfigData(ctx context.Context, tx *gorm.DB, data util.Data, handle ConfigContextHandle) error
- func (c *ConfigKeyedDataORM) TableName() string
- type ConfigKeyedRecord
- type ConfigKeyedRecordObject
- type ConfigListEntry
- type ConfigMetadata
- type ConfigModelFunc
- type ConfigNode
- func (c *ConfigNode) AsRecord() *ConfigRecordObject
- func (c *ConfigNode) ComputeHash() (*util.ConfigVersionHash, error)
- func (c *ConfigNode) DecodeContents(dest interface{}) error
- func (c *ConfigNode) EncodeContents(src interface{}) error
- func (c *ConfigNode) GetConfigVersionRef() *ConfigVersionRef
- func (c *ConfigNode) GetContents() *util.Data
- func (c *ConfigNode) GetNodeMetadata() *ConfigNodeMetadata
- func (c *ConfigNode) GetParentRef() *ConfigVersionRef
- func (c *ConfigNode) GetRecordContents() *util.Data
- func (c *ConfigNode) GetVersionRef() *ConfigVersionRef
- func (c *ConfigNode) ParseNode() (interface{}, error)
- func (c *ConfigNode) SetContents(contents *util.Data) error
- type ConfigNodeKind
- type ConfigNodeMetadata
- type ConfigNodeORM
- func (m *ConfigNodeORM) AddConstraints(ctx context.Context, tx *sql.Tx) error
- func (m *ConfigNodeORM) AddIndexes(ctx context.Context, tx *sql.Tx) error
- func (c *ConfigNodeORM) GetConfigNode() *ConfigNode
- func (m *ConfigNodeORM) RemoveConstraints(ctx context.Context, tx *sql.Tx) error
- func (m *ConfigNodeORM) RemoveIndexes(ctx context.Context, tx *sql.Tx) error
- func (c ConfigNodeORM) TableName() string
- type ConfigORM
- type ConfigQuerier
- type ConfigQueryFunc
- type ConfigQueryValues
- type ConfigRecordKind
- type ConfigRecordMetadata
- type ConfigRecordModel
- type ConfigRecordNode
- type ConfigRecordORM
- type ConfigRecordObject
- type ConfigRecordQuery
- type ConfigReferenceKind
- type ConfigReferenceORM
- func (c *ConfigReferenceORM) AddConstraints(ctx context.Context, tx *sql.Tx) error
- func (c *ConfigReferenceORM) AddIndexes(ctx context.Context, tx *sql.Tx) error
- func (c *ConfigReferenceORM) RemoveConstraints(ctx context.Context, tx *sql.Tx) error
- func (c *ConfigReferenceORM) RemoveIndexes(ctx context.Context, tx *sql.Tx) error
- func (c *ConfigReferenceORM) TableName() string
- type ConfigReferenceResult
- type ConfigReferenceService
- func (s *ConfigReferenceService) GetConfigReference(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, ...) (*configRefCache, error)
- func (s *ConfigReferenceService) GetRecord(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, ...) (*ConfigReferenceResult, error)
- func (s *ConfigReferenceService) SetConfigReference(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, ...) error
- type ConfigResourceData
- type ConfigSchemaAssociationRecord
- type ConfigSchemaMigrations
- type ConfigSchemaObject
- type ConfigSchemaRecord
- type ConfigSchemaService
- func (s *ConfigSchemaService) GetConfigSchemaVersions(ctx context.Context, tx *gorm.DB, schemaQuery *ConfigRecordQuery) (*ConfigSchemaVersions, error)
- func (s *ConfigSchemaService) GetLatestSchemaVersion(ctx context.Context, tx *gorm.DB, schemaQuery *ConfigRecordQuery) (*ConfigSchemaRecord, error)
- func (s *ConfigSchemaService) GetSchema(ctx context.Context, tx *gorm.DB, schemaQuery *ConfigRecordQuery) (*ConfigSchemaRecord, error)
- type ConfigSchemaVersions
- type ConfigService
- func (s *ConfigService) CommitNode(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, ...) error
- func (s *ConfigService) CreateNode(scope util.ScopeKind, accountId util.AccountId, userId util.UserId, ...) (*ConfigNode, error)
- func (s *ConfigService) GetConfigContextService() *ConfigContextService
- func (s *ConfigService) GetConfigDagService() *ConfigDagService
- func (s *ConfigService) GetConfigDiffService() *ConfigDiffService
- func (s *ConfigService) GetConfigSchemaService() *ConfigSchemaService
- func (s *ConfigService) GetLatestRecord(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, ...) (*ConfigDiffVersion, error)
- func (s *ConfigService) InsertRecord(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, ...) (*ConfigNodeMetadata, error)
- func (s *ConfigService) ListConfigs(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, ...) ([]*ConfigListEntry, error)
- func (s *ConfigService) SetRecordValues(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, ...) (*ConfigNodeMetadata, error)
- type ConfigSettingHandle
- type ConfigStageAudienceKind
- type ConfigStageKind
- type ConfigTagORM
- type ConfigTagObject
- type ConfigVersionORM
- type ConfigVersionRef
- type ConfigVersions
- type ConfigWhereQuery
- type DiffVersionChainEntry
- type ErrConfigDataObjectEncodingFailed
- type ErrConfigObjectSettingConflict
- type ErrConfigSettingError
- type ErrConfigSettingHandleConsumed
- type ErrInvalidConfigDataObjectHandle
- type ErrInvalidConfigDiffParams
- type ErrInvalidConfigRecordType
- type ErrInvalidConfigSettingHandle
- type ErrMissingRequiredParameter
- type ErrReferenceNotFound
- type RecordMatchFilter
- type RefMap
- type SetRecordValuesResult
- type ValueSettingMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnnotateHistory ¶
func AnnotateHistory(entries *[]*ConfigDiffVersionHistoryEntry)
func CreateConfigCommand ¶
Types ¶
type CommitKind ¶
type CommitKind string
const ( // Add more later CommitKindConfigDataObject CommitKind = "config_data_object" )
type CommitORM ¶
type CommitORM struct { util.ImmutableEmbed `json:",inline"` CommitObject `json:"commit_object"` }
type CommitObject ¶
type CommitObject struct { CommitKind CommitKind `json:"commit_kind"` ConfigDataObject *ConfigDataObject `json:"data_object"` }
func (*CommitObject) Scan ¶
func (o *CommitObject) Scan(src interface{}) error
type ConfigContextHandle ¶
type ConfigContextService ¶
type ConfigContextService struct {
// contains filtered or unexported fields
}
func NewConfigContextService ¶
func NewConfigContextService(db *gorm.DB, rdb *redis.Client, cacheService *util.CacheService) *ConfigContextService
func (*ConfigContextService) CreateHandle ¶
func (s *ConfigContextService) CreateHandle(scope util.ScopeKind, accountId util.AccountId, userId util.UserId) ConfigContextHandle
func (*ConfigContextService) GetAccountRoot ¶
func (s *ConfigContextService) GetAccountRoot(handle ConfigContextHandle) *ConfigVersionRef
func (*ConfigContextService) GetCurrent ¶
func (s *ConfigContextService) GetCurrent(handle ConfigContextHandle) *ConfigVersionRef
func (*ConfigContextService) GetUserRoot ¶
func (s *ConfigContextService) GetUserRoot(handle ConfigContextHandle) *ConfigVersionRef
func (*ConfigContextService) LoadContext ¶
func (s *ConfigContextService) LoadContext(ctx context.Context, tx *gorm.DB, handle ConfigContextHandle) error
func (*ConfigContextService) Save ¶
func (s *ConfigContextService) Save(ctx context.Context, tx *gorm.DB, handle ConfigContextHandle) (bool, error)
func (*ConfigContextService) SetAccountRoot ¶
func (s *ConfigContextService) SetAccountRoot(handle ConfigContextHandle, ref *ConfigVersionRef) bool
func (*ConfigContextService) SetCurrent ¶
func (s *ConfigContextService) SetCurrent(handle ConfigContextHandle, parentRef *ConfigVersionRef, ref *ConfigVersionRef) bool
func (*ConfigContextService) SetUserRoot ¶
func (s *ConfigContextService) SetUserRoot(handle ConfigContextHandle, ref *ConfigVersionRef) bool
type ConfigDagNode ¶
type ConfigDagNode interface {
GetConfigDagNode() *ConfigDagNodeEmbed
}
type ConfigDagNodeEmbed ¶
type ConfigDagNodeEmbed struct { AccountId util.AccountId `json:"account_id" gorm:"index;not null"` UserId *util.UserId `json:"user_id" gorm:"index;null"` ConfigVersionId util.ConfigVersionId `json:"config_version_id" gorm:"id;primaryKey"` // Git like DAG NodeKind ConfigDagNodeKind `json:"node_kind"` Hash util.ConfigVersionHash `json:"config_version_hash"` ParentId *util.ConfigVersionId `json:"parent_id"` ParentHash *util.ConfigVersionHash `json:"parent_hash"` Note string `json:"note"` // AdditionalParents []ParentRef `json:"additional_parents"` Data *ConfigDataObject `json:"data" gorm:"type:jsonb"` }
type ConfigDagNodeKind ¶
type ConfigDagNodeKind string
const ( ConfigDagNodeKindRoot ConfigDagNodeKind = "root" ConfigDagNodeKindData ConfigDagNodeKind = "data" ConfigDagNodeKindRecordChange ConfigDagNodeKind = "record_change" )
type ConfigDagService ¶
type ConfigDagService struct {
// contains filtered or unexported fields
}
func NewConfigDagService ¶
func NewConfigDagService(db *gorm.DB, rdb *redis.Client, cacheService *util.CacheService, refService *ConfigReferenceService) *ConfigDagService
func (*ConfigDagService) CommitNode ¶
func (*ConfigDagService) CreateNode ¶
func (s *ConfigDagService) CreateNode(scope util.ScopeKind, accountId util.AccountId, userId util.UserId, nodeKind ConfigNodeKind, data *util.Data, prevNode *ConfigNode) (*ConfigNode, error)
func (*ConfigDagService) GetExistingNode ¶
func (s *ConfigDagService) GetExistingNode(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, accountId util.AccountId, userId *util.UserId, queryFuncs ...ConfigQueryFunc) (*ConfigNodeORM, error)
type ConfigDataObject ¶
type ConfigDataObject struct {
// contains filtered or unexported fields
}
func NewConfigDataObject ¶
func NewConfigDataObject() *ConfigDataObject
func (*ConfigDataObject) GetConfigData ¶
func (c *ConfigDataObject) GetConfigData() util.Data
func (*ConfigDataObject) GetConfigParentVersionRef ¶
func (c *ConfigDataObject) GetConfigParentVersionRef() *ConfigVersionRef
func (*ConfigDataObject) GetConfigVersionRef ¶
func (c *ConfigDataObject) GetConfigVersionRef() *ConfigVersionRef
func (*ConfigDataObject) MarshalJSON ¶
func (c *ConfigDataObject) MarshalJSON() ([]byte, error)
Allow marshalling and unmarshalling of the inner data object
func (*ConfigDataObject) Scan ¶
func (c *ConfigDataObject) Scan(src interface{}) error
func (*ConfigDataObject) UnmarshalJSON ¶
func (c *ConfigDataObject) UnmarshalJSON(data []byte) error
type ConfigDataObjectEmbed ¶
type ConfigDataObjectEmbed struct { // ConfigDataObject `json:",inline" gorm:"config_data_object;type:jsonb;not null"` ConfigDataObject ConfigDataObject `json:",inline" gorm:"embedded"` }
type ConfigDataRecord ¶
type ConfigDiffParams ¶
type ConfigDiffParams struct { From *ConfigDiffSpec To *ConfigDiffSpec IncludeObject bool IncludePreviousObject bool IncludeNodeContentsPatch bool IncludeRecordMetadataPatch bool IncludeRecordContentsPatch bool IncludeRecord bool OnlyMatching bool // RecordMatchFilter *RecordMatchFilter ConfigRecordQuery *ConfigRecordQuery OnlyLatest bool }
type ConfigDiffService ¶
type ConfigDiffService struct {
// contains filtered or unexported fields
}
func NewConfigDiffService ¶
func NewConfigDiffService(db *gorm.DB, rdb *redis.Client, cacheService *util.CacheService, dagService *ConfigDagService, refService *ConfigReferenceService) *ConfigDiffService
func (*ConfigDiffService) GetLatestRecord ¶
func (s *ConfigDiffService) GetLatestRecord(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, accountId util.AccountId, userId util.UserId, fromVersion *ConfigVersionRef, toVersion *ConfigVersionRef, recordQuery *ConfigRecordQuery) (*ConfigDiffVersion, error)
func (*ConfigDiffService) GetVersionChain ¶
func (s *ConfigDiffService) GetVersionChain(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, accountId util.AccountId, userId util.UserId, params *ConfigDiffParams) (*ConfigDiffVersions, error)
type ConfigDiffSpec ¶
type ConfigDiffSpec struct {
Version *ConfigVersionRef `json:"version"`
}
type ConfigDiffVersion ¶
type ConfigDiffVersion struct { FromVersion *ConfigVersionRef `json:"from_version"` ToVersion *ConfigVersionRef `json:"to_version"` Match bool `json:"match"` NodeContents *util.Data `json:"object,omitempty"` RecordMetadata *ConfigRecordMetadata `json:"record_metadata,omitempty"` RecordContents *util.Data `json:"record_contents,omitempty"` RecordHistory []*ConfigDiffVersionHistoryEntry NodeContentsPatch *jsondiff.Patch `json:"diff"` RecordMetadataPatch *jsondiff.Patch `json:"record_metadata_diff"` RecordContentsPatch *jsondiff.Patch `json:"record_diff"` // Temporary PrevObject *util.Data `json:"prev_object,omitempty"` }
func (*ConfigDiffVersion) DecodeRecordContents ¶
func (v *ConfigDiffVersion) DecodeRecordContents(dest interface{}) error
type ConfigDiffVersionHistoryEntry ¶
type ConfigDiffVersionHistoryEntry struct { RecordContents *util.Data `json:"record_contents"` RecordCollectionKey *util.ConfigCollectionKey `json:"record_collection_key"` RecordItemKey *util.ConfigItemKey `json:"record_item_key"` ConfigRecordMetadata *ConfigRecordMetadata `json:"config_record_metadata"` NodeMetadata *ConfigNodeMetadata `json:"node_metadata"` // ConfigVersionHash *util.ConfigVersionHash `json:"config_version_hash"` RecordContentsPatch *jsondiff.Patch `json:"record_diff"` RecordContentsTextPatch string `json:"record_diff_text"` }
type ConfigDiffVersions ¶
type ConfigDiffVersions struct { FromVersion *ConfigVersionRef `json:"from_version"` ToVersion *ConfigVersionRef `json:"to_version"` Versions []ConfigDiffVersion `json:"versions"` ListHash *util.ConfigSchemaListHash `json:"list_hash"` }
type ConfigDocumentORM ¶
type ConfigDocumentORM struct { ConfigDocumentKey util.ConfigDocumentKey `json:"config_document_key" gorm:"type:text;not null"` ConfigDocumentId util.ConfigDocumentId `json:"config_document_id" gorm:"type:text;not null"` // ConfigImmutableDataEmbed `json:",inline" gorm:"embedded"` // ConfigImmutableDataEmbed `json:",inline" gorm:"-"` // ConfigImmutableDataEmbed `json:",inline" ` //gorm:"-"` ConfigImmutableDataEmbed `json:",inline"` }
func (*ConfigDocumentORM) AddIndexes ¶
func (*ConfigDocumentORM) GetConfigDataObject ¶
func (c *ConfigDocumentORM) GetConfigDataObject() *ConfigDataObject
func (*ConfigDocumentORM) RemoveIndexes ¶
func (*ConfigDocumentORM) SetRecordConfigData ¶
func (c *ConfigDocumentORM) SetRecordConfigData(ctx context.Context, tx *gorm.DB, data util.Data, handle ConfigContextHandle) error
func (*ConfigDocumentORM) TableName ¶
func (c *ConfigDocumentORM) TableName() string
type ConfigDocumentRecord ¶
type ConfigGormQuerier ¶
type ConfigGormQuerier struct {
// contains filtered or unexported fields
}
func (*ConfigGormQuerier) Querier ¶
func (q *ConfigGormQuerier) Querier() *gorm.DB
func (*ConfigGormQuerier) Where ¶
func (q *ConfigGormQuerier) Where(cond interface{}, params ...interface{}) ConfigQuerier
type ConfigImmutableDataEmbed ¶
type ConfigImmutableDataEmbed struct { AccountId util.AccountId `json:"account_id" gorm:"not null"` UserId *util.UserId `json:"user_id" gorm:""` CreatedAt time.Time `json:"created_at"` CreatedBy *util.UserId `json:"created_by" gorm:""` DeletedAt *time.Time `json:"deleted_at"` // ConfigImmutableEmbedOld `json:",inline" gorm:"embedded"` // ConfigDataObject `json:",inline" gorm:"config_data_object;type:jsonb"` // ConfigDataObject `json:",inline" gorm:"config_data_object"` // ConfigDataObject `json:",inline" gorm:"-"` // ConfigDataObject `json:",inline" gorm:"embedded;type:jsonb"` // ConfigDataObject `json:",inline"` ConfigDataObjectEmbed `json:",inline"` }
func (*ConfigImmutableDataEmbed) AddDataIndexes ¶
func (*ConfigImmutableDataEmbed) GetConfigDataObject ¶
func (c *ConfigImmutableDataEmbed) GetConfigDataObject() *ConfigDataObject
func (*ConfigImmutableDataEmbed) RemoveDataIndexes ¶
type ConfigKeyedDataORM ¶
type ConfigKeyedDataORM struct { ConfigKey util.ConfigKey `json:"config_key" gorm:"type:text;not null"` ConfigImmutableDataEmbed `json:",inline"` }
func (*ConfigKeyedDataORM) AddIndexes ¶
func (*ConfigKeyedDataORM) GetConfigDataObject ¶
func (c *ConfigKeyedDataORM) GetConfigDataObject() *ConfigDataObject
func (*ConfigKeyedDataORM) RemoveIndexes ¶
func (*ConfigKeyedDataORM) SetRecordConfigData ¶
func (c *ConfigKeyedDataORM) SetRecordConfigData(ctx context.Context, tx *gorm.DB, data util.Data, handle ConfigContextHandle) error
func (*ConfigKeyedDataORM) TableName ¶
func (c *ConfigKeyedDataORM) TableName() string
type ConfigKeyedRecord ¶
type ConfigKeyedRecordObject ¶
type ConfigKeyedRecordObject struct {
ConfigRecordObject
}
type ConfigListEntry ¶
type ConfigListEntry struct { RecordKey *util.ConfigRecordKey `json:"id"` RecordKind *ConfigRecordKind `json:"record_kind"` RecordId *util.ConfigRecordId `json:"record_id"` RecordCollectionKey *util.ConfigCollectionKey `json:"record_collection_key"` RecordItemKey *util.ConfigItemKey `json:"record_item_key"` NodeMetadata *ConfigNodeMetadata `json:"node_metadata"` RecordContents *util.Data `json:"record_contents"` RecordHistory []*ConfigDiffVersionHistoryEntry `json:"record_history"` }
func (*ConfigListEntry) String ¶
func (e *ConfigListEntry) String() string
type ConfigMetadata ¶
type ConfigMetadata struct { CreatedAt time.Time `json:"created_at"` // TODO: Make this non-optional and always pass the user id // use ScopeKind to determine if it's an account or user scope CreatedBy *util.UserId `json:"created_by"` VersionRef ConfigVersionRef `json:"version_ref"` ParentRef *ConfigVersionRef `json:"parent_ref"` }
type ConfigModelFunc ¶
type ConfigModelFunc func() ConfigRecordModel
type ConfigNode ¶
type ConfigNode struct { NodeMetadata ConfigNodeMetadata `json:"node_metadata" gorm:"column:node_metadata;type:jsonb;not null"` Contents *util.Data `json:"node_contents" gorm:"column:node_contents;type:jsonb"` }
func NewConfigNode ¶
func NewConfigNode(kind ConfigNodeKind, scope util.ScopeKind, accountId util.AccountId, userId util.UserId, parentRef *ConfigVersionRef, contents *util.Data) (*ConfigNode, error)
func (*ConfigNode) AsRecord ¶
func (c *ConfigNode) AsRecord() *ConfigRecordObject
func (*ConfigNode) ComputeHash ¶
func (c *ConfigNode) ComputeHash() (*util.ConfigVersionHash, error)
func (*ConfigNode) DecodeContents ¶
func (c *ConfigNode) DecodeContents(dest interface{}) error
func (*ConfigNode) EncodeContents ¶
func (c *ConfigNode) EncodeContents(src interface{}) error
func (*ConfigNode) GetConfigVersionRef ¶
func (c *ConfigNode) GetConfigVersionRef() *ConfigVersionRef
func (*ConfigNode) GetContents ¶
func (c *ConfigNode) GetContents() *util.Data
func (*ConfigNode) GetNodeMetadata ¶
func (c *ConfigNode) GetNodeMetadata() *ConfigNodeMetadata
func (*ConfigNode) GetParentRef ¶
func (c *ConfigNode) GetParentRef() *ConfigVersionRef
func (*ConfigNode) GetRecordContents ¶
func (c *ConfigNode) GetRecordContents() *util.Data
func (*ConfigNode) GetVersionRef ¶
func (c *ConfigNode) GetVersionRef() *ConfigVersionRef
func (*ConfigNode) ParseNode ¶
func (c *ConfigNode) ParseNode() (interface{}, error)
func (*ConfigNode) SetContents ¶
func (c *ConfigNode) SetContents(contents *util.Data) error
type ConfigNodeKind ¶
type ConfigNodeKind string
const ( // Used as a placeholder for a branch with no commits ConfigNodeKindEmpty ConfigNodeKind = "empty" ConfigNodeKindData ConfigNodeKind = "data" ConfigNodeKindRecord ConfigNodeKind = "record" )
type ConfigNodeMetadata ¶
type ConfigNodeMetadata struct { NodeKind ConfigNodeKind `json:"node_kind" gorm:"type:text;not null"` Scope util.ScopeKind `json:"scope" gorm:"type:text;not null"` AccountId util.AccountId `json:"account_id" gorm:"type:text;not null"` UserId util.UserId `json:"user_id" gorm:"type:text"` CreatedAt time.Time `json:"created_at" gorm:"type:timestamp with time zone;not null"` CreatedBy util.UserId `json:"created_by" gorm:"type:text"` CommittedAt *time.Time `json:"committed_at" gorm:"index;type:timestamp with time zone"` CommittedBy *util.UserId `json:"committed_by" gorm:"index;type:text"` VersionRef ConfigVersionRef `json:"version_ref" gorm:"type:jsonb;not null"` ParentRef *ConfigVersionRef `json:"parent_ref" gorm:"type:jsonb"` }
type ConfigNodeORM ¶
type ConfigNodeORM struct { util.ImmutableEmbed `json:",inline"` ConfigNode }
func (*ConfigNodeORM) AddConstraints ¶
func (*ConfigNodeORM) AddIndexes ¶
func (*ConfigNodeORM) GetConfigNode ¶
func (c *ConfigNodeORM) GetConfigNode() *ConfigNode
func (*ConfigNodeORM) RemoveConstraints ¶
func (*ConfigNodeORM) RemoveIndexes ¶
func (ConfigNodeORM) TableName ¶
func (c ConfigNodeORM) TableName() string
type ConfigORM ¶
type ConfigORM struct { Id string `json:"id" gorm:"primaryKey"` AccountId util.AccountId `json:"account_id" gorm:"index;not null"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt *time.Time `json:"deleted_at"` CreatedBy *util.UserId `json:"created_by" gorm:"index"` }
type ConfigQuerier ¶
type ConfigQuerier interface {
Where(cond interface{}, params ...interface{}) ConfigQuerier
}
type ConfigQueryFunc ¶
type ConfigQueryFunc func(querier ConfigQuerier) ConfigQuerier
func ConfigRecordQueryFunc ¶
func ConfigRecordQueryFunc(recordQuery ConfigRecordQuery) ConfigQueryFunc
func ConfigRefQueryFunc ¶
func ConfigRefQueryFunc(versionRef ConfigVersionRef) ConfigQueryFunc
type ConfigQueryValues ¶
type ConfigQueryValues map[string]interface{}
type ConfigRecordKind ¶
type ConfigRecordKind string
const ( ConfigRecordKindData ConfigRecordKind = "data" ConfigRecordKindKeyed ConfigRecordKind = "keyed" ConfigRecordKindDocument ConfigRecordKind = "document" ConfigRecordKindConfigSchema ConfigRecordKind = "config_schema" ConfigRecordKindConfigSchemaAssociation ConfigRecordKind = "config_schema_association" )
func ConfigRecordKindAsPtr ¶
func ConfigRecordKindAsPtr(kind ConfigRecordKind) *ConfigRecordKind
type ConfigRecordMetadata ¶
type ConfigRecordMetadata struct { RecordId util.ConfigRecordId `json:"record_id"` CollectionKey util.ConfigCollectionKey `json:"record_collection_key"` ItemKey *util.ConfigItemKey `json:"record_item_key"` RecordKind *ConfigRecordKind `json:"record_kind"` }
func (*ConfigRecordMetadata) AsRecordQuery ¶
func (m *ConfigRecordMetadata) AsRecordQuery() *ConfigRecordQuery
type ConfigRecordModel ¶
type ConfigRecordModel interface { // Gorm methods TableName() string GetConfigDataObject() *ConfigDataObject }
type ConfigRecordNode ¶
type ConfigRecordNode struct { RecordMetadata ConfigRecordMetadata `json:"record_metadata" gorm:"column:record_metadata;type:jsonb;not null"` RecordContents util.Data `json:"record_contents" gorm:"column:record_contents;type:jsonb"` }
func ToRecordNode ¶
func ToRecordNode(data util.Data) (*ConfigRecordNode, error)
func (*ConfigRecordNode) ParseRecord ¶
func (n *ConfigRecordNode) ParseRecord() (*ConfigRecordKind, interface{}, error)
type ConfigRecordORM ¶
type ConfigRecordORM struct { util.ImmutableEmbed `json:",inline"` ConfigRecordObject `json:"config_record_object"` }
func (*ConfigRecordORM) AddIndexes ¶
func (*ConfigRecordORM) RemoveIndexes ¶
func (*ConfigRecordORM) TableName ¶
func (c *ConfigRecordORM) TableName() string
type ConfigRecordObject ¶
type ConfigRecordObject struct { ConfigRecordKind ConfigRecordKind `json:"record_kind"` RecordMetadata ConfigRecordMetadata `json:"record_metadata" gorm:"column:record_metadata;type:jsonb;not null"` Contents util.Data `json:"record_contents" gorm:"column:record_contents;type:jsonb"` }
func (*ConfigRecordObject) DecodeContents ¶
func (c *ConfigRecordObject) DecodeContents(dest interface{}) error
func (*ConfigRecordObject) EncodeContents ¶
func (c *ConfigRecordObject) EncodeContents(src interface{}) error
type ConfigRecordQuery ¶
type ConfigRecordQuery struct { Scope *util.ScopeKind `json:"scope_kind"` AccountId *util.AccountId `json:"account_id"` UserId *util.UserId `json:"user_id"` RecordKind *ConfigRecordKind `json:"record_kind"` RecordId *util.ConfigRecordId `json:"record_id"` CollectionKey *util.ConfigCollectionKey `json:"collection_key"` ItemKey *util.ConfigItemKey `json:"item_key"` ConfigVersionHash *util.ConfigVersionHash `json:"config_version_hash"` }
func (*ConfigRecordQuery) AsMatchFilter ¶
func (q *ConfigRecordQuery) AsMatchFilter() *RecordMatchFilter
func (*ConfigRecordQuery) AsMetadata ¶
func (q *ConfigRecordQuery) AsMetadata() *ConfigRecordMetadata
func (*ConfigRecordQuery) PopulateMatchFilter ¶
func (q *ConfigRecordQuery) PopulateMatchFilter(filter *RecordMatchFilter)
type ConfigReferenceKind ¶
type ConfigReferenceKind string
const ( ConfigReferenceKindRoot ConfigReferenceKind = "root" ConfigReferenceKindHead ConfigReferenceKind = "head" // The earliest version of the config for the given stage ConfigReferenceKindStageRoot ConfigReferenceKind = "stage_root" ConfigReferenceKindTaggedStage ConfigReferenceKind = "tagged_stage" ConfigReferenceKindTag ConfigReferenceKind = "tag" )
type ConfigReferenceORM ¶
type ConfigReferenceORM struct { Scope util.ScopeKind `json:"scope" gorm:"uniqueIndex:ref_unique;not null"` AccountId util.AccountId `json:"account_id" gorm:"uniqueIndex:ref_unique;not null"` UserId *util.UserId `json:"user_id" gorm:"uniqueIndex:ref_unique"` ConfigReferenceKind ConfigReferenceKind `json:"reference_kind" gorm:"uniqueIndex:ref_unique;not null"` VersionRef *ConfigVersionRef `json:"version_ref" gorm:"type:jsonb;not null"` }
func (*ConfigReferenceORM) AddConstraints ¶
func (*ConfigReferenceORM) AddIndexes ¶
func (*ConfigReferenceORM) RemoveConstraints ¶
func (*ConfigReferenceORM) RemoveIndexes ¶
func (*ConfigReferenceORM) TableName ¶
func (c *ConfigReferenceORM) TableName() string
type ConfigReferenceResult ¶
type ConfigReferenceResult struct { CurrentRef *ConfigVersionRef `json:"current_ref"` ParentRef *ConfigVersionRef `json:"parent_ref"` }
type ConfigReferenceService ¶
type ConfigReferenceService struct {
// contains filtered or unexported fields
}
func NewConfigReferenceService ¶
func NewConfigReferenceService(db *gorm.DB, rdb *redis.Client, cacheService *util.CacheService) *ConfigReferenceService
func (*ConfigReferenceService) GetConfigReference ¶
func (*ConfigReferenceService) GetRecord ¶
func (s *ConfigReferenceService) GetRecord(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, accountId util.AccountId, userId util.UserId, kind ConfigReferenceKind) (*ConfigReferenceResult, error)
func (*ConfigReferenceService) SetConfigReference ¶
func (s *ConfigReferenceService) SetConfigReference(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, accountId util.AccountId, userId util.UserId, kind ConfigReferenceKind, ref *ConfigVersionRef) error
type ConfigResourceData ¶
type ConfigResourceData map[string]interface{}
type ConfigSchemaAssociationRecord ¶
type ConfigSchemaAssociationRecord struct { SchemaHash *util.ConfigSchemaHash `json:"schema_hash" gorm:"column:schema_hash;type:varchar(64);not null"` SchemaIdValue *util.ConfigSchemaIdValue `json:"schema_id_value" gorm:"column:schema_id_value;type:varchar(64);not null"` SchemaRef *ConfigVersionRef `json:"schema_ref" gorm:"column:schema_ref;type:jsonb;not null"` }
type ConfigSchemaMigrations ¶
type ConfigSchemaMigrations struct {
// contains filtered or unexported fields
}
func NewConfigSchemaMigrations ¶
func NewConfigSchemaMigrations(db *gorm.DB) *ConfigSchemaMigrations
func (*ConfigSchemaMigrations) AddSchema ¶
func (m *ConfigSchemaMigrations) AddSchema(ctx context.Context, params *cmdAddConfigSchemaParams) error
func (*ConfigSchemaMigrations) AddSchemas ¶
func (m *ConfigSchemaMigrations) AddSchemas(ctx context.Context, params *cmdAddConfigSchemaParams) error
type ConfigSchemaObject ¶
type ConfigSchemaObject struct { SchemaName *util.ConfigSchemaName `json:"schema_name"` SchemaIdValue *util.ConfigSchemaIdValue `json:"schema_id_value"` SchemaContents *util.ConfigSchemaContents `json:"schema_contents"` }
type ConfigSchemaRecord ¶
type ConfigSchemaRecord struct { SchemaHash *util.ConfigVersionHash `json:"schema_hash" gorm:"column:schema_hash;type:varchar(64);not null"` SchemaName *util.ConfigSchemaName `json:"schema_name" gorm:"column:schema_name;type:varchar(64);not null"` SchemaIdValue *util.ConfigSchemaIdValue `json:"schema_id_value" gorm:"column:schema_id_value;type:varchar(64);not null"` SchemaContents util.ConfigSchemaContents `json:"schema_contents" gorm:"column:schema_contents;type:jsonb"` }
type ConfigSchemaService ¶
type ConfigSchemaService struct {
// contains filtered or unexported fields
}
func NewConfigSchemaService ¶
func NewConfigSchemaService(db *gorm.DB, rdb *redis.Client, configService *ConfigService) *ConfigSchemaService
func (*ConfigSchemaService) GetConfigSchemaVersions ¶
func (s *ConfigSchemaService) GetConfigSchemaVersions(ctx context.Context, tx *gorm.DB, schemaQuery *ConfigRecordQuery) (*ConfigSchemaVersions, error)
func (*ConfigSchemaService) GetLatestSchemaVersion ¶
func (s *ConfigSchemaService) GetLatestSchemaVersion(ctx context.Context, tx *gorm.DB, schemaQuery *ConfigRecordQuery) (*ConfigSchemaRecord, error)
func (*ConfigSchemaService) GetSchema ¶
func (s *ConfigSchemaService) GetSchema(ctx context.Context, tx *gorm.DB, schemaQuery *ConfigRecordQuery) (*ConfigSchemaRecord, error)
type ConfigSchemaVersions ¶
type ConfigSchemaVersions struct { Versions []*ConfigSchemaRecord `json:"versions"` ListHash string `json:"list_hash"` }
type ConfigService ¶
type ConfigService struct {
// contains filtered or unexported fields
}
func NewConfigService ¶
func NewConfigService(db *gorm.DB, rdb *redis.Client, cacheService *util.CacheService) *ConfigService
func (*ConfigService) CommitNode ¶
func (*ConfigService) CreateNode ¶
func (s *ConfigService) CreateNode(scope util.ScopeKind, accountId util.AccountId, userId util.UserId, nodeKind ConfigNodeKind, data *util.Data, prevNode *ConfigNode) (*ConfigNode, error)
func (*ConfigService) GetConfigContextService ¶
func (s *ConfigService) GetConfigContextService() *ConfigContextService
func (*ConfigService) GetConfigDagService ¶
func (s *ConfigService) GetConfigDagService() *ConfigDagService
func (*ConfigService) GetConfigDiffService ¶
func (s *ConfigService) GetConfigDiffService() *ConfigDiffService
func (*ConfigService) GetConfigSchemaService ¶
func (s *ConfigService) GetConfigSchemaService() *ConfigSchemaService
func (*ConfigService) GetLatestRecord ¶
func (s *ConfigService) GetLatestRecord(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, accountId util.AccountId, userId util.UserId, fromVersion *ConfigVersionRef, toVersion *ConfigVersionRef, recordQuery *ConfigRecordQuery) (*ConfigDiffVersion, error)
func (*ConfigService) InsertRecord ¶
func (s *ConfigService) InsertRecord(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, accountId util.AccountId, userId util.UserId, recordMetadata *ConfigRecordMetadata, recordObject interface{}) (*ConfigNodeMetadata, error)
func (*ConfigService) ListConfigs ¶
func (s *ConfigService) ListConfigs(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, accountId util.AccountId, userId util.UserId, recordQuery *ConfigRecordQuery) ([]*ConfigListEntry, error)
func (*ConfigService) SetRecordValues ¶
func (s *ConfigService) SetRecordValues(ctx context.Context, tx *gorm.DB, scope util.ScopeKind, accountId util.AccountId, userId util.UserId, kind ConfigRecordKind, recordMetadata *ConfigRecordMetadata, mode ValueSettingMode, values *util.Data) (*ConfigNodeMetadata, error)
type ConfigStageAudienceKind ¶
type ConfigStageAudienceKind string
const ( ConfigStageAudienceKindClient ConfigStageAudienceKind = "client" ConfigStageAudienceKindMarketing ConfigStageAudienceKind = "marketing" ConfigStageAudienceKindInternal ConfigStageAudienceKind = "internal" ConfigStageAudienceKindPartner ConfigStageAudienceKind = "partner" ConfigStageAudienceKindTest ConfigStageAudienceKind = "test" ConfigStageAudienceKindDev ConfigStageAudienceKind = "dev" ConfigStageAudienceKindOther ConfigStageAudienceKind = "other" )
type ConfigStageKind ¶
type ConfigStageKind string
const ( ConfigStageKindProd ConfigStageKind = "prod" ConfigStageKindBeta ConfigStageKind = "beta" ConfigStageKindClientValidation ConfigStageKind = "client_validation" ConfigStageKindTest ConfigStageKind = "test" ConfigStageKindDev ConfigStageKind = "dev" )
type ConfigTagORM ¶
type ConfigTagORM struct {
ConfigTagObject `json:",inline" gorm:"embedded"`
}
func (*ConfigTagORM) TableName ¶
func (c *ConfigTagORM) TableName() string
type ConfigTagObject ¶
type ConfigTagObject struct { AccountId util.AccountId `json:"account_id" gorm:"uniqueIndex:config_tag_object_tag;not null"` UserId *util.UserId `json:"user_id" gorm:"uniqueIndex:config_tag_object_tag;null"` Tag string `json:"tag" gorm:"uniqueIndex:config_tag_object_tag;not null"` VersionRef *ConfigVersionRef `json:"version_ref"` ConfigReferenceKind *ConfigReferenceKind `json:"config_reference_kind" gorm:"index"` ConfigStageAudienceKind *ConfigStageAudienceKind `json:"config_stage_audience_kind" gorm:"index"` ConfigStageKind *ConfigStageKind `json:"config_stage_kind" gorm:"index"` }
type ConfigVersionORM ¶
type ConfigVersionORM struct { Id util.ConfigVersionId `json:"id"` ConfigDagNodeEmbed `json:",inline" gorm:"embedded"` }
func (*ConfigVersionORM) TableName ¶
func (c *ConfigVersionORM) TableName() string
type ConfigVersionRef ¶
type ConfigVersionRef struct { Scope util.ScopeKind `json:"scope" gorm:"index;not null"` AccountId util.AccountId `json:"account_id" gorm:"index;not null"` UserId *util.UserId `json:"user_id" gorm:"index;null"` ConfigVersionId util.ConfigVersionId `json:"config_version_id" gorm:"index;not null"` ConfigVersionHash util.ConfigVersionHash `json:"config_version_hash" gorm:"index;not null"` CreatedAt time.Time `json:"created_at"` CreatedBy util.UserId `json:"created_by" gorm:"index;null"` CommittedAt *time.Time `json:"committed_at"` CommittedBy *util.UserId `json:"committed_by" gorm:"index;null"` Note *string `json:"note"` }
func (*ConfigVersionRef) Scan ¶
func (v *ConfigVersionRef) Scan(src interface{}) error
func (ConfigVersionRef) String ¶
func (v ConfigVersionRef) String() string
type ConfigVersions ¶
type ConfigVersions struct { Versions []*ConfigRecordObject `json:"versions"` ListHash string `json:"list_hash"` }
type ConfigWhereQuery ¶
type ConfigWhereQuery struct {
// contains filtered or unexported fields
}
func (*ConfigWhereQuery) Sql ¶
func (q *ConfigWhereQuery) Sql() string
func (*ConfigWhereQuery) SqlAlias ¶
func (q *ConfigWhereQuery) SqlAlias(alias string) string
func (*ConfigWhereQuery) Where ¶
func (q *ConfigWhereQuery) Where(cond interface{}, params ...interface{}) ConfigQuerier
type DiffVersionChainEntry ¶
type DiffVersionChainEntry struct { CurrentHash *util.ConfigVersionHash `json:"cur_hash"` ParentHash *util.ConfigVersionHash `json:"parent_hash"` NodeKind *ConfigNodeKind `json:"node_kind"` NodeMetadata *ConfigNodeMetadata `json:"node_metadata"` NodeContents *util.Data `json:"node_contents"` RecordMetadata *ConfigRecordMetadata `json:"record_metadata"` RecordContents *util.Data `json:"record_contents"` RecordHistory []*ConfigDiffVersionHistoryEntry `json:"record_history"` RecordMatch bool `json:"record_match"` }
func (*DiffVersionChainEntry) Scan ¶
func (e *DiffVersionChainEntry) Scan(value interface{}) error
type ErrConfigDataObjectEncodingFailed ¶
type ErrConfigDataObjectEncodingFailed struct {
Err error `json:"error"`
}
func NewConfigObjectEncodingFailed ¶
func NewConfigObjectEncodingFailed(err error) *ErrConfigDataObjectEncodingFailed
func (*ErrConfigDataObjectEncodingFailed) Error ¶
func (e *ErrConfigDataObjectEncodingFailed) Error() string
func (*ErrConfigDataObjectEncodingFailed) Unwrap ¶
func (e *ErrConfigDataObjectEncodingFailed) Unwrap() error
type ErrConfigObjectSettingConflict ¶
type ErrConfigObjectSettingConflict struct {
Err error `json:"error"`
}
ErrConfigObjectSettingConflict is returned when a conflict is detected
func NewConfigObjectSettingConflict ¶
func NewConfigObjectSettingConflict(err error) *ErrConfigObjectSettingConflict
NewConfigObjectSettingConflict returns a new and error indicating a conflict
func (*ErrConfigObjectSettingConflict) Error ¶
func (e *ErrConfigObjectSettingConflict) Error() string
func (*ErrConfigObjectSettingConflict) Unwrap ¶
func (e *ErrConfigObjectSettingConflict) Unwrap() error
type ErrConfigSettingError ¶
type ErrConfigSettingError struct {
Err error `json:"error"`
}
ErrConfigSettingError is returned when an error occurs while setting a config object or value
func NewConfigSettingError ¶
func NewConfigSettingError(err error) *ErrConfigSettingError
func (*ErrConfigSettingError) Error ¶
func (e *ErrConfigSettingError) Error() string
func (*ErrConfigSettingError) Unwrap ¶
func (e *ErrConfigSettingError) Unwrap() error
type ErrConfigSettingHandleConsumed ¶
type ErrConfigSettingHandleConsumed struct{}
func NewConfigSettingHandleConsumed ¶
func NewConfigSettingHandleConsumed() *ErrConfigSettingHandleConsumed
func (ErrConfigSettingHandleConsumed) Error ¶
func (e ErrConfigSettingHandleConsumed) Error() string
type ErrInvalidConfigDataObjectHandle ¶
type ErrInvalidConfigDataObjectHandle struct {
Err error `json:"error"`
}
func NewInvalidConfigDataObjectHandle ¶
func NewInvalidConfigDataObjectHandle(err error) *ErrInvalidConfigDataObjectHandle
func (ErrInvalidConfigDataObjectHandle) Error ¶
func (e ErrInvalidConfigDataObjectHandle) Error() string
type ErrInvalidConfigDiffParams ¶
type ErrInvalidConfigDiffParams struct {
Err error `json:"error"`
}
ErrInvalidConfigDiffParams is returned when invalid parameters are passed to the diff function
func NewInvalidConfigDiffParams ¶
func NewInvalidConfigDiffParams(err error) *ErrInvalidConfigDiffParams
func (*ErrInvalidConfigDiffParams) Error ¶
func (e *ErrInvalidConfigDiffParams) Error() string
func (*ErrInvalidConfigDiffParams) Unwrap ¶
func (e *ErrInvalidConfigDiffParams) Unwrap() error
type ErrInvalidConfigRecordType ¶
type ErrInvalidConfigRecordType struct {
Err error `json:"error"`
}
func NewInvalidConfigRecordType ¶
func NewInvalidConfigRecordType(err error) *ErrInvalidConfigRecordType
func (ErrInvalidConfigRecordType) Error ¶
func (e ErrInvalidConfigRecordType) Error() string
func (ErrInvalidConfigRecordType) Unwrap ¶
func (e ErrInvalidConfigRecordType) Unwrap() error
type ErrInvalidConfigSettingHandle ¶
type ErrInvalidConfigSettingHandle struct {
Err error `json:"error"`
}
func NewInvalidConfigSettingHandle ¶
func NewInvalidConfigSettingHandle(err error) *ErrInvalidConfigSettingHandle
func (ErrInvalidConfigSettingHandle) Error ¶
func (e ErrInvalidConfigSettingHandle) Error() string
type ErrMissingRequiredParameter ¶
type ErrMissingRequiredParameter struct {
ParamName string `json:"param_name"`
}
func NewMissingRequiredParameter ¶
func NewMissingRequiredParameter(name string) *ErrMissingRequiredParameter
func (*ErrMissingRequiredParameter) Error ¶
func (e *ErrMissingRequiredParameter) Error() string
type ErrReferenceNotFound ¶
type ErrReferenceNotFound struct { Scope util.ScopeKind `json:"scope"` AccountId util.AccountId `json:"account_id"` UserId *util.UserId `json:"user_id"` ReferenceKind ConfigReferenceKind `json:"reference_kind"` }
func NewReferenceNotFound ¶
func NewReferenceNotFound(scope util.ScopeKind, accountId util.AccountId, userId *util.UserId, kind ConfigReferenceKind) *ErrReferenceNotFound
func (*ErrReferenceNotFound) Error ¶
func (e *ErrReferenceNotFound) Error() string
type RecordMatchFilter ¶
type RecordMatchFilter struct { Scope *util.ScopeKind `json:"scope"` AccountId *util.AccountId `json:"account_id"` UserId *util.UserId `json:"user_id"` RecordKind *ConfigRecordKind `json:"record_kind"` RecordId *util.ConfigRecordId `json:"record_id"` RecordCollectionKey *util.ConfigCollectionKey `json:"record_collection_key"` RecordItemKey *util.ConfigItemKey `json:"record_item_key"` OnlyMatching bool `json:"only_matching"` }
type RefMap ¶
type RefMap map[ConfigReferenceKind]ConfigReferenceORM
type SetRecordValuesResult ¶
type SetRecordValuesResult struct { NodeMetadata ConfigNodeMetadata `json:"node_metadata"` NodeContents *util.Data `json:"node_contents"` }
type ValueSettingMode ¶
type ValueSettingMode string
const ( ValueSettingModeReplace ValueSettingMode = "replace_all" ValueSettingModeDeepMerge ValueSettingMode = "deep_merge" )
Source Files
¶
- cmd.go
- commit.go
- configContext.go
- container.go
- contents.go
- dag.go
- diffService.go
- document.go
- errors.go
- history.go
- immutable.go
- internals.go
- keyed.go
- models.go
- node.go
- nodeTypes.go
- object.go
- objectEmbed.go
- query.go
- record.go
- recordTypes.go
- refService.go
- schema.go
- schemaService.go
- service.go
- version.go
Click to show internal directories.
Click to hide internal directories.