Documentation ¶
Index ¶
- func RegisterFormat(name string, format Format)
- func Serve(path, listen string) error
- type ArrayNode
- func (this *ArrayNode) Append(data interface{}) error
- func (this *ArrayNode) Delete(key int)
- func (this *ArrayNode) Get(i int) (*Node, error)
- func (this *ArrayNode) GetRaw() interface{}
- func (this *ArrayNode) Length() int
- func (this *ArrayNode) Set(i int, data interface{}) error
- func (this *ArrayNode) SetRaw(raw interface{}) error
- type Config
- type Database
- type Format
- type JsonFormat
- type MapNode
- type Node
- func (this *Node) Array() (*ArrayNode, error)
- func (this *Node) Delete(path interface{}) error
- func (this *Node) Get(path interface{}) (*Node, error)
- func (this *Node) GetRaw() interface{}
- func (this *Node) Has(path interface{}) bool
- func (this *Node) IsArray() bool
- func (this *Node) IsMap() bool
- func (this *Node) IsValue() bool
- func (this *Node) Map() (*MapNode, error)
- func (this *Node) MustArray() *ArrayNode
- func (this *Node) MustGet(path interface{}) *Node
- func (this *Node) MustMap() *MapNode
- func (this *Node) MustValue() *ValueNode
- func (this *Node) Set(path interface{}, v interface{}) error
- func (this *Node) Value() (*ValueNode, error)
- type Server
- func (this *Server) DoDelete(w http.ResponseWriter, r *http.Request)
- func (this *Server) DoGet(w http.ResponseWriter, r *http.Request)
- func (this *Server) DoSet(w http.ResponseWriter, r *http.Request)
- func (this *Server) Error(w http.ResponseWriter, err error)
- func (this *Server) GetRequestPath(r *http.Request) string
- func (this *Server) Serve(listen string) error
- type ValueNode
- func (this *ValueNode) Bool() (bool, error)
- func (this *ValueNode) Float32() (float32, error)
- func (this *ValueNode) Float64() (float64, error)
- func (this *ValueNode) GetRaw() interface{}
- func (this *ValueNode) Int() (int, error)
- func (this *ValueNode) Int32() (int32, error)
- func (this *ValueNode) Int64() (int64, error)
- func (this *ValueNode) IsNull() bool
- func (this *ValueNode) MustBool() bool
- func (this *ValueNode) MustFloat32() float32
- func (this *ValueNode) MustFloat64() float64
- func (this *ValueNode) MustInt() int
- func (this *ValueNode) MustInt32() int32
- func (this *ValueNode) MustInt64() int64
- func (this *ValueNode) MustString() string
- func (this *ValueNode) SetRaw(v interface{}) error
- func (this *ValueNode) String() (string, error)
- type WrapNode
- type XMLFormat
- type YamlFormat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterFormat ¶
Types ¶
type ArrayNode ¶
type ArrayNode struct {
// contains filtered or unexported fields
}
Array node contains list of nodes
func NewArrayNode ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) SaveAsFormat ¶
type Format ¶
type Format interface { Extensions() []string Marshal(v interface{}) ([]byte, error) Unmarshal(b []byte) (interface{}, error) }
func CheckFormatByExtension ¶
func GuessFormat ¶
func GuessFormat(format interface{}) Format
type JsonFormat ¶
type JsonFormat struct { }
func (*JsonFormat) Extensions ¶
func (this *JsonFormat) Extensions() []string
func (*JsonFormat) Marshal ¶
func (this *JsonFormat) Marshal(v interface{}) ([]byte, error)
func (*JsonFormat) Unmarshal ¶
func (this *JsonFormat) Unmarshal(b []byte) (interface{}, error)
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Wrapper for all types of node
func CreateNode ¶
type ValueNode ¶
type ValueNode struct {
// contains filtered or unexported fields
}
func NewValueNode ¶
func (*ValueNode) MustFloat32 ¶
func (*ValueNode) MustFloat64 ¶
func (*ValueNode) MustString ¶
type WrapNode ¶
type WrapNode interface { SetRaw(interface{}) error GetRaw() interface{} }
func CreateWrapNode ¶
type YamlFormat ¶
type YamlFormat struct { }
func (*YamlFormat) Extensions ¶
func (this *YamlFormat) Extensions() []string
func (*YamlFormat) Marshal ¶
func (this *YamlFormat) Marshal(v interface{}) ([]byte, error)
func (*YamlFormat) Unmarshal ¶
func (this *YamlFormat) Unmarshal(b []byte) (interface{}, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.