cuedb

package
v0.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DataSetMetadataCue = `{
	_dataset: {
		plural: string
		supportedExtensions: [...string]
	}
}`

Can't use dataSetField, yet.

View Source
const RecordBaseCue = `{
	id: string
}`

RecordBaseCue is the "Base" configuration that blox expects to exist, but doesn't enforce in user-land. We'll inject this Cue into each DataSet definition.

View Source
const SchemaMetadataCue = `{
	_schema: {
		namespace: string
		name: string
	}
}`

Can't use schemaField, yet.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataSet added in v0.2.7

type DataSet struct {
	// contains filtered or unexported fields
}

func (*DataSet) CueDataPath added in v0.2.7

func (d *DataSet) CueDataPath() cue.Path

func (*DataSet) GetDataDirectory added in v0.2.7

func (d *DataSet) GetDataDirectory() string

func (*DataSet) GetDataMapCue added in v0.2.7

func (d *DataSet) GetDataMapCue() string

AddDataMap

func (*DataSet) GetDefinitionPath added in v0.2.7

func (d *DataSet) GetDefinitionPath() cue.Path

func (*DataSet) GetInlinePath added in v0.2.7

func (d *DataSet) GetInlinePath() string

GetInlinePath returns an inline cue.Path that can be used within a Cue document like "some: key: #Here"

func (*DataSet) GetSupportedExtensions added in v0.2.7

func (d *DataSet) GetSupportedExtensions() []string

func (*DataSet) ID added in v0.2.7

func (d *DataSet) ID() string

func (*DataSet) IsSupportedExtension added in v0.2.7

func (d *DataSet) IsSupportedExtension(ext string) bool

type DataSetMetadata added in v0.2.7

type DataSetMetadata struct {
	Plural              string
	SupportedExtensions []string
}

type Runtime added in v0.2.7

type Runtime struct {
	// contains filtered or unexported fields
}

func NewRuntime added in v0.2.7

func NewRuntime() (Runtime, error)

NewRuntime setups a new database for DataSets to be registered, and data inserted.

func (*Runtime) CountDataSets added in v0.2.7

func (r *Runtime) CountDataSets() int

func (*Runtime) GetDataSet added in v0.2.7

func (r *Runtime) GetDataSet(name string) (DataSet, error)

func (*Runtime) GetDataSets added in v0.2.7

func (r *Runtime) GetDataSets() map[string]DataSet

func (*Runtime) GetOutput added in v0.2.7

func (r *Runtime) GetOutput() (cue.Value, error)

func (*Runtime) GetString added in v0.2.7

func (r *Runtime) GetString(key string) (string, error)

func (*Runtime) GetStringOr added in v0.2.7

func (r *Runtime) GetStringOr(key string, def string) string

func (*Runtime) Insert added in v0.2.7

func (r *Runtime) Insert(dataSet DataSet, record map[string]interface{}) error

func (*Runtime) LoadConfig added in v0.2.7

func (r *Runtime) LoadConfig() error

func (*Runtime) MarshalJSON added in v0.2.7

func (r *Runtime) MarshalJSON() ([]byte, error)

MarshalJSON returns the database encoded in JSON format

func (*Runtime) ReferentialIntegrity added in v0.2.7

func (r *Runtime) ReferentialIntegrity() error

ReferentialIntegrity checks the relationships between the records in the content database

func (*Runtime) RegisterSchema added in v0.2.7

func (r *Runtime) RegisterSchema(cueString string) error

type SchemaMetadata added in v0.2.7

type SchemaMetadata struct {
	Namespace string
	Name      string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL