Documentation ¶
Overview ¶
Package adminserver contains the KeyTransparencyAdmin implementation
Index ¶
- type Batcher
- type LogsAdmin
- type Server
- func (s *Server) CreateDirectory(ctx context.Context, in *pb.CreateDirectoryRequest) (*pb.Directory, error)
- func (s *Server) CreateInputLog(ctx context.Context, in *pb.InputLog) (*pb.InputLog, error)
- func (s *Server) DeleteDirectory(ctx context.Context, in *pb.DeleteDirectoryRequest) (*empty.Empty, error)
- func (s *Server) GarbageCollect(ctx context.Context, in *pb.GarbageCollectRequest) (*pb.GarbageCollectResponse, error)
- func (s *Server) GetDirectory(ctx context.Context, in *pb.GetDirectoryRequest) (*pb.Directory, error)
- func (s *Server) ListDirectories(ctx context.Context, in *pb.ListDirectoriesRequest) (*pb.ListDirectoriesResponse, error)
- func (s *Server) ListInputLogs(ctx context.Context, in *pb.ListInputLogsRequest) (*pb.ListInputLogsResponse, error)
- func (s *Server) UndeleteDirectory(ctx context.Context, in *pb.UndeleteDirectoryRequest) (*empty.Empty, error)
- func (s *Server) UpdateInputLog(ctx context.Context, in *pb.InputLog) (*pb.InputLog, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batcher ¶
type Batcher interface { // WriteBatchSources saves the (low, high] boundaries used for each log in making this revision. WriteBatchSources(ctx context.Context, dirID string, rev int64, meta *spb.MapMetadata) error }
Batcher writes batch definitions to storage.
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 // SetWritable enables or disables new writes from going to logID. SetWritable(ctx context.Context, directoryID string, logID int64, enabled bool) error // ListLogs returns a list of logs, optionally filtered by the writable bit. ListLogs(ctx context.Context, directoryID string, writable bool) ([]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, batcher Batcher, 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) CreateInputLog ¶
CreateInputLog returns the created log.
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) ListInputLogs ¶
func (s *Server) ListInputLogs(ctx context.Context, in *pb.ListInputLogsRequest) (*pb.ListInputLogsResponse, error)
ListInputLogs returns a list of input logs for a directory.
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.