xdr

package
v0.10.8 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2014 License: MIT, GPL-3.0 Imports: 6 Imported by: 0

README

xdr

Build Status Coverage Status API Documentation MIT License

This is an XDR encoding/decoding library. It uses code generation and not reflection. It supports the IPDR bastardized XDR format when built with -tags ipdr.

Documentation

Overview

Package xdr implements an XDR (RFC 4506) encoder/decoder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ElementSizeExceeded added in v0.10.3

func ElementSizeExceeded(field string, size, limit int) error

Types

type AppendWriter

type AppendWriter []byte

func (*AppendWriter) Write

func (w *AppendWriter) Write(bs []byte) (int, error)

type Reader

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

func NewReader

func NewReader(r io.Reader) *Reader

func (*Reader) Error

func (r *Reader) Error() error

func (*Reader) ReadBool

func (r *Reader) ReadBool() bool

func (*Reader) ReadBytes

func (r *Reader) ReadBytes() []byte

func (*Reader) ReadBytesInto

func (r *Reader) ReadBytesInto(dst []byte) []byte

func (*Reader) ReadBytesMax

func (r *Reader) ReadBytesMax(max int) []byte

func (*Reader) ReadBytesMaxInto

func (r *Reader) ReadBytesMaxInto(max int, dst []byte) []byte

func (*Reader) ReadRaw

func (r *Reader) ReadRaw(bs []byte) (int, error)

func (*Reader) ReadString

func (r *Reader) ReadString() string

func (*Reader) ReadStringMax

func (r *Reader) ReadStringMax(max int) string

func (*Reader) ReadUint16

func (r *Reader) ReadUint16() uint16

func (*Reader) ReadUint32

func (r *Reader) ReadUint32() uint32

func (*Reader) ReadUint64

func (r *Reader) ReadUint64() uint64

func (*Reader) ReadUint8

func (r *Reader) ReadUint8() uint8

type Writer

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

func NewWriter

func NewWriter(w io.Writer) *Writer

func (*Writer) Error

func (w *Writer) Error() error

func (*Writer) Tot

func (w *Writer) Tot() int

func (*Writer) WriteBool

func (w *Writer) WriteBool(v bool) (int, error)

func (*Writer) WriteBytes

func (w *Writer) WriteBytes(bs []byte) (int, error)

func (*Writer) WriteRaw

func (w *Writer) WriteRaw(bs []byte) (int, error)

func (*Writer) WriteString

func (w *Writer) WriteString(s string) (int, error)

func (*Writer) WriteUint16

func (w *Writer) WriteUint16(v uint16) (int, error)

func (*Writer) WriteUint32

func (w *Writer) WriteUint32(v uint32) (int, error)

func (*Writer) WriteUint64

func (w *Writer) WriteUint64(v uint64) (int, error)

func (*Writer) WriteUint8

func (w *Writer) WriteUint8(v uint8) (int, error)

type XDRError

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

func (XDRError) Error

func (e XDRError) Error() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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