Documentation ¶
Overview ¶
Package fsserver implements a gRPC server which passes calls to Billy.
Index ¶
- func RegisterService(s grpc.ServiceRegistrar, callbacks Callbacks)
- type Callbacks
- type Service
- func (s *Service) Chmod(ctx context.Context, req *pb.ChmodRequest) (*empty.Empty, error)
- func (s *Service) Chown(ctx context.Context, req *pb.ChownRequest) (*empty.Empty, error)
- func (s *Service) Chtimes(ctx context.Context, req *pb.ChtimesRequest) (*empty.Empty, error)
- func (s *Service) FileDescriptor(stream pb.BillyService_FileDescriptorServer) error
- func (s *Service) Lchown(ctx context.Context, req *pb.ChownRequest) (*empty.Empty, error)
- func (s *Service) Lstat(ctx context.Context, req *pb.StatRequest) (*pb.StatResponse, error)
- func (s *Service) MkdirAll(ctx context.Context, req *pb.MkdirAllRequest) (*empty.Empty, error)
- func (s *Service) ReadDir(ctx context.Context, req *pb.ReadDirRequest) (*pb.ReadDirResponse, error)
- func (s *Service) Readlink(ctx context.Context, req *pb.ReadlinkRequest) (*pb.ReadlinkResponse, error)
- func (s *Service) Remove(ctx context.Context, req *pb.RemoveRequest) (*empty.Empty, error)
- func (s *Service) Rename(ctx context.Context, req *pb.RenameRequest) (*empty.Empty, error)
- func (s *Service) Stat(ctx context.Context, req *pb.StatRequest) (*pb.StatResponse, error)
- func (s *Service) Symlink(ctx context.Context, req *pb.SymlinkRequest) (*empty.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterService ¶
func RegisterService(s grpc.ServiceRegistrar, callbacks Callbacks)
RegisterService creates the services and registers it with the given gRPC server.
Types ¶
type Callbacks ¶
type Callbacks interface { // FilesystemForPeer is supposed to grab the peer from context.Context and return the filesystem you want to serve that peer; or an error code and an error. // codes.Code and error are separate to force you to think about the error code. FilesystemForPeer(context.Context) (billy.Filesystem, codes.Code, error) }
Callbacks are the callbacks this library needs from callers.
type Service ¶
type Service struct { // "Unsafe" so it doesn't compile if we don't implement all the methods. pb.UnsafeBillyServiceServer // contains filtered or unexported fields }
Service implements pb.BillyServiceServer and can be registered with a grpc.Server.
func NewService ¶
NewService instantiates a new Service.
func (*Service) FileDescriptor ¶
func (s *Service) FileDescriptor(stream pb.BillyService_FileDescriptorServer) error
func (*Service) Lstat ¶
func (s *Service) Lstat(ctx context.Context, req *pb.StatRequest) (*pb.StatResponse, error)
func (*Service) ReadDir ¶
func (s *Service) ReadDir(ctx context.Context, req *pb.ReadDirRequest) (*pb.ReadDirResponse, error)
func (*Service) Readlink ¶
func (s *Service) Readlink(ctx context.Context, req *pb.ReadlinkRequest) (*pb.ReadlinkResponse, error)
func (*Service) Stat ¶
func (s *Service) Stat(ctx context.Context, req *pb.StatRequest) (*pb.StatResponse, error)
Click to show internal directories.
Click to hide internal directories.