blox

package module
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: MIT Imports: 6 Imported by: 2

README

Blox

Blox is the CLI for working with CueBlox.

What is Blox?

See our rapidly-evolving documentation here

Vocabulary

Blox

A Blox is a collection of DataSets, grouped into a Schema, and distributed as a repository.

These Blox can be consumed using the blox CLI to provide data validation and generation for your content repositories, ensuring type safety across your content.

DataSet

A DataSet is a type with a strongly defined schema, using Cue.

See examples

Schema

A Schema is a Cue file definition of one or more DataSets, with some metadata to help connect some dots for the blox CLI.

See examples

Repository

Collection of schemas, distributed via HTTP with a manifest.json. Can be downloaded by the blox CLI.

Documentation

Index

Constants

View Source
const BaseConfig = `` /* 438-byte string literal not displayed */
View Source
const DefaultConfigName = "blox.cue"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func NewConfig

func NewConfig(base string) (*Config, error)

New setup a new config type with base as the defaults

func (*Config) GetBool added in v0.7.1

func (r *Config) GetBool(key string) (bool, error)

func (*Config) GetList added in v0.2.14

func (r *Config) GetList(key string) (cue.Value, error)

func (*Config) GetString

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

func (*Config) GetStringOr

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

func (*Config) LoadConfig

func (r *Config) LoadConfig(path string) error

LoadConfig opens the configuration file specified in `path` and validates it against the configuration provided in when the `Engine` was initialized with `New()`

func (*Config) LoadConfigString

func (r *Config) LoadConfigString(cueConfig string) error

type Runtime

type Runtime struct {
	CueContext *cue.Context
	Database   cue.Value
}

func NewRuntime

func NewRuntime() (*Runtime, error)

NewRuntime creates a new runtime engine

func NewRuntimeWithBase

func NewRuntimeWithBase(base string) (*Runtime, error)

NewRuntimeWithBase creates a new runtime engine with the cue provided in `base` as the initial cue values

Directories

Path Synopsis
cmd
internal
cmd

Jump to

Keyboard shortcuts

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