Documentation
¶
Overview ¶
server/pkg/implement/transfer_file.go
Index ¶
- type AuthInfo
- type Server
- func (s *Server) AuthenticateStream(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func (s *Server) AuthenticateUnary(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func (s *Server) Close(ctx context.Context, req *pb.CloseRequest) (*pb.CloseResponse, error)
- func (s *Server) Connect(ctx context.Context, req *pb.ConnectRequest) (*pb.ConnectResponse, error)
- func (s *Server) ExecCommand(ctx context.Context, req *pb.CommandRequest) (*pb.CommandResponse, error)
- func (s *Server) FetchFile(ctx context.Context, req *pb.FetchFileRequest) (*pb.FetchFileResponse, error)
- func (s *Server) PutFile(ctx context.Context, req *pb.PutFileRequest) (*pb.PutFileResponse, error)
- func (s *Server) TransferFile(stream pb.ConnectionService_TransferFileServer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthInfo ¶
type AuthInfo struct { User string `json:"user"` Password string `json:"password,omitempty"` SignedData string `json:"signed-data,omitempty"` PubKeyFingerprint string `json:"pub-key-fingerprint,omitempty"` PubKeyAlgorithm string `json:"pub-key-algorithm,omitempty"` }
AuthInfo struct for authentication metadata
type Server ¶
type Server struct { pb.UnimplementedConnectionServiceServer SSHAuthenticator *authenicate.SSHAuthenticator WhiteList map[string]bool }
Server struct implementing pb.ConnectionServiceServer
func NewServer ¶
func NewServer(whiteList map[string]bool, sshAuthenticator *authenicate.SSHAuthenticator) *Server
NewServer creates a new Server instance
func (*Server) AuthenticateStream ¶
func (s *Server) AuthenticateStream(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
AuthenticateStream is a streaming interceptor for authentication
func (*Server) AuthenticateUnary ¶
func (s *Server) AuthenticateUnary(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
AuthenticateUnary is a unary interceptor for authentication
func (*Server) Close ¶
func (s *Server) Close(ctx context.Context, req *pb.CloseRequest) (*pb.CloseResponse, error)
Close method implementation
func (*Server) Connect ¶
func (s *Server) Connect(ctx context.Context, req *pb.ConnectRequest) (*pb.ConnectResponse, error)
Connect method implementation
func (*Server) ExecCommand ¶
func (s *Server) ExecCommand(ctx context.Context, req *pb.CommandRequest) (*pb.CommandResponse, error)
func (*Server) FetchFile ¶
func (s *Server) FetchFile(ctx context.Context, req *pb.FetchFileRequest) (*pb.FetchFileResponse, error)
FetchFile method implementation
func (*Server) PutFile ¶
func (s *Server) PutFile(ctx context.Context, req *pb.PutFileRequest) (*pb.PutFileResponse, error)
PutFile method implementation
func (*Server) TransferFile ¶
func (s *Server) TransferFile(stream pb.ConnectionService_TransferFileServer) error
TransferFile implements the bidirectional streaming RPC for file transfers.
Click to show internal directories.
Click to hide internal directories.