Documentation ¶
Index ¶
- Variables
- type Server
- func (s *Server) AddReplica(ctx context.Context, request *client.AddReplicaRequest) (*client.Empty, error)
- func (s *Server) AddTrigger(ctx context.Context, request *client.AddTriggerRequest) (*client.Empty, error)
- func (s *Server) AddUser(ctx context.Context, request *client.AddUserRequest) (*client.Empty, error)
- func (s *Server) Append(ctx context.Context, request *client.AppendRequest) (*client.AppendResponse, error)
- func (s *Server) CheckCert(ctx context.Context) (string, error)
- func (s *Server) Close() error
- func (s *Server) CreateKeygroup(ctx context.Context, request *client.CreateKeygroupRequest) (*client.Empty, error)
- func (s *Server) Delete(ctx context.Context, request *client.DeleteRequest) (*client.DeleteResponse, error)
- func (s *Server) DeleteKeygroup(ctx context.Context, request *client.DeleteKeygroupRequest) (*client.Empty, error)
- func (s *Server) GetAllReplica(ctx context.Context, request *client.Empty) (*client.GetAllReplicaResponse, error)
- func (s *Server) GetKeygroupInfo(ctx context.Context, request *client.GetKeygroupInfoRequest) (*client.GetKeygroupInfoResponse, error)
- func (s *Server) GetKeygroupTriggers(ctx context.Context, request *client.GetKeygroupTriggerRequest) (*client.GetKeygroupTriggerResponse, error)
- func (s *Server) GetReplica(ctx context.Context, request *client.GetReplicaRequest) (*client.GetReplicaResponse, error)
- func (s *Server) Read(ctx context.Context, request *client.ReadRequest) (*client.ReadResponse, error)
- func (s *Server) RemoveReplica(ctx context.Context, request *client.RemoveReplicaRequest) (*client.Empty, error)
- func (s *Server) RemoveTrigger(ctx context.Context, request *client.RemoveTriggerRequest) (*client.Empty, error)
- func (s *Server) RemoveUser(ctx context.Context, request *client.RemoveUserRequest) (*client.Empty, error)
- func (s *Server) Scan(ctx context.Context, request *client.ScanRequest) (*client.ScanResponse, error)
- func (s *Server) Update(ctx context.Context, request *client.UpdateRequest) (*client.UpdateResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( Roles = map[client.UserRole]fred.Role{ client.UserRole_ReadKeygroup: fred.ReadKeygroup, client.UserRole_WriteKeygroup: fred.WriteKeygroup, client.UserRole_ConfigureReplica: fred.ConfigureReplica, client.UserRole_ConfigureTrigger: fred.ConfigureTrigger, client.UserRole_ConfigureKeygroups: fred.ConfigureKeygroups, } )
Roles map the internal grpc representation of rbac Roles to the representation within fred
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server handles GRPC Requests and calls the according functions of the exthandler
func NewServer ¶
func NewServer(host string, handler *fred.ExtHandler, certFile string, keyFile string, caFile string, skipVerify bool, isProxied bool, proxy string) *Server
NewServer creates a new Server for requests from Fred Clients
func (*Server) AddReplica ¶
func (s *Server) AddReplica(ctx context.Context, request *client.AddReplicaRequest) (*client.Empty, error)
AddReplica calls this method on the exthandler
func (*Server) AddTrigger ¶
func (s *Server) AddTrigger(ctx context.Context, request *client.AddTriggerRequest) (*client.Empty, error)
AddTrigger calls this method on the exthandler
func (*Server) AddUser ¶
func (s *Server) AddUser(ctx context.Context, request *client.AddUserRequest) (*client.Empty, error)
AddUser calls this method on the exthandler
func (*Server) Append ¶
func (s *Server) Append(ctx context.Context, request *client.AppendRequest) (*client.AppendResponse, error)
Append calls this method on the exthandler
func (*Server) CheckCert ¶
CheckCert checks the certificate from the given gRPC context for validity and returns the Common Name
func (*Server) CreateKeygroup ¶
func (s *Server) CreateKeygroup(ctx context.Context, request *client.CreateKeygroupRequest) (*client.Empty, error)
CreateKeygroup calls this method on the exthandler
func (*Server) Delete ¶
func (s *Server) Delete(ctx context.Context, request *client.DeleteRequest) (*client.DeleteResponse, error)
Delete calls this method on the exthandler
func (*Server) DeleteKeygroup ¶
func (s *Server) DeleteKeygroup(ctx context.Context, request *client.DeleteKeygroupRequest) (*client.Empty, error)
DeleteKeygroup calls this method on the exthandler
func (*Server) GetAllReplica ¶
func (s *Server) GetAllReplica(ctx context.Context, request *client.Empty) (*client.GetAllReplicaResponse, error)
GetAllReplica calls this method on the exthandler
func (*Server) GetKeygroupInfo ¶ added in v0.2.2
func (s *Server) GetKeygroupInfo(ctx context.Context, request *client.GetKeygroupInfoRequest) (*client.GetKeygroupInfoResponse, error)
GetKeygroupInfo calls this method on the exthandler
func (*Server) GetKeygroupTriggers ¶
func (s *Server) GetKeygroupTriggers(ctx context.Context, request *client.GetKeygroupTriggerRequest) (*client.GetKeygroupTriggerResponse, error)
GetKeygroupTriggers calls this method on the exthandler
func (*Server) GetReplica ¶
func (s *Server) GetReplica(ctx context.Context, request *client.GetReplicaRequest) (*client.GetReplicaResponse, error)
GetReplica calls this method on the exthandler
func (*Server) Read ¶
func (s *Server) Read(ctx context.Context, request *client.ReadRequest) (*client.ReadResponse, error)
Read calls this method on the exthandler
func (*Server) RemoveReplica ¶
func (s *Server) RemoveReplica(ctx context.Context, request *client.RemoveReplicaRequest) (*client.Empty, error)
RemoveReplica calls this method on the exthandler
func (*Server) RemoveTrigger ¶
func (s *Server) RemoveTrigger(ctx context.Context, request *client.RemoveTriggerRequest) (*client.Empty, error)
RemoveTrigger calls this method on the exthandler
func (*Server) RemoveUser ¶
func (s *Server) RemoveUser(ctx context.Context, request *client.RemoveUserRequest) (*client.Empty, error)
RemoveUser calls this method on the exthandler
func (*Server) Scan ¶
func (s *Server) Scan(ctx context.Context, request *client.ScanRequest) (*client.ScanResponse, error)
Scan calls this method on the exthandler
func (*Server) Update ¶
func (s *Server) Update(ctx context.Context, request *client.UpdateRequest) (*client.UpdateResponse, error)
Update calls this method on the exthandler