zone

package
v0.0.0-...-4f831cf Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RootPointer

type RootPointer struct {
	Version   byte
	Timestamp int64
	Pointer   storage.ID
	Digest    []byte
}

type Suite

type Suite byte
const (
	AES256CBCHMACSHA256 Suite = 0
)

func (Suite) CipherKeyLen

func (s Suite) CipherKeyLen() int

func (Suite) HMACKeyLen

func (s Suite) HMACKeyLen() int

func (Suite) IDHashKeyLen

func (s Suite) IDHashKeyLen() int

func (Suite) KeyLen

func (s Suite) KeyLen() int

func (Suite) String

func (s Suite) String() string

type Zone

type Zone struct {
	Name        string
	Persistence persistence.Accessor
	Head        *tree.Snapshot
	HeadID      storage.ID

	Written uint64
	Saved   uint64
	// contains filtered or unexported fields
}

func Create

func Create(persistence persistence.Accessor, name string) (*Zone, error)

func Open

func Open(persistence persistence.Accessor, name string,
	keys []identity.PrivateKey) (*Zone, error)

func (*Zone) AddIdentity

func (zone *Zone) AddIdentity(key identity.PublicKey) error

func (*Zone) Read

func (zone *Zone) Read(id storage.ID) ([]byte, error)

Read implements the storage.Reader interface.

func (*Zone) SetRootPointer

func (zone *Zone) SetRootPointer(id storage.ID) error

func (*Zone) Write

func (zone *Zone) Write(data []byte) (id storage.ID, err error)

Write implements the storage.Writer interface.

Jump to

Keyboard shortcuts

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