pipeenc

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package pipeenc implements encoding and decoding of the serialization format used by trqauthd.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

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

Decoder holds a buffer for pipe decoding.

func NewDecoder

func NewDecoder(s string) Decoder

NewDecoder returns a Decoder that decodes s.

func (*Decoder) GetInt

func (dec *Decoder) GetInt() (int, error)

GetInt pipe-decodes an integer from the buffer.

func (*Decoder) GetString

func (dec *Decoder) GetString() (string, error)

GetString pipe-decodes a string from the buffer.

type Encoder

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

Encoder holds a buffer for pipe encoding.

func NewEncoder

func NewEncoder() Encoder

NewEncoder returns an Encoder.

func (*Encoder) PutInt

func (enc *Encoder) PutInt(i int)

PutInt pipe-encodes an integer and appends the result to the buffer.

func (*Encoder) PutString

func (enc *Encoder) PutString(s string)

PutString pipe-encodes a string and appends the result to the buffer.

func (*Encoder) String

func (enc *Encoder) String() string

String returns the constructed string.

Jump to

Keyboard shortcuts

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