toml

package
v0.0.0-...-c5dc566 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package toml implements a key/value store using TOML for Cogs to query.

Index

Constants

View Source
const (
	// Unknown indicates the Value Type is not known.
	Unknown = ""
	// String indicates the Value Type is a string.
	String = "string"
	// Int indicates the Value Type is an int.
	Int = "int"
	// Uint indicates the Value Type is an uint.
	Uint = "uint"
	// Float64 indicates the Value Type is a float64.
	Float64 = "float64"
	// Bytes indictes the Value Type is a []byte.
	Bytes = "bytes"
)

Variables

This section is empty.

Functions

func New

func New(p string) (storage.Reader, error)

New returns a new KeyValue using TOML as storage.

Types

type Cog

type Cog map[string]Value

Cog represents Key/Values for Cogs.

type KeyValue

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

KeyValue implements a storage.Reader.

func (*KeyValue) Read

func (kv *KeyValue) Read(cog, k string, v interface{}) error

Read implements storage.Reader.Read().

type Store

type Store map[string]Cog

Store represents the TOML storage.

type Value

type Value struct {
	// Type is the type stored.
	Type string
	// Int stores an int.
	Int int
	// Uint stores an uint.
	Uint uint
	// Float64 stores a float64.
	Float64 float64
	// String stores a string.
	String string
	// Bytes stores a []byte.
	Bytes []byte
}

Value represents a Value in a Cog map.

Jump to

Keyboard shortcuts

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