soap

package
v0.0.0-...-c98f1fc Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2018 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	XMLName xml.Name
	Content []byte `xml:",innerxml"`
	Nodes   []Node `xml:",any"`
}

func Parse

func Parse(content []byte) (*Node, error)

func (*Node) Encode

func (node *Node) Encode() ([]byte, error)

type Spec

type Spec interface {
	Speced
	Encode() *Node
	Decode(*Node)
}

func String

func String(name string, value *string) Spec

func Tag

func Tag(name string, children ...Speced) Spec

func TagList

func TagList(name string, items interface{}) Spec

type Speced

type Speced interface {
	Spec() Spec
}

type StringSpec

type StringSpec struct {
	Name  string
	Value *string
}

func (*StringSpec) Decode

func (spec *StringSpec) Decode(node *Node)

func (*StringSpec) Encode

func (spec *StringSpec) Encode() *Node

func (*StringSpec) Spec

func (spec *StringSpec) Spec() Spec

type TagListSpec

type TagListSpec struct {
	Name  string
	Items reflect.Value
}

func (*TagListSpec) Decode

func (spec *TagListSpec) Decode(node *Node)

func (*TagListSpec) Encode

func (spec *TagListSpec) Encode() *Node

TODO: this can be improved for accepting more different types

func (*TagListSpec) Spec

func (spec *TagListSpec) Spec() Spec

type TagSpec

type TagSpec struct {
	Name     string
	Children []Speced
}

func (*TagSpec) Decode

func (spec *TagSpec) Decode(node *Node)

func (*TagSpec) Encode

func (spec *TagSpec) Encode() *Node

func (*TagSpec) Spec

func (spec *TagSpec) Spec() Spec

Jump to

Keyboard shortcuts

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