datamodel

package
v0.6.3-beta.3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: BSD-3-Clause Imports: 15 Imported by: 1

Documentation

Overview

package datamodel - for modeling and managing that model

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcDatamodelStepwiseDiff added in v0.6.1

func CalcDatamodelStepwiseDiff(dm *Datamodel) error

func FindHistoryBaseDir added in v0.6.1

func FindHistoryBaseDir() (string, error)

func RunCheckpointFromArgs added in v0.5.15

func RunCheckpointFromArgs(args []string, bump string, flgs flags.DatamodelPflagpole) error

func RunDiffFromArgs

func RunDiffFromArgs(args []string, flgs flags.DatamodelPflagpole) error

func RunHistoryFromArgs

func RunHistoryFromArgs(args []string, flgs flags.DatamodelPflagpole) error

func RunInfoFromArgs added in v0.6.1

func RunInfoFromArgs(args []string, flgs flags.DatamodelPflagpole) error

func RunListFromArgs added in v0.6.1

func RunListFromArgs(args []string, flgs flags.DatamodelPflagpole) error

func RunLogFromArgs added in v0.6.1

func RunLogFromArgs(args []string, flgs flags.DatamodelPflagpole) error

Types

type Common added in v0.6.1

type Common struct {
	Status    string // should probably be an const [ok,dirty,no history]
	Label     string // label from CUE
	Timestamp string // timestamp
	Version   string // @dm_ver()

	Value   cue.Value // this objects value
	Other   cue.Value // the other value for diff
	Diff    cue.Value // diff from other (checkpoint)
	Subsume error
}

type Datamodel added in v0.6.1

type Datamodel struct {
	Name    string
	Models  map[string]*Model
	Ordered []*Model
	History *History

	Common
}

func LoadDatamodels added in v0.6.1

func LoadDatamodels(entrypoints []string, flgs flags.DatamodelPflagpole) (dms []*Datamodel, err error)

func PrepDatamodels added in v0.6.1

func PrepDatamodels(entrypoints []string, flgs flags.DatamodelPflagpole) (dms []*Datamodel, err error)

type Field added in v0.6.1

type Field struct {
	Name string
	Type string

	Common
}

type History added in v0.6.1

type History struct {
	Curr *Datamodel   // Top-level Datamodel, there should only be one history
	Prev *Datamodel   // The previous datamodel, when needed for comparison
	Past []*Datamodel // the full history of the datamodel
}

type Model added in v0.6.1

type Model struct {
	Name   string
	Fields map[string]*Field

	Common
}

Jump to

Keyboard shortcuts

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