directory

package
Version: v0.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package directory stores multi-tenancy configuration information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Directory

type Directory struct {
	DirectoryID string
	Map         *tpb.Tree
	Log         *tpb.Tree
	VRF         *keyspb.PublicKey

	VRFPriv                  proto.Message
	MinInterval, MaxInterval time.Duration
	// TODO(gbelvin): specify mutation function
	Deleted          bool
	DeletedTimestamp time.Time
}

Directory stores configuration information for a single Key Transparency instance.

type Storage

type Storage interface {
	// List returns the full list of directories.
	List(ctx context.Context, deleted bool) ([]*Directory, error)
	// Write stores a new instance to storage.
	Write(ctx context.Context, d *Directory) error
	// Read a configuration from storage.
	Read(ctx context.Context, directoryID string, showDeleted bool) (*Directory, error)
	// Soft-delete or undelete the directory
	SetDelete(ctx context.Context, directoryID string, isDeleted bool) error
	// HardDelete the directory.
	Delete(ctx context.Context, directoryID string) error
}

Storage is an interface for storing multi-tenant configuration information.

Source Files

Jump to

Keyboard shortcuts

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