cbtransaction

package module
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionEnum

type ActionEnum byte
var (
	ActionAdd    ActionEnum = '+'
	ActionRemove ActionEnum = '-'
	ActionClear  ActionEnum = '*'
)

func (*ActionEnum) IsAdd

func (e *ActionEnum) IsAdd() bool

func (*ActionEnum) IsClear

func (e *ActionEnum) IsClear() bool

func (*ActionEnum) IsRemove

func (e *ActionEnum) IsRemove() bool

type Encoding added in v0.1.0

type Encoding interface {
	GetKey() [8]byte
	Encode(data interface{}) ([]byte, error)
	EncodeWriter(data interface{}, writer io.Writer) error
	Decode(encoded []byte) (interface{}, error)
	DecodeReader(reader io.Reader, out interface{}) error
}

type Encryption added in v0.3.0

type Encryption interface {
	GetKey() [8]byte
	Encrypt(data []byte) []byte
	EncryptWriter(data []byte, writer io.Writer) error
	Decrypt(encrypted []byte) []byte
	DecryptReader(reader io.Reader, out []byte) error
}

type Storage added in v0.4.0

type Storage interface {
	Upload(filename string, reader io.Reader) error
	Download(filename string, writer io.Writer) error
	Concat(destination string, filenames ...string) error
	Delete(filename string) error
}

type Transaction

type Transaction interface {
	SetTransactionId(transactionId uint64)
	GetTransactionId() uint64
	SetActionEnum(action ActionEnum)
	GetActionEnum() ActionEnum
	SetEncodingProviderKey(key [8]byte)
	GetEncodingProviderKey() [8]byte
	SetEncryptionProviderKey(key [8]byte)
	GetEncryptionProviderKey() [8]byte
	SetData(data []byte)
	GetData() []byte
	GetLength() uint64
	Unserialise(transaction []byte)
	UnserialiseReader(reader io.Reader) error
	Serialise() []byte
	SerialiseWriter(writer io.Writer) (n int, err error)
}

Directories

Path Synopsis
encoding
encryption
storage
transaction

Jump to

Keyboard shortcuts

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