Documentation ¶
Index ¶
- Variables
- func RegisterAuthenticatorServer(s grpc.ServiceRegistrar, srv AuthenticatorServer)
- func RegisterStorageServer(s grpc.ServiceRegistrar, srv StorageServer)
- type AddUserRequest
- func (*AddUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddUserRequest) GetMasterKey() string
- func (x *AddUserRequest) GetPassphrase() string
- func (x *AddUserRequest) GetUsername() string
- func (*AddUserRequest) ProtoMessage()
- func (x *AddUserRequest) ProtoReflect() protoreflect.Message
- func (x *AddUserRequest) Reset()
- func (x *AddUserRequest) String() string
- type AuthenticateRequest
- func (*AuthenticateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AuthenticateRequest) GetPassphrase() string
- func (x *AuthenticateRequest) GetUsername() string
- func (*AuthenticateRequest) ProtoMessage()
- func (x *AuthenticateRequest) ProtoReflect() protoreflect.Message
- func (x *AuthenticateRequest) Reset()
- func (x *AuthenticateRequest) String() string
- type AuthenticatorClient
- type AuthenticatorServer
- type File
- type FileRequest
- type ListResponse
- type StorageClient
- type StorageServer
- type Storage_DownloadClient
- type Storage_DownloadServer
- type Storage_UploadClient
- type Storage_UploadServer
- type Token
- type UnimplementedAuthenticatorServer
- type UnimplementedStorageServer
- type UnsafeAuthenticatorServer
- type UnsafeStorageServer
Constants ¶
This section is empty.
Variables ¶
var Authenticator_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Authenticator", HandlerType: (*AuthenticatorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddUser", Handler: _Authenticator_AddUser_Handler, }, { MethodName: "Authenticate", Handler: _Authenticator_Authenticate_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/auth.proto", }
Authenticator_ServiceDesc is the grpc.ServiceDesc for Authenticator service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_auth_proto protoreflect.FileDescriptor
var File_api_storage_proto protoreflect.FileDescriptor
var Storage_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Storage", HandlerType: (*StorageServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _Storage_List_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Upload", Handler: _Storage_Upload_Handler, ServerStreams: true, }, { StreamName: "Download", Handler: _Storage_Download_Handler, ServerStreams: true, }, }, Metadata: "api/storage.proto", }
Storage_ServiceDesc is the grpc.ServiceDesc for Storage service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterAuthenticatorServer ¶
func RegisterAuthenticatorServer(s grpc.ServiceRegistrar, srv AuthenticatorServer)
func RegisterStorageServer ¶
func RegisterStorageServer(s grpc.ServiceRegistrar, srv StorageServer)
Types ¶
type AddUserRequest ¶
type AddUserRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Passphrase string `protobuf:"bytes,2,opt,name=passphrase,proto3" json:"passphrase,omitempty"` MasterKey string `protobuf:"bytes,3,opt,name=master_key,json=masterKey,proto3" json:"master_key,omitempty"` // contains filtered or unexported fields }
func (*AddUserRequest) Descriptor
deprecated
func (*AddUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddUserRequest.ProtoReflect.Descriptor instead.
func (*AddUserRequest) GetMasterKey ¶
func (x *AddUserRequest) GetMasterKey() string
func (*AddUserRequest) GetPassphrase ¶
func (x *AddUserRequest) GetPassphrase() string
func (*AddUserRequest) GetUsername ¶
func (x *AddUserRequest) GetUsername() string
func (*AddUserRequest) ProtoMessage ¶
func (*AddUserRequest) ProtoMessage()
func (*AddUserRequest) ProtoReflect ¶
func (x *AddUserRequest) ProtoReflect() protoreflect.Message
func (*AddUserRequest) Reset ¶
func (x *AddUserRequest) Reset()
func (*AddUserRequest) String ¶
func (x *AddUserRequest) String() string
type AuthenticateRequest ¶
type AuthenticateRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Passphrase string `protobuf:"bytes,2,opt,name=passphrase,proto3" json:"passphrase,omitempty"` // contains filtered or unexported fields }
func (*AuthenticateRequest) Descriptor
deprecated
func (*AuthenticateRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthenticateRequest.ProtoReflect.Descriptor instead.
func (*AuthenticateRequest) GetPassphrase ¶
func (x *AuthenticateRequest) GetPassphrase() string
func (*AuthenticateRequest) GetUsername ¶
func (x *AuthenticateRequest) GetUsername() string
func (*AuthenticateRequest) ProtoMessage ¶
func (*AuthenticateRequest) ProtoMessage()
func (*AuthenticateRequest) ProtoReflect ¶
func (x *AuthenticateRequest) ProtoReflect() protoreflect.Message
func (*AuthenticateRequest) Reset ¶
func (x *AuthenticateRequest) Reset()
func (*AuthenticateRequest) String ¶
func (x *AuthenticateRequest) String() string
type AuthenticatorClient ¶
type AuthenticatorClient interface { AddUser(ctx context.Context, in *AddUserRequest, opts ...grpc.CallOption) (*Token, error) Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*Token, error) }
AuthenticatorClient is the client API for Authenticator service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAuthenticatorClient ¶
func NewAuthenticatorClient(cc grpc.ClientConnInterface) AuthenticatorClient
type AuthenticatorServer ¶
type AuthenticatorServer interface { AddUser(context.Context, *AddUserRequest) (*Token, error) Authenticate(context.Context, *AuthenticateRequest) (*Token, error) }
AuthenticatorServer is the server API for Authenticator service. All implementations should embed UnimplementedAuthenticatorServer for forward compatibility
type File ¶
type File struct { Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` // contains filtered or unexported fields }
func (*File) Descriptor
deprecated
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
func (*File) ProtoReflect ¶
func (x *File) ProtoReflect() protoreflect.Message
type FileRequest ¶
type FileRequest struct { Filename string `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"` // contains filtered or unexported fields }
func (*FileRequest) Descriptor
deprecated
func (*FileRequest) Descriptor() ([]byte, []int)
Deprecated: Use FileRequest.ProtoReflect.Descriptor instead.
func (*FileRequest) GetFilename ¶
func (x *FileRequest) GetFilename() string
func (*FileRequest) ProtoMessage ¶
func (*FileRequest) ProtoMessage()
func (*FileRequest) ProtoReflect ¶
func (x *FileRequest) ProtoReflect() protoreflect.Message
func (*FileRequest) Reset ¶
func (x *FileRequest) Reset()
func (*FileRequest) String ¶
func (x *FileRequest) String() string
type ListResponse ¶
type ListResponse struct { Filenames []string `protobuf:"bytes,1,rep,name=filenames,proto3" json:"filenames,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetFilenames ¶
func (x *ListResponse) GetFilenames() []string
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
type StorageClient ¶
type StorageClient interface { Upload(ctx context.Context, in *FileRequest, opts ...grpc.CallOption) (Storage_UploadClient, error) Download(ctx context.Context, in *FileRequest, opts ...grpc.CallOption) (Storage_DownloadClient, error) List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListResponse, error) }
StorageClient is the client API for Storage service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewStorageClient ¶
func NewStorageClient(cc grpc.ClientConnInterface) StorageClient
type StorageServer ¶
type StorageServer interface { Upload(*FileRequest, Storage_UploadServer) error Download(*FileRequest, Storage_DownloadServer) error List(context.Context, *emptypb.Empty) (*ListResponse, error) }
StorageServer is the server API for Storage service. All implementations should embed UnimplementedStorageServer for forward compatibility
type Storage_DownloadClient ¶
type Storage_DownloadClient interface { Recv() (*File, error) grpc.ClientStream }
type Storage_DownloadServer ¶
type Storage_DownloadServer interface { Send(*File) error grpc.ServerStream }
type Storage_UploadClient ¶
type Storage_UploadClient interface { Recv() (*File, error) grpc.ClientStream }
type Storage_UploadServer ¶
type Storage_UploadServer interface { Send(*File) error grpc.ServerStream }
type Token ¶
type Token struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*Token) Descriptor
deprecated
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶
func (x *Token) ProtoReflect() protoreflect.Message
type UnimplementedAuthenticatorServer ¶
type UnimplementedAuthenticatorServer struct { }
UnimplementedAuthenticatorServer should be embedded to have forward compatible implementations.
func (UnimplementedAuthenticatorServer) AddUser ¶
func (UnimplementedAuthenticatorServer) AddUser(context.Context, *AddUserRequest) (*Token, error)
func (UnimplementedAuthenticatorServer) Authenticate ¶
func (UnimplementedAuthenticatorServer) Authenticate(context.Context, *AuthenticateRequest) (*Token, error)
type UnimplementedStorageServer ¶
type UnimplementedStorageServer struct { }
UnimplementedStorageServer should be embedded to have forward compatible implementations.
func (UnimplementedStorageServer) Download ¶
func (UnimplementedStorageServer) Download(*FileRequest, Storage_DownloadServer) error
func (UnimplementedStorageServer) List ¶
func (UnimplementedStorageServer) List(context.Context, *emptypb.Empty) (*ListResponse, error)
func (UnimplementedStorageServer) Upload ¶
func (UnimplementedStorageServer) Upload(*FileRequest, Storage_UploadServer) error
type UnsafeAuthenticatorServer ¶
type UnsafeAuthenticatorServer interface {
// contains filtered or unexported methods
}
UnsafeAuthenticatorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthenticatorServer will result in compilation errors.
type UnsafeStorageServer ¶
type UnsafeStorageServer interface {
// contains filtered or unexported methods
}
UnsafeStorageServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StorageServer will result in compilation errors.