adminserver

package
v0.1.1-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Overview

Package adminserver contains the KeyTransparencyAdmin implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogsAdmin

type LogsAdmin interface {
	// AddLogs creates and adds new logs for writing to a directory.
	AddLogs(ctx context.Context, directoryID string, logIDs ...int64) error
}

LogsAdmin controls the lifecycle and scaling of mutation logs.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements pb.KeyTransparencyAdminServer

func New

func New(
	tlog tpb.TrillianLogClient,
	tmap tpb.TrillianMapClient,
	logAdmin, mapAdmin tpb.TrillianAdminClient,
	directories directory.Storage,
	logsAdmin LogsAdmin,
	keygen keys.ProtoGenerator,
) *Server

New returns a KeyTransparencyAdmin implementation.

func (*Server) CreateDirectory

func (s *Server) CreateDirectory(ctx context.Context, in *pb.CreateDirectoryRequest) (*pb.Directory, error)

CreateDirectory reachs out to Trillian to produce new trees.

func (*Server) DeleteDirectory

func (s *Server) DeleteDirectory(ctx context.Context, in *pb.DeleteDirectoryRequest) (*empty.Empty, error)

DeleteDirectory marks a directory as deleted, but does not immediately delete it.

func (*Server) GarbageCollect

func (s *Server) GarbageCollect(ctx context.Context, in *pb.GarbageCollectRequest) (*pb.GarbageCollectResponse, error)

GarbageCollect looks for directories that have been deleted before the specified timestamp and fully deletes them.

func (*Server) GetDirectory

func (s *Server) GetDirectory(ctx context.Context, in *pb.GetDirectoryRequest) (*pb.Directory, error)

GetDirectory retrieves the directory info for a given directory.

func (*Server) ListDirectories

func (s *Server) ListDirectories(ctx context.Context, in *pb.ListDirectoriesRequest) (
	*pb.ListDirectoriesResponse, error)

ListDirectories produces a list of the configured directories

func (*Server) UndeleteDirectory

func (s *Server) UndeleteDirectory(ctx context.Context, in *pb.UndeleteDirectoryRequest) (
	*empty.Empty, error)

UndeleteDirectory reactivates a deleted directory - provided that UndeleteDirectory is called sufficiently soon after DeleteDirectory.

Jump to

Keyboard shortcuts

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