buf

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2018 License: Unlicense Imports: 10 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Byte

type Byte struct {
	Val    *[]byte
	Status string
	Coding string
}

Byte is a simple byte slice

func NewByte

func NewByte() *Byte

NewByte creates a new Byte

func (*Byte) Bytes

func (r *Byte) Bytes() (out *[]byte)

Bytes returns a pointer to the buffer

func (*Byte) Copy

func (r *Byte) Copy(in *[]byte) proto.Buffer

Copy copies the byte from a provided byte slice to a new buffer

func (*Byte) Error

func (r *Byte) Error() string

Error implements the Error interface

func (*Byte) Free

func (r *Byte) Free() proto.Buffer

Free is a

func (*Byte) Freeze

func (r *Byte) Freeze() (out *[]byte)

Freeze returns a json format struct of the data

func (*Byte) GetCoding

func (r *Byte) GetCoding() (out *string)

GetCoding is a

func (*Byte) GetElem

func (r *Byte) GetElem(index int) (out interface{})

GetElem is a

func (*Byte) IsEqual

func (r *Byte) IsEqual(p *[]byte) (is bool)

IsEqual returns true if a serialized public key matches this one, also in format (compressed is preferred in a distributed ledger due to size)

func (*Byte) Len

func (r *Byte) Len() int

Len is a

func (*Byte) ListCodings

func (r *Byte) ListCodings() (out *[]string)

ListCodings is a

func (*Byte) OK

func (r *Byte) OK() bool

OK returns true if there is no error

func (*Byte) SetCoding

func (r *Byte) SetCoding(in string) proto.Coder

SetCoding is a

func (*Byte) SetElem

func (r *Byte) SetElem(index int, in interface{}) proto.Array

SetElem is a

func (*Byte) SetStatus

func (r *Byte) SetStatus(s string) proto.Status

SetStatus is a

func (*Byte) SetStatusIf

func (r *Byte) SetStatusIf(err error) proto.Status

SetStatusIf is a

func (*Byte) String

func (r *Byte) String() (s string)

String implements the stringer, uses coding to determine how the string is contstructed

func (*Byte) Thaw

func (r *Byte) Thaw(in *[]byte) proto.Streamer

Thaw is a

func (*Byte) UnsetStatus

func (r *Byte) UnsetStatus() proto.Status

UnsetStatus is a

func (*Byte) Zero

func (r *Byte) Zero() proto.Buffer

Zero writes zeroes to the byte slice

type Secure

type Secure struct {
	Val    *memguard.LockedBuffer
	Status string
	Coding string
}

Secure is a memguard LockedBuffer

func NewSecure

func NewSecure() *Secure

NewSecure creates a new Secure

func (*Secure) Bytes

func (r *Secure) Bytes() (out *[]byte)

Bytes returns a pointer to the buffer

func (*Secure) Copy

func (r *Secure) Copy(in *[]byte) proto.Buffer

Copy is a

func (*Secure) Error

func (r *Secure) Error() string

Error implements the Error interface

func (*Secure) Free

func (r *Secure) Free() proto.Buffer

Free is a

func (*Secure) Freeze

func (r *Secure) Freeze() (out *[]byte)

Freeze returns a json format struct of the data

func (*Secure) GetCoding

func (r *Secure) GetCoding() (out *string)

GetCoding is a

func (*Secure) GetElem

func (r *Secure) GetElem(index int) (out interface{})

GetElem is a

func (*Secure) IsEqual

func (r *Secure) IsEqual(p *[]byte) (is bool)

IsEqual returns true if a serialized public key matches this one, also in format (compressed is preferred in a distributed ledger due to size).

func (*Secure) Len

func (r *Secure) Len() (length int)

Len is a

func (*Secure) ListCodings

func (r *Secure) ListCodings() (out *[]string)

ListCodings returns the set of codings available

func (*Secure) OK

func (r *Secure) OK() bool

OK returns true if there is no error

func (*Secure) Rand

func (r *Secure) Rand(length int) *Secure

Rand creates a secure buffer containing cryptographically secure random bytes

func (*Secure) SetCoding

func (r *Secure) SetCoding(in string) proto.Coder

SetCoding sets the encoding for the stringer

func (*Secure) SetElem

func (r *Secure) SetElem(index int, in interface{}) proto.Array

SetElem is a

func (*Secure) SetStatus

func (r *Secure) SetStatus(s string) proto.Status

SetStatus sets the status of an object after an operation

func (*Secure) SetStatusIf

func (r *Secure) SetStatusIf(err error) proto.Status

SetStatusIf is a

func (*Secure) String

func (r *Secure) String() (s string)

String implements the stringer, uses coding to determine how the string is contstructed

func (*Secure) Thaw

func (r *Secure) Thaw(in *[]byte) proto.Streamer

Thaw turns a json representation back into a variable

func (*Secure) UnsetStatus

func (r *Secure) UnsetStatus() proto.Status

UnsetStatus is a

func (*Secure) Zero

func (r *Secure) Zero() proto.Buffer

Zero is a

Jump to

Keyboard shortcuts

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