xmlrpc

package
v0.0.0-...-63b66d1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CharsetReader is a function to generate reader which converts a non UTF-8
	// charset into UTF-8.
	CharsetReader func(string, io.Reader) (io.Reader, error)
)

Functions

func EncodeMethodCall

func EncodeMethodCall(method string, args ...interface{}) ([]byte, error)

func HandleMethodCall

func HandleMethodCall(data []byte, mcp MethodCallParser) (response []byte, err error)

func NewRequest

func NewRequest(url string, method string, args interface{}) (*http.Request, error)

Types

type Base64

type Base64 string

Base64 represents value in base64 encoding

type Client

type Client struct {
	*rpc.Client
}

func NewClient

func NewClient(requrl string, transport http.RoundTripper) (*Client, error)

NewClient returns instance of rpc.Client object, that is used to send request to xmlrpc service.

type FaultError

type FaultError struct {
	Code   int    `xmlrpc:"faultCode"`
	String string `xmlrpc:"faultString"`
}

FaultError is returned from the server when an invalid call is made

func (FaultError) Error

func (e FaultError) Error() string

Error implements the error interface

type MethodCallParser

type MethodCallParser interface {
	ParseMethodCall(methodName string, cb MethodCallParserCB) (err error)
}

type MethodCallParserCB

type MethodCallParserCB interface {
	GetCallParam(val interface{}) (err error)
	IgnoreParams() (err error)
	PutResult(val interface{}) (err error)
}

type Response

type Response []byte

func (Response) Err

func (r Response) Err() error

func (Response) Unmarshal

func (r Response) Unmarshal(v interface{}) error

type TypeMismatchError

type TypeMismatchError string

func (TypeMismatchError) Error

func (e TypeMismatchError) Error() string

Jump to

Keyboard shortcuts

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