Documentation
¶
Index ¶
- Variables
- type Handle
- func (h *Handle) BEFileFor(batch uint32) (*os.File, error)
- func (h *Handle) BEPath(number uint32) string
- func (h *Handle) BatchPath(number uint32) string
- func (h *Handle) BatchesPath() string
- func (h *Handle) CertificateFor(a mtc.Assertion) (*mtc.BikeshedCertificate, error)
- func (h *Handle) Close() error
- func (h *Handle) CloseBatch(batch uint32) error
- func (h *Handle) EVFileFor(batch uint32) (*os.File, error)
- func (h *Handle) EVPath(number uint32) string
- func (h *Handle) EvidenceFor(a mtc.Assertion) (*mtc.EvidenceList, error)
- func (h *Handle) GetSignedValidityWindow(number uint32) (*mtc.SignedValidityWindow, error)
- func (h *Handle) GetUmbilicalRoots() (*x509.CertPool, error)
- func (h *Handle) IndexFor(batch uint32) (*Index, error)
- func (h *Handle) IndexPath(number uint32) string
- func (h *Handle) LatestBatchPath() string
- func (h *Handle) ListBatchRange() (mtc.BatchRange, error)
- func (h *Handle) LockFolder() error
- func (h *Handle) New(path string, params mtc.CAParams) error
- func (h *Handle) Open(path string) error
- func (h *Handle) ParamsPath() string
- func (h *Handle) TmpPath() string
- func (h *Handle) TreeFor(batch uint32) (*Tree, error)
- func (h *Handle) TreePath(number uint32) string
- func (h *Handle) UCFor(batch uint32) (*frozencas.Handle, error)
- func (h *Handle) UCPath(number uint32) string
- func (h *Handle) UmbilicalRootsPath() string
- func (h *Handle) UpdateLatest(number uint32) error
- type Index
- type IndexBuildEntry
- type IndexBuilder
- type IndexSearchResult
- type Tree
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrClosed = errors.New("Handle is closed")
)
Functions ¶
This section is empty.
Types ¶
type Handle ¶
type Handle struct {
// Immutable
Params mtc.CAParams
Path string
// Mutable covered by RWLock mux
Mux sync.RWMutex
FLock lockfile.Lockfile
Closed bool
UmbilicalRoots *x509.CertPool
// Caches. Access requires either write lock on mux, or a read lock on mux
// and a lock on cacheMux.
CacheMux sync.Mutex
Indices map[uint32]*Index // index files
BEs map[uint32]*os.File // entries files
EVs map[uint32]*os.File // evidence files
Trees map[uint32]*Tree // tree files
UCs map[uint32]*frozencas.Handle // umbilical-certificates
BatchNumbersCache []uint32 // cache for existing batches
}
Common functionality shared between the state of a Merkle Tree CA and a mirror.
func (*Handle) BatchesPath ¶
func (*Handle) CertificateFor ¶
Returns the certificate for an issued assertion
func (*Handle) CloseBatch ¶
Close any (cached) open files for the given batch.
func (*Handle) EvidenceFor ¶
Returns the evidence for an issued assertion
func (*Handle) GetSignedValidityWindow ¶
func (h *Handle) GetSignedValidityWindow(number uint32) ( *mtc.SignedValidityWindow, error)
func (*Handle) GetUmbilicalRoots ¶
Returns a copy of the trusted umbilical roots.
Requires write lock on mux.
func (*Handle) LatestBatchPath ¶
func (*Handle) ListBatchRange ¶
func (h *Handle) ListBatchRange() (mtc.BatchRange, error)
Returns range of batches for which a directory was created.
func (*Handle) LockFolder ¶
func (*Handle) ParamsPath ¶
func (*Handle) UmbilicalRootsPath ¶
func (*Handle) UpdateLatest ¶
Updates the latest symlink to point to the given batch
type IndexBuildEntry ¶
type IndexBuilder ¶
type IndexBuilder struct {
// contains filtered or unexported fields
}
func NewIndexBuilder ¶
func NewIndexBuilder(w io.Writer) *IndexBuilder
func (*IndexBuilder) Finish ¶
func (ib *IndexBuilder) Finish() error
func (*IndexBuilder) Push ¶
func (ib *IndexBuilder) Push(in IndexBuildEntry) error
type IndexSearchResult ¶
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
Handle to a batches tree file. In contrast to mtc.Tree, this doesn't load the whole tree in memory.
func (*Tree) AuthenticationPath ¶
Return authentication path proving that the leaf at the given index is included in the Merkle tree.
Click to show internal directories.
Click to hide internal directories.