package
0.0.0-20231122183749-b53fb00bcac2
Repository: https://github.com/stellar/go-xdr.git
Documentation: pkg.go.dev

# Functions

Marshal writes the XDR encoding of v to writer w and returns the number of bytes written.
NewDecoder returns a Decoder that can be used to manually decode XDR data from a provided reader.
NewDecoderWithOptions works like NewDecoder but allows supplying decoding options.
NewEncoder returns an object that can be used to manually choose fields to XDR encode to the passed writer w.
Unmarshal parses XDR-encoded data into the value pointed to by v reading from reader r and returning the total number of bytes read.
UnmarshalWithOptions works like Unmarshal but accepts decoding options.

# Constants

DecodeDefaultMaxDepth is the default maximum decoding depth.
ErrBadArguments indicates arguments passed to the function are not what was expected.
ErrBadEnumValue indicates an enumeration value is not in the list of valid values.
ErrBadUnionSwitch indicates a union's disciminant is invalid.
ErrBadUnionValue indicates a union's value is not populated when it should be.
ErrIO indicates an error was encountered while reading or writing to an io.Reader or io.Writer, respectively.
ErrMaxDecodingDepth indicates that the maximum decoding depth was reached.
ErrNilInterface indicates an interface with no concrete type information was encountered.
ErrNotSettable indicates an interface value cannot be written to.
ErrOverflow indicates that the data in question is too large to fit into the corresponding Go or XDR data type or that allocating it exceeds the maximum allocation size limit.
ErrParseTime indicates an error was encountered while parsing an RFC3339 formatted time value.
ErrUnsupportedType indicates the Go type is not a supported type for marshalling and unmarshalling XDR data.

# Variables

DefaultDecodeOptions are the default decoding options.

# Structs

DecodeOptions configures how Decoding is done.
A Decoder wraps an io.Reader that is expected to provide an XDR-encoded byte stream and provides several exposed methods to manually decode various XDR primitives without relying on reflection.
An Encoder wraps an io.Writer that will receive the XDR encoded byte stream.
MarshalError describes a problem encountered while marshaling data.
UnmarshalError describes a problem encountered while unmarshaling data.

# Interfaces

Enum indicates this implementing type should be serialized/deserialized as an XDR Enum.
Sized types are types that have an explicit maximum size.
Union indicates the implementing type should be serialized/deserialized as an XDR Union.

# Type aliases

ErrorCode identifies a kind of error.