Versions in this module Expand all Collapse all v2 v2.0.0 Mar 1, 2021 Changes in this version + const TypeArguments + const TypeBreak + const TypeElse + const TypeEnd + const TypeExpression + const TypeFor + const TypeGroup + const TypeIf + const TypeIndex + const TypePath + const TypeSelector + const TypeString + const TypeTemplate + const TypeVariable + var ErrEOS = errors.New("EOS") + var ErrFunctionNoGraph = errors.New("functions doesn't return *Graph") + var ErrIncompatibleType = errors.New("incompatible type") + var ErrInvalidArgs = errors.New("invalid arguments or nil receiver") + var ErrInvalidIndex = errors.New("invalid index") + var ErrInvalidUnread = errors.New("invalid use of UnreadByte or UnreadRune") + var ErrNilReceiver = errors.New("nil function receiver") + var ErrNotANumber = errors.New("not a number") + var ErrNotFound = errors.New("not found") + var ErrSpaceNotUniform = errors.New("space has both tabs and spaces") + var ErrUnterminatedQuotedString = errors.New("quoted string not terminated") + func IsBreakChar(c byte) bool + func IsDigit(c rune) bool + func IsEndChar(c byte) bool + func IsEndRune(c rune) bool + func IsLetter(c rune) bool + func IsSpaceChar(c byte) bool + func IsTextChar(c byte) bool + type Graph struct + Out []*Graph + This interface{} + func FromBinary(b []byte) *Graph + func FromBinaryFile(file string) *Graph + func FromBinaryReader(r io.Reader) *Graph + func FromBytes(b []byte) *Graph + func FromFile(s string) *Graph + func FromJSON(buf []byte) (*Graph, error) + func FromReader(r io.Reader) *Graph + func FromString(s string) *Graph + func FromStringTypes(s string) *Graph + func New(n interface{}) *Graph + func NewExpression(s string) *Graph + func NewPath(s string) *Graph + func NewTemplate(s string) *Graph + func NewTemplateFromBytes(b []byte) *Graph + func (g *Graph) Add(n interface{}) *Graph + func (g *Graph) AddNodes(g2 *Graph) *Graph + func (g *Graph) Binary() []byte + func (g *Graph) Bool(def ...bool) bool + func (g *Graph) Bytes() []byte + func (g *Graph) Check(x *Graph) (bool, string) + func (g *Graph) Clear() + func (g *Graph) Clone() *Graph + func (g *Graph) Copy(c *Graph) + func (g *Graph) Create(s string) *Graph + func (g *Graph) Delete(n interface{}) + func (g *Graph) DeleteAt(i int) + func (g *Graph) Equals(c *Graph) bool + func (g *Graph) Eval(e *Graph) (interface{}, error) + func (g *Graph) Find(re string) (*Graph, error) + func (g *Graph) Float64(def ...float64) float64 + func (g *Graph) Get(s string) *Graph + func (g *Graph) GetAt(i int) *Graph + func (g *Graph) GetBool(path string) (bool, error) + func (g *Graph) GetBytes(path string) ([]byte, error) + func (g *Graph) GetFloat64(path string) (float64, error) + func (g *Graph) GetInt64(path string) (int64, error) + func (g *Graph) GetString(path string) (string, error) + func (g *Graph) Int64(def ...int64) int64 + func (g *Graph) Interface() interface{} + func (g *Graph) JSON() []byte + func (g *Graph) Len() int + func (g *Graph) Node(s string) *Graph + func (g *Graph) Number() interface{} + func (g *Graph) Process(ctx *Graph) []byte + func (g *Graph) Scalar() interface{} + func (g *Graph) Set(s string, val interface{}) *Graph + func (g *Graph) Show() string + func (g *Graph) String(def ...string) string + func (g *Graph) StringCSV(def ...string) string + func (g *Graph) Substitute(s string, v interface{}) + func (g *Graph) Text() string + func (g *Graph) ThisBytes() []byte + func (g *Graph) ThisFloat64() (float64, bool) + func (g *Graph) ThisInt64() (int64, bool) + func (g *Graph) ThisNumber() interface{} + func (g *Graph) ThisScalar() interface{} + func (g *Graph) ThisString(def ...string) string + func (g *Graph) ThisType() string + func (g *Graph) ThisValue() reflect.Value + func (g *Graph) Value() reflect.Value + type Lexer struct + func NewLexer(rd io.Reader) *Lexer + func (p *Lexer) Block(nsp int) (string, bool) + func (p *Lexer) Break() bool + func (p *Lexer) Byte() (byte, error) + func (p *Lexer) Comment() bool + func (p *Lexer) End() bool + func (p *Lexer) Error() error + func (p *Lexer) Integer() (string, bool) + func (p *Lexer) Number() (string, bool) + func (p *Lexer) Operator() (string, bool) + func (p *Lexer) PeekByte() byte + func (p *Lexer) PeekRune() (rune, error) + func (p *Lexer) Quoted(ind int) (string, bool, error) + func (p *Lexer) Rune() (rune, error) + func (p *Lexer) Scalar(n int) (string, bool) + func (p *Lexer) ScalarType(n int) (interface{}, bool) + func (p *Lexer) Space() (int, byte) + func (p *Lexer) String() (string, bool) + func (p *Lexer) StringStop(stopBytes []byte) (string, bool) + func (p *Lexer) TemplateText() (string, bool) + func (p *Lexer) Token8() (string, bool) + func (p *Lexer) UnreadByte() + func (p *Lexer) UnreadRune() error + func (p *Lexer) WhiteSpace() bool + type Log struct + func OpenLog(file string) (*Log, error) + func (log *Log) Add(g *Graph) int64 + func (log *Log) AddBinary(b []byte) int64 + func (log *Log) Close() + func (log *Log) Get(i int64) (*Graph, int64, error) + func (log *Log) GetBinary(i int64) ([]byte, int64, error) + func (log *Log) Sync() + type Parser struct + func NewBytesParser(buf []byte) *Parser + func NewParser(rd io.Reader) *Parser + func NewStringParser(s string) *Parser + func (p *Parser) ArgList() bool + func (p *Parser) Args(dot bool) (bool, error) + func (p *Parser) Dec() + func (p *Parser) Emit(s string) + func (p *Parser) Expression() bool + func (p *Parser) Graph() *Graph + func (p *Parser) Handler() *SimpleEventHandler + func (p *Parser) Inc() + func (p *Parser) Index() bool + func (p *Parser) Ogdl() + func (p *Parser) OgdlTypes() + func (p *Parser) Path() bool + func (p *Parser) Selector() bool + func (p *Parser) Template() + func (p *Parser) Text() bool + func (p *Parser) UnaryExpression() bool + func (p *Parser) Variable() bool + type SimpleEventHandler struct + func (e *SimpleEventHandler) Add(s string) + func (e *SimpleEventHandler) AddAt(s string, lv int) + func (e *SimpleEventHandler) AddBytes(b []byte) + func (e *SimpleEventHandler) AddBytesAt(b []byte, lv int) + func (e *SimpleEventHandler) AddItf(i interface{}) + func (e *SimpleEventHandler) Dec() + func (e *SimpleEventHandler) Delete() + func (e *SimpleEventHandler) Inc() + func (e *SimpleEventHandler) Level() int + func (e *SimpleEventHandler) SetLevel(l int) + func (e *SimpleEventHandler) Tree() *Graph Other modules containing this package github.com/rveen/ogdl