Documentation ¶
Index ¶
- Constants
- func ParseActionsArray(data []byte, position int) ([][]byte, int)
- func ParseBool(data []byte, position int) (bool, int)
- func ParseByte(data []byte, position int) (byte, int)
- func ParseByteArray(data []byte, position int) ([]byte, int)
- func ParseByteArrayArray(data []byte, position int) ([][]byte, int)
- func ParseHash(data []byte, position int) (crypto.Hash, int)
- func ParseHashArray(data []byte, position int) ([]crypto.Hash, int)
- func ParseLargeByteArray(data []byte, position int) ([]byte, int)
- func ParseLongByteArray(data []byte, position int) ([]byte, int)
- func ParseSecret(data []byte, position int) (crypto.PrivateKey, int)
- func ParseSignature(data []byte, position int) (crypto.Signature, int)
- func ParseString(data []byte, position int) (string, int)
- func ParseTime(data []byte, position int) (time.Time, int)
- func ParseToken(data []byte, position int) (crypto.Token, int)
- func ParseTokenArray(data []byte, position int) ([]crypto.Token, int)
- func ParseTokenCipher(data []byte, position int) (crypto.TokenCipher, int)
- func ParseTokenCiphers(data []byte, position int) (crypto.TokenCiphers, int)
- func ParseUint16(data []byte, position int) (uint16, int)
- func ParseUint32(data []byte, position int) (uint32, int)
- func ParseUint64(data []byte, position int) (uint64, int)
- func PrintJson(v any)
- func PutActionsArray(b [][]byte, data *[]byte)
- func PutBool(b bool, data *[]byte)
- func PutByte(b byte, data *[]byte)
- func PutByteArray(b []byte, data *[]byte)
- func PutHash(hash crypto.Hash, data *[]byte)
- func PutHashArray(b []crypto.Hash, data *[]byte)
- func PutLargeByteArray(b []byte, data *[]byte)
- func PutLongByteArray(b []byte, data *[]byte)
- func PutSecret(secret crypto.PrivateKey, data *[]byte)
- func PutSignature(sign crypto.Signature, data *[]byte)
- func PutString(value string, data *[]byte)
- func PutTime(value time.Time, data *[]byte)
- func PutToken(token crypto.Token, data *[]byte)
- func PutTokenArray(b []crypto.Token, data *[]byte)
- func PutTokenCipher(tc crypto.TokenCipher, data *[]byte)
- func PutTokenCiphers(tcs crypto.TokenCiphers, data *[]byte)
- func PutUint16(v uint16, data *[]byte)
- func PutUint32(v uint32, data *[]byte)
- func PutUint64(v uint64, data *[]byte)
- func SetFromSlice[T comparable](slice []T) map[T]struct{}
- func Uint64ToBytes(v uint64) []byte
- type Await
- type Chain
- type CookieStore
- type DataQueue
- type JSONBuilder
- func (j *JSONBuilder) PutBase64(fieldName string, value []byte)
- func (j *JSONBuilder) PutHex(fieldName string, value []byte)
- func (j *JSONBuilder) PutJSON(fieldName, value string)
- func (j *JSONBuilder) PutString(fieldName, value string)
- func (j *JSONBuilder) PutTime(fieldName string, t time.Time)
- func (j *JSONBuilder) PutTokenCiphers(fieldName string, tc crypto.TokenCiphers)
- func (j *JSONBuilder) PutTokenValueArray(fieldName string, tokens []crypto.TokenValue)
- func (j *JSONBuilder) PutUint64(fieldName string, value uint64)
- func (j *JSONBuilder) ToString() string
- type ReadAppendMutiFileStore
- type SecureVault
- type Set
Constants ¶
View Source
const MAX_FILE_SIZE = 1 << 30
Variables ¶
This section is empty.
Functions ¶
func ParseSecret ¶
func ParseSecret(data []byte, position int) (crypto.PrivateKey, int)
func ParseTokenCipher ¶
func ParseTokenCipher(data []byte, position int) (crypto.TokenCipher, int)
func ParseTokenCiphers ¶
func ParseTokenCiphers(data []byte, position int) (crypto.TokenCiphers, int)
func PutActionsArray ¶
func PutByteArray ¶
PutByteArray puts a byte array up to 2^16 bytes into a byte array
func PutHashArray ¶
func PutLargeByteArray ¶
func PutLongByteArray ¶
PutByteArray puts a byte array up to 2^32 bytes into a byte array
func PutSecret ¶
func PutSecret(secret crypto.PrivateKey, data *[]byte)
func PutSignature ¶
func PutTokenArray ¶
func PutTokenCipher ¶
func PutTokenCipher(tc crypto.TokenCipher, data *[]byte)
func PutTokenCiphers ¶
func PutTokenCiphers(tcs crypto.TokenCiphers, data *[]byte)
func SetFromSlice ¶
func SetFromSlice[T comparable](slice []T) map[T]struct{}
func Uint64ToBytes ¶
Types ¶
type Chain ¶
Chain provides a data structure that allows order data to be pushed possibly out of order and popped ordered.
type CookieStore ¶
type CookieStore struct {
// contains filtered or unexported fields
}
func OpenCokieStore ¶
func OpenCokieStore(path string, epoch uint64) *CookieStore
func (*CookieStore) Clean ¶
func (c *CookieStore) Clean(epoch uint64)
func (*CookieStore) Close ¶
func (c *CookieStore) Close()
type DataQueue ¶
type DataQueue[T any] struct { // contains filtered or unexported fields }
type JSONBuilder ¶
func (*JSONBuilder) PutBase64 ¶
func (j *JSONBuilder) PutBase64(fieldName string, value []byte)
func (*JSONBuilder) PutHex ¶
func (j *JSONBuilder) PutHex(fieldName string, value []byte)
func (*JSONBuilder) PutJSON ¶
func (j *JSONBuilder) PutJSON(fieldName, value string)
func (*JSONBuilder) PutString ¶
func (j *JSONBuilder) PutString(fieldName, value string)
func (*JSONBuilder) PutTokenCiphers ¶
func (j *JSONBuilder) PutTokenCiphers(fieldName string, tc crypto.TokenCiphers)
func (*JSONBuilder) PutTokenValueArray ¶
func (j *JSONBuilder) PutTokenValueArray(fieldName string, tokens []crypto.TokenValue)
func (*JSONBuilder) PutUint64 ¶
func (j *JSONBuilder) PutUint64(fieldName string, value uint64)
func (*JSONBuilder) ToString ¶
func (j *JSONBuilder) ToString() string
type ReadAppendMutiFileStore ¶
type ReadAppendMutiFileStore struct {
// contains filtered or unexported fields
}
func OpenMultiFileStore ¶
func OpenMultiFileStore(dbpath, name string) (*ReadAppendMutiFileStore, error)
func (*ReadAppendMutiFileStore) Close ¶
func (r *ReadAppendMutiFileStore) Close() error
type SecureVault ¶
type SecureVault struct { SecretKey crypto.PrivateKey Entries [][]byte // contains filtered or unexported fields }
SecureVault is a file that can persists data in an encrypted format protected by a pass phrase.
func NewSecureVault ¶
func NewSecureVault(password []byte, fileName string) (*SecureVault, error)
func OpenOrCreateVaultFromPassword ¶
func OpenOrCreateVaultFromPassword(password []byte, fileName string) (*SecureVault, error)
func OpenVaultFromPassword ¶
func OpenVaultFromPassword(password []byte, fileName string) (*SecureVault, error)
func (*SecureVault) Close ¶
func (s *SecureVault) Close()
func (*SecureVault) NewEntry ¶
func (s *SecureVault) NewEntry(data []byte) error
type Set ¶
type Set[T comparable] map[T]struct{}
Click to show internal directories.
Click to hide internal directories.