Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterLibraryServiceServer(s grpc.ServiceRegistrar, srv LibraryServiceServer)
- type LibraryServiceClient
- type LibraryServiceServer
- type UnimplementedLibraryServiceServer
- func (UnimplementedLibraryServiceServer) AddDirectoryToLibrary(context.Context, *v1.AddDirectoryToLibraryRequest) (*v1.AddDirectoryToLibraryResponse, error)
- func (UnimplementedLibraryServiceServer) CreateLibrary(context.Context, *v1.CreateLibraryRequest) (*v1.CreateLibraryResponse, error)
- func (UnimplementedLibraryServiceServer) GetLibrariesForUser(context.Context, *v1.GetLibrariesForUserRequest) (*v1.GetLibrariesForUserResponse, error)
- func (UnimplementedLibraryServiceServer) GetLibrary(context.Context, *v1.GetLibraryRequest) (*v1.GetLibraryResponse, error)
- func (UnimplementedLibraryServiceServer) ListLibraries(context.Context, *v1.ListLibrariesRequest) (*v1.ListLibrariesResponse, error)
- type UnsafeLibraryServiceServer
Constants ¶
const ( LibraryService_GetLibrary_FullMethodName = "/listenup.library.v1.LibraryService/GetLibrary" LibraryService_ListLibraries_FullMethodName = "/listenup.library.v1.LibraryService/ListLibraries" LibraryService_CreateLibrary_FullMethodName = "/listenup.library.v1.LibraryService/CreateLibrary" LibraryService_GetLibrariesForUser_FullMethodName = "/listenup.library.v1.LibraryService/GetLibrariesForUser" LibraryService_AddDirectoryToLibrary_FullMethodName = "/listenup.library.v1.LibraryService/AddDirectoryToLibrary" )
Variables ¶
var LibraryService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "listenup.library.v1.LibraryService", HandlerType: (*LibraryServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetLibrary", Handler: _LibraryService_GetLibrary_Handler, }, { MethodName: "ListLibraries", Handler: _LibraryService_ListLibraries_Handler, }, { MethodName: "CreateLibrary", Handler: _LibraryService_CreateLibrary_Handler, }, { MethodName: "GetLibrariesForUser", Handler: _LibraryService_GetLibrariesForUser_Handler, }, { MethodName: "AddDirectoryToLibrary", Handler: _LibraryService_AddDirectoryToLibrary_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "listenup/library/v1/library.proto", }
LibraryService_ServiceDesc is the grpc.ServiceDesc for LibraryService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLibraryServiceServer ¶
func RegisterLibraryServiceServer(s grpc.ServiceRegistrar, srv LibraryServiceServer)
Types ¶
type LibraryServiceClient ¶
type LibraryServiceClient interface {
// Retrieves a single library by ID
GetLibrary(ctx context.Context, in *v1.GetLibraryRequest, opts ...grpc.CallOption) (*v1.GetLibraryResponse, error)
// Returns a paginated list of libraries
ListLibraries(ctx context.Context, in *v1.ListLibrariesRequest, opts ...grpc.CallOption) (*v1.ListLibrariesResponse, error)
// Creates a library
CreateLibrary(ctx context.Context, in *v1.CreateLibraryRequest, opts ...grpc.CallOption) (*v1.CreateLibraryResponse, error)
// Returns all libraries for a given User
GetLibrariesForUser(ctx context.Context, in *v1.GetLibrariesForUserRequest, opts ...grpc.CallOption) (*v1.GetLibrariesForUserResponse, error)
// Adds a directory to a library
AddDirectoryToLibrary(ctx context.Context, in *v1.AddDirectoryToLibraryRequest, opts ...grpc.CallOption) (*v1.AddDirectoryToLibraryResponse, error)
}
LibraryServiceClient is the client API for LibraryService 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 NewLibraryServiceClient ¶
func NewLibraryServiceClient(cc grpc.ClientConnInterface) LibraryServiceClient
type LibraryServiceServer ¶
type LibraryServiceServer interface {
// Retrieves a single library by ID
GetLibrary(context.Context, *v1.GetLibraryRequest) (*v1.GetLibraryResponse, error)
// Returns a paginated list of libraries
ListLibraries(context.Context, *v1.ListLibrariesRequest) (*v1.ListLibrariesResponse, error)
// Creates a library
CreateLibrary(context.Context, *v1.CreateLibraryRequest) (*v1.CreateLibraryResponse, error)
// Returns all libraries for a given User
GetLibrariesForUser(context.Context, *v1.GetLibrariesForUserRequest) (*v1.GetLibrariesForUserResponse, error)
// Adds a directory to a library
AddDirectoryToLibrary(context.Context, *v1.AddDirectoryToLibraryRequest) (*v1.AddDirectoryToLibraryResponse, error)
}
LibraryServiceServer is the server API for LibraryService service. All implementations should embed UnimplementedLibraryServiceServer for forward compatibility.
type UnimplementedLibraryServiceServer ¶
type UnimplementedLibraryServiceServer struct{}
UnimplementedLibraryServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedLibraryServiceServer) AddDirectoryToLibrary ¶
func (UnimplementedLibraryServiceServer) AddDirectoryToLibrary(context.Context, *v1.AddDirectoryToLibraryRequest) (*v1.AddDirectoryToLibraryResponse, error)
func (UnimplementedLibraryServiceServer) CreateLibrary ¶
func (UnimplementedLibraryServiceServer) CreateLibrary(context.Context, *v1.CreateLibraryRequest) (*v1.CreateLibraryResponse, error)
func (UnimplementedLibraryServiceServer) GetLibrariesForUser ¶
func (UnimplementedLibraryServiceServer) GetLibrariesForUser(context.Context, *v1.GetLibrariesForUserRequest) (*v1.GetLibrariesForUserResponse, error)
func (UnimplementedLibraryServiceServer) GetLibrary ¶
func (UnimplementedLibraryServiceServer) GetLibrary(context.Context, *v1.GetLibraryRequest) (*v1.GetLibraryResponse, error)
func (UnimplementedLibraryServiceServer) ListLibraries ¶
func (UnimplementedLibraryServiceServer) ListLibraries(context.Context, *v1.ListLibrariesRequest) (*v1.ListLibrariesResponse, error)
type UnsafeLibraryServiceServer ¶
type UnsafeLibraryServiceServer interface {
// contains filtered or unexported methods
}
UnsafeLibraryServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LibraryServiceServer will result in compilation errors.
Source Files
¶
- library_grpc.pb.go