config

package
v0.0.0-...-d4a17b5 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepository

func NewRepository(namespace string) error

Types

type CueBlox

type CueBlox struct {
}

type DisplayVersion

type DisplayVersion struct {
	Name      string    `json:"name"`
	Namespace string    `json:"namespace"`
	Schemas   []*Schema `json:"schemas"`
}

type Manifest

type Manifest struct {
	Namespace string                     `json:"namespace"`
	Versions  []string                   `json:"versions"`
	Schemas   map[string]*DisplayVersion `json:"version_schemas"`
}

type Meta

type Meta struct {
	Name      string
	Namespace string
}

type Repository

type Repository struct {
	Meta

	Versions []*Version
	// contains filtered or unexported fields
}

A repository is a combination of metadata and files in a specific folder structure

func Open

func Open() (*Repository, error)

func (*Repository) Create

func (r *Repository) Create() error

func (*Repository) CreateManifest

func (r *Repository) CreateManifest() error

CreateManifest writes a JSON encoded file with the provided namespace to a repository's root directory

func (*Repository) GetManifest

func (r *Repository) GetManifest() (Manifest, error)

func (*Repository) LoadVersions

func (r *Repository) LoadVersions() error

func (*Repository) NewVersion

func (r *Repository) NewVersion() (string, error)

func (*Repository) SchemaList

func (r *Repository) SchemaList() []string

func (*Repository) SchemaVersions

func (r *Repository) SchemaVersions() []string

type Schema

type Schema struct {
	Namespace string
	Name      string
}

Schema represents metadata about a set of types stored in a repository

type Version

type Version struct {
	RootNamespace string
	Index         int
	Schemas       []*Schema
}

func (Version) Name

func (v Version) Name() string

func (Version) Namespace

func (v Version) Namespace() string

func (Version) Path

func (v Version) Path() string

Jump to

Keyboard shortcuts

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