api

package
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Roles map the internal grpc representation of rbac Roles to the representation within fred

Functions

This section is empty.

Types

type Server

type Server struct {
	*grpc.Server
	// contains filtered or unexported fields
}

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

func (s *Server) CheckCert(ctx context.Context) (string, error)

CheckCert checks the certificate from the given gRPC context for validity and returns the Common Name

func (*Server) Close

func (s *Server) Close() error

Close closes the grpc server for internal communication.

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

GetKeygroupInfo calls this method on the exthandler

func (*Server) GetKeygroupTriggers

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

Jump to

Keyboard shortcuts

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