bigstruct

package module
v0.0.0-...-a09fd22 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

README

bigstruct

bigstruct stores all your structured data in a format agnostic way. It provides out-of-the-box support for the following file formats:

  • ini/toml configuration files
  • yaml/json documents
  • hcl/hcl+json templates

Every file is transformed into Intermediate Struct Representation (the bigstruct/isr package) and persisted as a list of key-value pairs in a database of your choice, either SQL or NoSQL.

The following backends are supported:

  • ScyllaDB
  • MySQL, sqlite, PostgreSQL (everything that GORM supports)
  • etcd

Features

Overlays and overrides (Log-structured Merge-Tree)
Templating
Validation
JSON Schema

The isr format

Codecs
Schema

Concepts

Namespaces
Indexes

Getting started

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Transport
}

func (*Client) Debug

func (c *Client) Debug(ctx context.Context, index, overlay Ref, key string) (*model.Index, model.Schemas, model.Values, error)

func (*Client) Diff

func (c *Client) Diff(ctx context.Context, index Ref, ovStart, ovEnd Ref, key string) (big.Struct, error)

func (*Client) Get

func (c *Client) Get(ctx context.Context, index Ref, key string) (big.Struct, error)

func (*Client) List

func (c *Client) List(ctx context.Context, index Ref) (big.Struct, error)

func (*Client) Set

func (c *Client) Set(ctx context.Context, index, overlay Ref, s big.Struct) error

func (*Client) Struct

func (c *Client) Struct(ctx context.Context, index Ref, key string, v interface{}) error

type Func

type Func func(context.Context, ...*Op) error

func (Func) Do

func (fn Func) Do(ctx context.Context, ops ...*Op) error

type Op

type Op struct {
	Type     string // LIST, GET, SET, DEBUG
	Encode   bool
	Encoding string
	Index    *model.Index
	Overlay  *model.Overlay
	Struct   big.Struct

	Debug struct {
		Values  model.Values
		Schemas model.Schemas
	}
}

type Ref

type Ref struct {
	Name string
	Prop string
}

func (Ref) IsZero

func (r Ref) IsZero() bool

func (Ref) String

func (r Ref) String() string

type Server

type Server struct {
	Storage *storage.Gorm
	Codec   big.Codec
}

func (*Server) Do

func (s *Server) Do(ctx context.Context, ops ...*Op) error

type Transport

type Transport interface {
	Do(context.Context, ...*Op) error
}

Jump to

Keyboard shortcuts

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