Documentation ¶
Overview ¶
Package adminserver contains the KeyTransparencyAdmin implementation
Index ¶
- type LogsAdmin
- type Server
- func (s *Server) CreateDirectory(ctx context.Context, in *pb.CreateDirectoryRequest) (*pb.Directory, 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) UndeleteDirectory(ctx context.Context, in *pb.UndeleteDirectoryRequest) (*empty.Empty, error)
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.