Documentation ¶
Overview ¶
Package data provides interfaces and helper methods that can be used for data writing and reading. This package exports the data Reader and Writer interfaces which are an extension of the standard io.Reader and io.Writer interfaces.
Index ¶
- Constants
- Variables
- func CreateTemp(d, p string) (*os.File, error)
- func NewCtxReader(x context.Context, r io.Reader) io.ReadCloser
- func ReadAll(r io.Reader) ([]byte, error)
- func ReadCloser(r io.Reader) io.ReadCloser
- func ReadFile(n string) ([]byte, error)
- func ReadSplit(s, sep string) []string
- func ReadStringList(r Reader, s *[]string) error
- func WriteCloser(w io.Writer) io.WriteCloser
- func WriteStringList(w Writer, s []string) error
- type Chunk
- func (c *Chunk) Available(n int) bool
- func (c *Chunk) Bool() (bool, error)
- func (c *Chunk) Bytes() ([]byte, error)
- func (c *Chunk) Clear()
- func (Chunk) Close() error
- func (c *Chunk) Empty() bool
- func (c *Chunk) Float32() (float32, error)
- func (c *Chunk) Float64() (float64, error)
- func (Chunk) Flush() error
- func (c *Chunk) Grow(n int) error
- func (c *Chunk) Int() (int, error)
- func (c *Chunk) Int16() (int16, error)
- func (c *Chunk) Int32() (int32, error)
- func (c *Chunk) Int64() (int64, error)
- func (c *Chunk) Int8() (int8, error)
- func (c *Chunk) KeyCrypt(k KeyPair)
- func (c *Chunk) MarshalStream(w Writer) error
- func (c *Chunk) Payload() []byte
- func (c *Chunk) Read(b []byte) (int, error)
- func (c *Chunk) ReadBool(p *bool) error
- func (c *Chunk) ReadBytes(p *[]byte) error
- func (c *Chunk) ReadDeadline(r net.Conn, d time.Duration) (int64, error)
- func (c *Chunk) ReadFloat32(p *float32) error
- func (c *Chunk) ReadFloat64(p *float64) error
- func (c *Chunk) ReadFrom(r io.Reader) (int64, error)
- func (c *Chunk) ReadInt(p *int) error
- func (c *Chunk) ReadInt16(p *int16) error
- func (c *Chunk) ReadInt32(p *int32) error
- func (c *Chunk) ReadInt64(p *int64) error
- func (c *Chunk) ReadInt8(p *int8) error
- func (c *Chunk) ReadString(p *string) error
- func (c *Chunk) ReadUint(p *uint) error
- func (c *Chunk) ReadUint16(p *uint16) error
- func (c *Chunk) ReadUint32(p *uint32) error
- func (c *Chunk) ReadUint64(p *uint64) error
- func (c *Chunk) ReadUint8(p *uint8) error
- func (c *Chunk) Remaining() int
- func (c *Chunk) Reset()
- func (c *Chunk) Seek(o int64, w int) (int64, error)
- func (c *Chunk) Size() int
- func (c *Chunk) Space() int
- func (c *Chunk) String() string
- func (c *Chunk) StringVal() (string, error)
- func (c *Chunk) Truncate(n int) error
- func (c *Chunk) Uint() (uint, error)
- func (c *Chunk) Uint16() (uint16, error)
- func (c *Chunk) Uint32() (uint32, error)
- func (c *Chunk) Uint64() (uint64, error)
- func (c *Chunk) Uint8() (uint8, error)
- func (c *Chunk) UnmarshalStream(r Reader) error
- func (c *Chunk) Write(b []byte) (int, error)
- func (c *Chunk) WriteBool(b bool) error
- func (c *Chunk) WriteBoolPos(p int, b bool) error
- func (c *Chunk) WriteBytes(b []byte) error
- func (c *Chunk) WriteFloat32(f float32) error
- func (c *Chunk) WriteFloat64(f float64) error
- func (c *Chunk) WriteInt(n int) error
- func (c *Chunk) WriteInt16(n int16) error
- func (c *Chunk) WriteInt32(n int32) error
- func (c *Chunk) WriteInt64(n int64) error
- func (c *Chunk) WriteInt8(n int8) error
- func (c *Chunk) WriteString(s string) error
- func (c *Chunk) WriteTo(w io.Writer) (int64, error)
- func (c *Chunk) WriteUint(n uint) error
- func (c *Chunk) WriteUint16(n uint16) error
- func (c *Chunk) WriteUint16Pos(p int, n uint16) error
- func (c *Chunk) WriteUint32(n uint32) error
- func (c *Chunk) WriteUint32Pos(p int, n uint32) error
- func (c *Chunk) WriteUint64(n uint64) error
- func (c *Chunk) WriteUint64Pos(p int, n uint64) error
- func (c *Chunk) WriteUint8(n uint8) error
- func (c *Chunk) WriteUint8Pos(p int, n uint8) error
- type DirEntry
- type KeyPair
- func (k *KeyPair) Empty() bool
- func (k *KeyPair) Fill()
- func (k *KeyPair) FillPrivate(p PrivateKey) error
- func (k *KeyPair) FillPublic(p PublicKey) error
- func (k *KeyPair) IsSynced() bool
- func (k *KeyPair) Marshal(w io.Writer) error
- func (k *KeyPair) Read(r io.Reader) error
- func (k KeyPair) Shared() SharedKeys
- func (k *KeyPair) Sync() error
- func (k *KeyPair) Unmarshal(r io.Reader) error
- func (k *KeyPair) Write(w io.Writer) error
- type PrivateKey
- type PublicKey
- type Reader
- type SharedKeys
- type Writer
Constants ¶
const ( // LimitSmall is the size value allowed for small strings using the WriteString // and WriteBytes functions. LimitSmall uint64 = 2 << 7 // LimitLarge is the size value allowed for large strings using the WriteString // and WriteBytes functions. LimitLarge uint64 = 2 << 31 // LimitMedium is the size value allowed for medium strings using the WriteString // and WriteBytes functions. LimitMedium uint64 = 2 << 15 )
const ( // ErrTooLarge is raised if memory cannot be allocated to store data in a Chunk. ErrTooLarge = dataError(3) // ErrInvalidType is an error that occurs when the Bytes, ReadBytes, StringVal // or ReadString functions could not properly determine the underlying type // of array from the Reader. ErrInvalidType = dataError(1) // ErrInvalidIndex is raised if a specified Grow or index function is supplied // with a negative or out of bounds number or when a Seek index is not valid. ErrInvalidIndex = dataError(2) )
const MaxSlice = 4398046511104 // (4_398_046_511_104) (2 << 41)
MaxSlice is the max slice value used when creating slices to prevent OOM issues. XMT will refuse to make a slice any larger than this and will return 'ErrToLarge'
Variables ¶
var ErrLimit = new(limitError)
ErrLimit is an error that is returned when a Limit is set on a Chunk and the size limit was hit when attempting to write to the Chunk. This error wraps the io.EOF error, which allows this error to match io.EOF for sanity checking.
Functions ¶
func CreateTemp ¶ added in v0.5.0
CreateTemp creates a new temporary file in the directory dir, opens the file for reading and writing, and returns the resulting file.
The filename is generated by taking pattern and adding a random string to the end.
If pattern includes a "*", the random string replaces the last "*".
If dir is the empty string, CreateTemp uses the default directory for temporary files, as returned by TempDir.
Multiple programs or goroutines calling CreateTemp simultaneously will not choose the same file.
The caller can use the file's Name method to find the pathname of the file. It is the caller's responsibility to remove the file when it is no longer needed.
Alias of "os.CreateTemp".
This is a pre go1.16 compatibility helper.
func NewCtxReader ¶
NewCtxReader creates a reader backed by the supplied Reader and Context. This reader will automatically close when the parent context is canceled. This is useful in situations when direct copies using 'io.Copy' on threads or timed operations are required.
func ReadAll ¶ added in v0.5.0
ReadAll reads from r until an error or EOF and returns the data it read. A successful call returns err == nil, not err == EOF.
Because ReadAll is defined to read from src until EOF, it does not treat an EOF from Read as an error to be reported.
This is a pre go1.16 compatibility helper.
func ReadCloser ¶ added in v0.1.0
func ReadCloser(r io.Reader) io.ReadCloser
ReadCloser is a function that will wrap the supplied Reader in a NopReadCloser.
func ReadFile ¶ added in v0.5.0
ReadFile reads the named file and returns the contents. A successful call returns err == nil, not err == EOF.
Because ReadFile reads the whole file, it does not treat an EOF from Read as an error to be reported.
This is a pre go1.16 compatibility helper.
func ReadSplit ¶ added in v0.5.1
ReadSplit is a *nix specific helper function that can be used to loop over a file delimited by the supplied string.
This function replaces the open/read/split loop and will directly return the result to be used in a loop.
If the file does not exist or an error occurs, the loop will be a NOP as this function returns nil.
func ReadStringList ¶
ReadStringList attempts to read a string list written using the 'WriteStringList' function from the supplied string into the string list pointer. If the provided array is nil or not large enough, it will be resized.
func WriteCloser ¶ added in v0.1.0
func WriteCloser(w io.Writer) io.WriteCloser
WriteCloser is a function that will wrap the supplied Writer in a NopWriteCloser.
func WriteStringList ¶
WriteStringList will attempt to write the supplied string list to the writer. If the string list is nil or empty, it will write a zero byte to the Writer. The resulting data can be read using the 'ReadStringList' function.
Types ¶
type Chunk ¶
type Chunk struct { Limit int // contains filtered or unexported fields }
Chunk is a low level data container. Chunks allow for simple read/write operations on static containers.
Chunk fulfils the Reader, Seeker, Writer, Flusher and Closer interfaces. Seeking on Chunks is only supported in a read-only fashion.
If the underlying device is running Windows and the "heap" build tag is used, Chunks will be created on the Process Heap not managed by Go. This prevents over-allocation and relieves pressure on the GC. By default, this is off.
func NewChunk ¶
NewChunk creates a new Chunk struct and will use the provided byte array as the underlying backing buffer.
func (*Chunk) Available ¶ added in v0.4.2
Available returns if a limit will block the writing of n bytes. This function can be used to check if there is space to write before committing a write.
func (*Chunk) Clear ¶
func (c *Chunk) Clear()
Clear is similar to Reset, but discards the buffer, which must be allocated again. If using the buffer the 'Reset' function is preferable.
func (*Chunk) Empty ¶
Empty returns true if this Chunk's buffer is empty or has been drained by reads.
func (*Chunk) Grow ¶
Grow grows the Chunk's buffer capacity, if necessary, to guarantee space for another n bytes.
func (*Chunk) KeyCrypt ¶ added in v0.5.0
KeyCrypt will perform an "encryption" operation on the underlying Chunk buffer. No bytes are added or removed and this will not change the Chunk's size.
If the Chunk is empty, 'nokeyset' was specified on build or the Key is nil, this is a NOP.
func (*Chunk) MarshalStream ¶
MarshalStream writes the unread Chunk data into a binary data representation. This function will return an error if any part of the write fails.
func (*Chunk) Payload ¶
Payload returns a copy of the underlying UNREAD buffer contained in this Chunk.
This may be empty depending on the read status of this chunk. To retrieve the full buffer, use the 'Seek' function to set the read cursor to zero.
func (*Chunk) Read ¶
Read reads the next len(p) bytes from the Chunk or until the Chunk is drained. The return value n is the number of bytes read and any errors that may have occurred.
func (*Chunk) ReadBool ¶
ReadBool reads the value from the Chunk payload buffer into the provided pointer.
func (*Chunk) ReadDeadline ¶ added in v0.1.0
ReadDeadline reads data from the supplied net.Conn until EOF or error.
The return value is the number of bytes read. Any error except 'io.EOF' encountered during the read is also returned.
If the specific duration is greater than zero, the read deadline will be applied. Timeout errors will NOT be returned and will instead break a read.
func (*Chunk) ReadFloat32 ¶
ReadFloat32 reads the value from the Chunk payload buffer into the provided pointer.
func (*Chunk) ReadFloat64 ¶
ReadFloat64 reads the value from the Chunk payload buffer into the provided pointer.
func (*Chunk) ReadFrom ¶
ReadFrom reads data from the supplied Reader until EOF or error.
The return value is the number of bytes read. Any error except 'io.EOF' encountered during the read is also returned.
func (*Chunk) ReadInt ¶
ReadInt reads the value from the Chunk payload buffer into the provided pointer.
func (*Chunk) ReadInt16 ¶
ReadInt16 reads the value from the Chunk payload buffer into the provided pointer.
func (*Chunk) ReadInt32 ¶
ReadInt32 reads the value from the Chunk payload buffer into the provided pointer.
func (*Chunk) ReadInt64 ¶
ReadInt64 reads the value from the Chunk payload buffer into the provided pointer.
func (*Chunk) ReadInt8 ¶
ReadInt8 reads the value from the Chunk payload buffer into the provided pointer.
func (*Chunk) ReadString ¶
ReadString reads the value from the Chunk payload buffer into the provided pointer.
func (*Chunk) ReadUint ¶
ReadUint reads the value from the Chunk payload buffer into the provided pointer.
func (*Chunk) ReadUint16 ¶
ReadUint16 reads the value from the Chunk payload buffer into the provided pointer.
func (*Chunk) ReadUint32 ¶
ReadUint32 reads the value from the Chunk payload buffer into the provided pointer.
func (*Chunk) ReadUint64 ¶
ReadUint64 reads the value from the Chunk payload buffer into the provided pointer.
func (*Chunk) ReadUint8 ¶
ReadUint8 reads the value from the Chunk payload buffer into the provided pointer.
func (*Chunk) Remaining ¶ added in v0.2.0
Remaining returns the number of bytes left to be read in this Chunk. This is the length 'Size' minus the read cursor.
func (*Chunk) Reset ¶
func (c *Chunk) Reset()
Reset resets the Chunk buffer to be empty but retains the underlying storage for use by future writes.
func (*Chunk) Seek ¶
Seek will attempt to seek to the provided read offset index and whence. This function will return the new offset if successful and will return an error if the offset and/or whence are invalid.
NOTE: This only affects read operations.
func (*Chunk) Space ¶ added in v0.2.0
Space returns the amount of bytes available in this Chunk when a Limit is set.
This function will return -1 if there is no limit set and returns 0 (zero) when a limit is set, but no byte space is available.
func (*Chunk) Truncate ¶
Truncate discards all but the first n unread bytes from the Chunk but continues to use the same allocated storage.
This will return an error if n is negative or greater than the length of the buffer.
func (*Chunk) UnmarshalStream ¶
UnmarshalStream reads the Chunk data from a binary data representation. This function will return an error if any part of the read fails.
func (*Chunk) Write ¶
Write appends the contents of b to the buffer, growing the buffer as needed.
If the buffer becomes too large, Write will return 'ErrTooLarge.' If there is a limit set, this function will return 'ErrLimit' if the Limit is being hit.
If an 'ErrLimit' is returned, check the returned bytes as 'ErrLimit' is returned as a warning that not all bytes have been written before refusing writes.
func (*Chunk) WriteBool ¶
WriteBool writes the supplied value to the Chunk payload buffer.
If this function returns 'ErrLimit' this indicates that the write was NOT preformed.
func (*Chunk) WriteBoolPos ¶ added in v0.3.1
WriteBoolPos writes the supplied boolean value to the Chunk payload buffer at the supplied index 'p'.
The error 'io.EOF' is returned if the position specified is greater than the Chunk buffer size, or 'ErrLimit' if this position is greater than the set Chunk limit.
func (*Chunk) WriteBytes ¶
WriteBytes writes the supplied value to the Chunk payload buffer.
func (*Chunk) WriteFloat32 ¶
WriteFloat32 writes the supplied value to the Chunk payload buffer.
If this function returns 'ErrLimit' this indicates that the write was NOT preformed.
func (*Chunk) WriteFloat64 ¶
WriteFloat64 writes the supplied value to the Chunk payload buffer.
If this function returns 'ErrLimit' this indicates that the write was NOT preformed.
func (*Chunk) WriteInt ¶
WriteInt writes the supplied value to the Chunk payload buffer.
If this function returns 'ErrLimit' this indicates that the write was NOT preformed.
func (*Chunk) WriteInt16 ¶
WriteInt16 writes the supplied value to the Chunk payload buffer.
If this function returns 'ErrLimit' this indicates that the write was NOT preformed.
func (*Chunk) WriteInt32 ¶
WriteInt32 writes the supplied value to the Chunk payload buffer.
If this function returns 'ErrLimit' this indicates that the write was NOT preformed.
func (*Chunk) WriteInt64 ¶
WriteInt64 writes the supplied value to the Chunk payload buffer.
If this function returns 'ErrLimit' this indicates that the write was NOT preformed.
func (*Chunk) WriteInt8 ¶
WriteInt8 writes the supplied value to the Chunk payload buffer.
If this function returns 'ErrLimit' this indicates that the write was NOT preformed.
func (*Chunk) WriteString ¶
WriteString writes the supplied value to the Chunk payload buffer.
If this function returns 'ErrLimit' this indicates that the write was NOT preformed.
func (*Chunk) WriteTo ¶
WriteTo writes data to the supplied Writer until there's no more data to write or when an error occurs.
The return value is the number of bytes written. Any error encountered during the write is also returned.
func (*Chunk) WriteUint ¶
WriteUint writes the supplied value to the Chunk payload buffer.
If this function returns 'ErrLimit' this indicates that the write was NOT preformed.
func (*Chunk) WriteUint16 ¶
WriteUint16 writes the supplied value to the Chunk payload buffer.
If this function returns 'ErrLimit' this indicates that the write was NOT preformed.
func (*Chunk) WriteUint16Pos ¶ added in v0.3.1
WriteUint16Pos writes the supplied uint16 value to the Chunk payload buffer at the supplied index 'p'.
The error 'io.EOF' is returned if the position specified is greater than the Chunk buffer size, or 'ErrLimit' if this position is greater than the set Chunk limit.
func (*Chunk) WriteUint32 ¶
WriteUint32 writes the supplied value to the Chunk payload buffer.
If this function returns 'ErrLimit' this indicates that the write was NOT preformed.
func (*Chunk) WriteUint32Pos ¶ added in v0.3.1
WriteUint32Pos writes the supplied uint16 value to the Chunk payload buffer at the supplied index 'p'.
The error 'io.EOF' is returned if the position specified is greater than the Chunk buffer size, or 'ErrLimit' if this position is greater than the set Chunk limit.
func (*Chunk) WriteUint64 ¶
WriteUint64 writes the supplied value to the Chunk payload buffer.
If this function returns 'ErrLimit' this indicates that the write was NOT preformed.
func (*Chunk) WriteUint64Pos ¶ added in v0.3.1
WriteUint64Pos writes the supplied uint16 value to the Chunk payload buffer at the supplied index 'p'.
The error 'io.EOF' is returned if the position specified is greater than the Chunk buffer size, or 'ErrLimit' if this position is greater than the set Chunk limit.
func (*Chunk) WriteUint8 ¶
WriteUint8 writes the supplied value to the Chunk payload buffer.
If this function returns 'ErrLimit' this indicates that the write was NOT preformed.
func (*Chunk) WriteUint8Pos ¶ added in v0.3.1
WriteUint8Pos writes the supplied uint8 value to the Chunk payload buffer at the supplied index 'p'.
The error 'io.EOF' is returned if the position specified is greater than the Chunk buffer size, or 'ErrLimit' if this position is greater than the set Chunk limit.
type DirEntry ¶ added in v0.5.0
A DirEntry is an entry read from a directory (using the ReadDir function or a ReadDirFile's ReadDir method).
Alias of "fs.DirEntry".
This is a pre go1.16 compatibility helper.
func ReadDir ¶ added in v0.5.0
ReadDir reads the named directory, returning all its directory entries sorted by filename. If an error occurs reading the directory, ReadDir returns the entries it was able to read before the error, along with the error.
Alias of "os.ReadDir".
This is a pre go1.16 compatibility helper.
type KeyPair ¶ added in v0.5.0
type KeyPair struct { Public PublicKey Private PrivateKey // contains filtered or unexported fields }
KeyPair is a ECDH key pair that can be used to generate and manage Public, Private and shared keys. The data from this struct can be written and read from disk or network.
The empty value can be filled using the 'Fill*' functions.
If not changed via the 'keyCurve' const, this function uses NIST P-521 (FIPS 186-3, section D.2.5), known as secp521r1.
Initial ideas and concepts from: https://github.com/wsddn/go-ecdh
func (*KeyPair) Fill ¶ added in v0.5.0
func (k *KeyPair) Fill()
Fill will populate this KeyPair with a randomally generated Public and Private key values.
Before returning, this function will zero out the shared secret.
func (*KeyPair) FillPrivate ¶ added in v0.5.0
func (k *KeyPair) FillPrivate(p PrivateKey) error
FillPrivate will generate the Shared key using the KeyPair's PublicKey and the supplied PrivateKey.
If successful, the PrivateKey data will be copied over the current KeyPair's PrivateKey for successive calls to 'Sync'.
This function returns an error if a Shared key could not be generated.
func (*KeyPair) FillPublic ¶ added in v0.5.0
FillPublic will generate the Shared key using the KeyPair's PrivateKey and the supplied PublicKey.
If successful, the PublicKey data will be copied over the current KeyPair's PublicKey for successive calls to 'Sync'.
This function returns an error if a Shared key could not be generated.
func (*KeyPair) IsSynced ¶ added in v0.5.0
IsSynced returns false if the Shared key is empty (all zeros).
func (*KeyPair) Marshal ¶ added in v0.5.0
Marshal will write out the Public, Private and Shared key data to the supplied 'io.Writer'.
Any errors or invalid byte lengths written will return an error.
func (*KeyPair) Read ¶ added in v0.5.0
Read will read in the PublicKey ONLY from the supplied 'io.Reader' and fill the current KeyPair's PublicKey with the resulting data.
Any errors or invalid byte lengths read will return an error.
func (KeyPair) Shared ¶ added in v0.5.0
func (k KeyPair) Shared() SharedKeys
Shared returns a copy of the current Shared key contained in this KeyPair.
If 'IsSynced' returns false, the output will be a zero filled array.
func (*KeyPair) Sync ¶ added in v0.5.0
Sync attempts to generate the Shared key using the current KeyPair's Public and Private key values.
This function returns an error if a Shared key could not be generated.
type PrivateKey ¶ added in v0.5.0
type PrivateKey [privateKeySize]byte
PrivateKey represents a ECDH PrivateKey in raw binary format. This alias can be used to parse or output to a string value.
func (*PrivateKey) Parse ¶ added in v0.5.0
func (p *PrivateKey) Parse(v string) error
Parse will attempt to fill the data of this PrivateKey from the supplied PublicKey colon-seperated hex string.
This function will only overrite the PrivateKey data if the entire parsing process succeeds.
Any errors occurred during parsing will be returned.
func (PrivateKey) String ¶ added in v0.5.0
func (p PrivateKey) String() string
String returns a colon ':' seperated version of the PrivateKey's hex value.
type PublicKey ¶ added in v0.5.0
type PublicKey [publicKeySize]byte
PublicKey represents a ECDH PublicKey in raw binary format. This alias can be used to parse or output to a string value.
func (PublicKey) Hash ¶ added in v0.5.0
Hash returns the FNV-32 hash of this PublicKey in a uint32 format.
type Reader ¶
type Reader interface { Close() error Read([]byte) (int, error) Int() (int, error) Bool() (bool, error) Int8() (int8, error) Uint() (uint, error) Int16() (int16, error) Int32() (int32, error) Int64() (int64, error) Uint8() (uint8, error) Bytes() ([]byte, error) Uint16() (uint16, error) Uint32() (uint32, error) Uint64() (uint64, error) Float32() (float32, error) Float64() (float64, error) StringVal() (string, error) ReadInt(*int) error ReadBool(*bool) error ReadInt8(*int8) error ReadUint(*uint) error ReadInt16(*int16) error ReadInt32(*int32) error ReadInt64(*int64) error ReadUint8(*uint8) error ReadBytes(*[]byte) error ReadUint16(*uint16) error ReadUint32(*uint32) error ReadUint64(*uint64) error ReadString(*string) error ReadFloat32(*float32) error ReadFloat64(*float64) error }
Reader is a basic interface that supports all types of read functions of the core Golang builtin types.
Pointer functions are available to allow for easier usage and fluid operation.
type SharedKeys ¶ added in v0.5.0
type SharedKeys [sharedKeySize]byte
SharedKeys represents a ECDH SharedKey in raw binary format. This alias is just used to differentate the shared key from other binary structures.
type Writer ¶
type Writer interface { Close() error Flush() error Write([]byte) (int, error) WriteInt(int) error WriteBool(bool) error WriteInt8(int8) error WriteUint(uint) error WriteInt16(int16) error WriteInt32(int32) error WriteInt64(int64) error WriteUint8(uint8) error WriteBytes([]byte) error WriteUint16(uint16) error WriteUint32(uint32) error WriteUint64(uint64) error WriteString(string) error WriteFloat32(float32) error WriteFloat64(float64) error }
Writer is a basic interface that supports writing of all core Golang builtin types.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package crypto contains helper functions and interfaces that can be used to easily read and write different types of encrypted data.
|
Package crypto contains helper functions and interfaces that can be used to easily read and write different types of encrypted data. |
subtle
Package subtle is similar to the 'cipher/subtle', only needed for very specific crypto operations.
|
Package subtle is similar to the 'cipher/subtle', only needed for very specific crypto operations. |