Help us shape the future of Go! Take the 2026 Go Developer Survey

xmlrpc

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

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

Go to latest
Published: Mar 2, 2018 License: MIT Imports: 5 Imported by: 0

README

go-xmlrpc

Go XML-RPC library

Lisence

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Call(method string, args ...*Value) (*Value, error)
}

Client ...

func NewClient

func NewClient(url string) Client

NewClient ...

type Fault

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

Fault error

func (*Fault) Code

func (f *Fault) Code() int

func (*Fault) Error

func (f *Fault) Error() string

func (*Fault) String

func (f *Fault) String() string

func (*Fault) Value

func (f *Fault) Value() *Value

type Request

type Request interface {
	Method() string
	Params() []*Value
	Param(i int) *Value
	Write(io.Writer) error
}

Request ...

func NewRequest

func NewRequest(method string, args ...*Value) (Request, error)

NewRequest ...

func ParseRequest

func ParseRequest(r io.Reader) (Request, error)

ParseRequest ...

type Response

type Response interface {
	Value() (*Value, error)
	Write(io.Writer) error
}

Response ...

func FaultResponse

func FaultResponse(code int, str string) Response

FaultResponse represents Fault

func NewResponse

func NewResponse(val *Value) Response

NewResponse ...

type StructMember

type StructMember struct {
	Name  string `xml:"name"`
	Value *Value `xml:"value"`
}

StructMember ...

func Member

func Member(name string, v *Value) *StructMember

Member of struct

type Type

type Type int

Type of value

const (
	TypeUnknown Type = iota
	TypeArray
	TypeBool
	TypeInt
	TypeString
	TypeStruct
)

Types

type Value

type Value struct {
	ArrayPtr  *[]*Value  `xml:"array>data>value,omitempty"`
	BoolPtr   *int       `xml:"boolean,omitempty"`
	IntPtr    *int       `xml:"int,omitempty"`
	StringPtr *string    `xml:"string,omitempty"`
	StructPtr *structVal `xml:"struct,omitempty"`
}

Value ...

func Array

func Array(vs ...*Value) *Value

Array value

func Bool

func Bool(b bool) *Value

Bool value

func Call

func Call(url, method string, args ...*Value) (*Value, error)

Call XMLRPC

func Int

func Int(i int) *Value

Int value

func ParseResponse

func ParseResponse(r io.Reader) (*Value, error)

ParseResponse ...

func String

func String(s string) *Value

String value

func Struct

func Struct(members ...*StructMember) *Value

Struct value

func (*Value) Array

func (v *Value) Array() []*Value

Array ...

func (*Value) Bool

func (v *Value) Bool() bool

Bool ...

func (*Value) Field

func (v *Value) Field(i int) *Value

Field ...

func (*Value) FieldByName

func (v *Value) FieldByName(f string) *Value

FieldByName ...

func (*Value) Index

func (v *Value) Index(i int) *Value

Index value of array

func (*Value) Int

func (v *Value) Int() int

Int ...

func (*Value) Interface

func (v *Value) Interface() interface{}

Interface ...

func (*Value) String

func (v *Value) String() string

String ...

func (*Value) Struct

func (v *Value) Struct() []*StructMember

Struct ...

func (*Value) Type

func (v *Value) Type() Type

Type ...

Jump to

Keyboard shortcuts

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