Documentation ¶
Index ¶
- type Byte
- func (r *Byte) Array() def.Array
- func (r *Byte) Buf() interface{}
- func (r *Byte) Coding() def.Coding
- func (r *Byte) Copy(b interface{}) def.Buffer
- func (r *Byte) Free() def.Buffer
- func (r *Byte) Len() int
- func (r *Byte) Link(b def.Buffer) def.Buffer
- func (r *Byte) Null() def.Buffer
- func (r *Byte) OfLen(int) def.Buffer
- func (r *Byte) Rand(...int) def.Buffer
- func (r *Byte) Status() def.Status
- func (r *Byte) String() (S string)
- type Fenced
- func (r *Fenced) Array() def.Array
- func (r *Fenced) Buf() interface{}
- func (r *Fenced) Coding() def.Coding
- func (r *Fenced) Copy(b interface{}) def.Buffer
- func (r *Fenced) Elem(i int) interface{}
- func (r *Fenced) Free() def.Buffer
- func (r *Fenced) Len() (i int)
- func (r *Fenced) Link(buf def.Buffer) def.Buffer
- func (r *Fenced) MarshalJSON() ([]byte, error)
- func (r *Fenced) Null() def.Buffer
- func (r *Fenced) OfLen(size int) def.Buffer
- func (r *Fenced) Print()
- func (r *Fenced) Rand(size ...int) def.Buffer
- func (r *Fenced) SetElem(i int, b interface{}) interface{}
- func (r *Fenced) Status() def.Status
- func (r *Fenced) String() (S string)
- type Unsafe
- func (r *Unsafe) Array() def.Array
- func (r *Unsafe) Buf() (R interface{})
- func (r *Unsafe) Coding() def.Coding
- func (r *Unsafe) Copy(b interface{}) def.Buffer
- func (r *Unsafe) Elem(i int) (R interface{})
- func (r *Unsafe) Free() def.Buffer
- func (r *Unsafe) Len() int
- func (r *Unsafe) Link(b def.Buffer) (R def.Buffer)
- func (r *Unsafe) MarshalJSON() ([]byte, error)
- func (r *Unsafe) Null() (R def.Buffer)
- func (r *Unsafe) OfLen(size int) (R def.Buffer)
- func (r *Unsafe) Rand(size ...int) (R def.Buffer)
- func (r *Unsafe) SetElem(i int, b interface{}) (R interface{})
- func (r *Unsafe) Status() def.Status
- func (r *Unsafe) String() (S string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Byte ¶
type Byte struct {
// contains filtered or unexported fields
}
Byte is a buffer that represents a byte
type Fenced ¶
type Fenced struct {
// contains filtered or unexported fields
}
Fenced is a struct that stores and manages memguard.LockedBuffer, ensuring that buffers are destroyed when no longer in use.
func (*Fenced) Buf ¶
func (r *Fenced) Buf() interface{}
Buf returns a pointer to the byte slice in the Fenced.
func (*Fenced) Len ¶
Len returns the length of the Fenced if it has been loaded, or -1 if not. Note that this method satisfies two interfaces, Buffer and Array
func (*Fenced) Link ¶
Link copies the pointer from another Fenced's content, meaning what is written to one will also be visible in the other
func (*Fenced) MarshalJSON ¶
MarshalJSON marshals the data of this object into JSON
func (*Fenced) OfLen ¶
OfLen allocates a new buffer of a specified size and nulls and frees the existing, if any
func (*Fenced) Rand ¶
Rand loads the Fenced with cryptographically random bytes to a specified length, destroying existing buffer if it was set
type Unsafe ¶
type Unsafe struct {
// contains filtered or unexported fields
}
Unsafe is a struct that stores and manages byte slices for security purposes, automatically wipes old data when new data is loaded.
func (*Unsafe) Buf ¶
func (r *Unsafe) Buf() (R interface{})
Buf returns a variable pointing to the value stored in a Unsafe.
func (*Unsafe) Copy ¶
Copy duplicates the data from the buffer provided and zeroes and replaces its contents, clearing the error value.
func (*Unsafe) MarshalJSON ¶
MarshalJSON renders the data as JSON