generate grpc client stubs

This commit is contained in:
Jörn Friedrich Dreyer
2026-05-13 11:33:27 +02:00
parent 748f3bc89a
commit 2124b6c657
11 changed files with 1938 additions and 0 deletions
+6
View File
@@ -83,6 +83,12 @@ $(PIGEON): $(BINGO_DIR)/pigeon.mod
@echo "(re)installing $(GOBIN)/pigeon-v1.3.0"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=pigeon.mod -o=$(GOBIN)/pigeon-v1.3.0 "github.com/mna/pigeon"
PROTOC_GEN_GO_GRPC := $(GOBIN)/protoc-gen-go-grpc-v1.81.0
$(PROTOC_GEN_GO_GRPC): $(BINGO_DIR)/protoc-gen-go-grpc.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/protoc-gen-go-grpc-v1.81.0"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=protoc-gen-go-grpc.mod -o=$(GOBIN)/protoc-gen-go-grpc-v1.81.0 "google.golang.org/grpc/cmd/protoc-gen-go-grpc"
PROTOC_GEN_GO := $(GOBIN)/protoc-gen-go-v1.28.1
$(PROTOC_GEN_GO): $(BINGO_DIR)/protoc-gen-go.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
+5
View File
@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.25.0
require google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.2
+6
View File
@@ -0,0 +1,6 @@
google.golang.org/grpc v1.81.0 h1:W3G9N3KQf3BU+YuCtGKJk0CmxQNbAISICD/9AORxLIw=
google.golang.org/grpc v1.81.0/go.mod h1:xGH9GfzOyMTGIOXBJmXt+BX/V0kcdQbdcuwQ/zNw42I=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.2 h1:rgSNvqscFZ1JgV/4wH5GOsZFSFkR2Eua9As3KIr2LlM=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.2/go.mod h1:iMEtFwDlAhjDU9L5mY6U1XLwlIId/G3h+QcBHDIvrJ8=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
+2
View File
@@ -30,6 +30,8 @@ MUTAGEN="${GOBIN}/mutagen-v0.18.1"
PIGEON="${GOBIN}/pigeon-v1.3.0"
PROTOC_GEN_GO_GRPC="${GOBIN}/protoc-gen-go-grpc-v1.81.0"
PROTOC_GEN_GO="${GOBIN}/protoc-gen-go-v1.28.1"
PROTOC_GEN_MICRO="${GOBIN}/protoc-gen-micro-v1.0.0"
@@ -0,0 +1,167 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc (unknown)
// source: opencloud/services/eventhistory/v0/eventhistory.proto
package v0
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
EventHistoryService_GetEvents_FullMethodName = "/opencloud.services.eventhistory.v0.EventHistoryService/GetEvents"
EventHistoryService_GetEventsForUser_FullMethodName = "/opencloud.services.eventhistory.v0.EventHistoryService/GetEventsForUser"
)
// EventHistoryServiceClient is the client API for EventHistoryService 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.
//
// A Service for storing events
type EventHistoryServiceClient interface {
// returns the specified events
GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (*GetEventsResponse, error)
// returns all events for the specified userID
GetEventsForUser(ctx context.Context, in *GetEventsForUserRequest, opts ...grpc.CallOption) (*GetEventsResponse, error)
}
type eventHistoryServiceClient struct {
cc grpc.ClientConnInterface
}
func NewEventHistoryServiceClient(cc grpc.ClientConnInterface) EventHistoryServiceClient {
return &eventHistoryServiceClient{cc}
}
func (c *eventHistoryServiceClient) GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (*GetEventsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetEventsResponse)
err := c.cc.Invoke(ctx, EventHistoryService_GetEvents_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *eventHistoryServiceClient) GetEventsForUser(ctx context.Context, in *GetEventsForUserRequest, opts ...grpc.CallOption) (*GetEventsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetEventsResponse)
err := c.cc.Invoke(ctx, EventHistoryService_GetEventsForUser_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// EventHistoryServiceServer is the server API for EventHistoryService service.
// All implementations must embed UnimplementedEventHistoryServiceServer
// for forward compatibility.
//
// A Service for storing events
type EventHistoryServiceServer interface {
// returns the specified events
GetEvents(context.Context, *GetEventsRequest) (*GetEventsResponse, error)
// returns all events for the specified userID
GetEventsForUser(context.Context, *GetEventsForUserRequest) (*GetEventsResponse, error)
mustEmbedUnimplementedEventHistoryServiceServer()
}
// UnimplementedEventHistoryServiceServer must 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.
type UnimplementedEventHistoryServiceServer struct{}
func (UnimplementedEventHistoryServiceServer) GetEvents(context.Context, *GetEventsRequest) (*GetEventsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetEvents not implemented")
}
func (UnimplementedEventHistoryServiceServer) GetEventsForUser(context.Context, *GetEventsForUserRequest) (*GetEventsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetEventsForUser not implemented")
}
func (UnimplementedEventHistoryServiceServer) mustEmbedUnimplementedEventHistoryServiceServer() {}
func (UnimplementedEventHistoryServiceServer) testEmbeddedByValue() {}
// UnsafeEventHistoryServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EventHistoryServiceServer will
// result in compilation errors.
type UnsafeEventHistoryServiceServer interface {
mustEmbedUnimplementedEventHistoryServiceServer()
}
func RegisterEventHistoryServiceServer(s grpc.ServiceRegistrar, srv EventHistoryServiceServer) {
// If the following call panics, it indicates UnimplementedEventHistoryServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&EventHistoryService_ServiceDesc, srv)
}
func _EventHistoryService_GetEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetEventsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EventHistoryServiceServer).GetEvents(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: EventHistoryService_GetEvents_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EventHistoryServiceServer).GetEvents(ctx, req.(*GetEventsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _EventHistoryService_GetEventsForUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetEventsForUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EventHistoryServiceServer).GetEventsForUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: EventHistoryService_GetEventsForUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EventHistoryServiceServer).GetEventsForUser(ctx, req.(*GetEventsForUserRequest))
}
return interceptor(ctx, in, info, handler)
}
// EventHistoryService_ServiceDesc is the grpc.ServiceDesc for EventHistoryService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var EventHistoryService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "opencloud.services.eventhistory.v0.EventHistoryService",
HandlerType: (*EventHistoryServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetEvents",
Handler: _EventHistoryService_GetEvents_Handler,
},
{
MethodName: "GetEventsForUser",
Handler: _EventHistoryService_GetEventsForUser_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "opencloud/services/eventhistory/v0/eventhistory.proto",
}
@@ -0,0 +1,121 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc (unknown)
// source: opencloud/services/policies/v0/policies.proto
package v0
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
PoliciesProvider_Evaluate_FullMethodName = "/opencloud.services.policies.v0.policiesProvider/Evaluate"
)
// PoliciesProviderClient is the client API for PoliciesProvider 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.
type PoliciesProviderClient interface {
Evaluate(ctx context.Context, in *EvaluateRequest, opts ...grpc.CallOption) (*EvaluateResponse, error)
}
type policiesProviderClient struct {
cc grpc.ClientConnInterface
}
func NewPoliciesProviderClient(cc grpc.ClientConnInterface) PoliciesProviderClient {
return &policiesProviderClient{cc}
}
func (c *policiesProviderClient) Evaluate(ctx context.Context, in *EvaluateRequest, opts ...grpc.CallOption) (*EvaluateResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(EvaluateResponse)
err := c.cc.Invoke(ctx, PoliciesProvider_Evaluate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// PoliciesProviderServer is the server API for PoliciesProvider service.
// All implementations must embed UnimplementedPoliciesProviderServer
// for forward compatibility.
type PoliciesProviderServer interface {
Evaluate(context.Context, *EvaluateRequest) (*EvaluateResponse, error)
mustEmbedUnimplementedPoliciesProviderServer()
}
// UnimplementedPoliciesProviderServer must 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.
type UnimplementedPoliciesProviderServer struct{}
func (UnimplementedPoliciesProviderServer) Evaluate(context.Context, *EvaluateRequest) (*EvaluateResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Evaluate not implemented")
}
func (UnimplementedPoliciesProviderServer) mustEmbedUnimplementedPoliciesProviderServer() {}
func (UnimplementedPoliciesProviderServer) testEmbeddedByValue() {}
// UnsafePoliciesProviderServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PoliciesProviderServer will
// result in compilation errors.
type UnsafePoliciesProviderServer interface {
mustEmbedUnimplementedPoliciesProviderServer()
}
func RegisterPoliciesProviderServer(s grpc.ServiceRegistrar, srv PoliciesProviderServer) {
// If the following call panics, it indicates UnimplementedPoliciesProviderServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&PoliciesProvider_ServiceDesc, srv)
}
func _PoliciesProvider_Evaluate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EvaluateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PoliciesProviderServer).Evaluate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PoliciesProvider_Evaluate_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PoliciesProviderServer).Evaluate(ctx, req.(*EvaluateRequest))
}
return interceptor(ctx, in, info, handler)
}
// PoliciesProvider_ServiceDesc is the grpc.ServiceDesc for PoliciesProvider service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PoliciesProvider_ServiceDesc = grpc.ServiceDesc{
ServiceName: "opencloud.services.policies.v0.policiesProvider",
HandlerType: (*PoliciesProviderServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Evaluate",
Handler: _PoliciesProvider_Evaluate_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "opencloud/services/policies/v0/policies.proto",
}
@@ -0,0 +1,261 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc (unknown)
// source: opencloud/services/search/v0/search.proto
package v0
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
SearchProvider_Search_FullMethodName = "/opencloud.services.search.v0.SearchProvider/Search"
SearchProvider_IndexSpace_FullMethodName = "/opencloud.services.search.v0.SearchProvider/IndexSpace"
)
// SearchProviderClient is the client API for SearchProvider 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.
type SearchProviderClient interface {
Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
IndexSpace(ctx context.Context, in *IndexSpaceRequest, opts ...grpc.CallOption) (*IndexSpaceResponse, error)
}
type searchProviderClient struct {
cc grpc.ClientConnInterface
}
func NewSearchProviderClient(cc grpc.ClientConnInterface) SearchProviderClient {
return &searchProviderClient{cc}
}
func (c *searchProviderClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SearchResponse)
err := c.cc.Invoke(ctx, SearchProvider_Search_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *searchProviderClient) IndexSpace(ctx context.Context, in *IndexSpaceRequest, opts ...grpc.CallOption) (*IndexSpaceResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(IndexSpaceResponse)
err := c.cc.Invoke(ctx, SearchProvider_IndexSpace_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// SearchProviderServer is the server API for SearchProvider service.
// All implementations must embed UnimplementedSearchProviderServer
// for forward compatibility.
type SearchProviderServer interface {
Search(context.Context, *SearchRequest) (*SearchResponse, error)
IndexSpace(context.Context, *IndexSpaceRequest) (*IndexSpaceResponse, error)
mustEmbedUnimplementedSearchProviderServer()
}
// UnimplementedSearchProviderServer must 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.
type UnimplementedSearchProviderServer struct{}
func (UnimplementedSearchProviderServer) Search(context.Context, *SearchRequest) (*SearchResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Search not implemented")
}
func (UnimplementedSearchProviderServer) IndexSpace(context.Context, *IndexSpaceRequest) (*IndexSpaceResponse, error) {
return nil, status.Error(codes.Unimplemented, "method IndexSpace not implemented")
}
func (UnimplementedSearchProviderServer) mustEmbedUnimplementedSearchProviderServer() {}
func (UnimplementedSearchProviderServer) testEmbeddedByValue() {}
// UnsafeSearchProviderServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SearchProviderServer will
// result in compilation errors.
type UnsafeSearchProviderServer interface {
mustEmbedUnimplementedSearchProviderServer()
}
func RegisterSearchProviderServer(s grpc.ServiceRegistrar, srv SearchProviderServer) {
// If the following call panics, it indicates UnimplementedSearchProviderServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&SearchProvider_ServiceDesc, srv)
}
func _SearchProvider_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SearchProviderServer).Search(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SearchProvider_Search_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SearchProviderServer).Search(ctx, req.(*SearchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SearchProvider_IndexSpace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IndexSpaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SearchProviderServer).IndexSpace(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SearchProvider_IndexSpace_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SearchProviderServer).IndexSpace(ctx, req.(*IndexSpaceRequest))
}
return interceptor(ctx, in, info, handler)
}
// SearchProvider_ServiceDesc is the grpc.ServiceDesc for SearchProvider service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SearchProvider_ServiceDesc = grpc.ServiceDesc{
ServiceName: "opencloud.services.search.v0.SearchProvider",
HandlerType: (*SearchProviderServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Search",
Handler: _SearchProvider_Search_Handler,
},
{
MethodName: "IndexSpace",
Handler: _SearchProvider_IndexSpace_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "opencloud/services/search/v0/search.proto",
}
const (
IndexProvider_Search_FullMethodName = "/opencloud.services.search.v0.IndexProvider/Search"
)
// IndexProviderClient is the client API for IndexProvider 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.
type IndexProviderClient interface {
Search(ctx context.Context, in *SearchIndexRequest, opts ...grpc.CallOption) (*SearchIndexResponse, error)
}
type indexProviderClient struct {
cc grpc.ClientConnInterface
}
func NewIndexProviderClient(cc grpc.ClientConnInterface) IndexProviderClient {
return &indexProviderClient{cc}
}
func (c *indexProviderClient) Search(ctx context.Context, in *SearchIndexRequest, opts ...grpc.CallOption) (*SearchIndexResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SearchIndexResponse)
err := c.cc.Invoke(ctx, IndexProvider_Search_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// IndexProviderServer is the server API for IndexProvider service.
// All implementations must embed UnimplementedIndexProviderServer
// for forward compatibility.
type IndexProviderServer interface {
Search(context.Context, *SearchIndexRequest) (*SearchIndexResponse, error)
mustEmbedUnimplementedIndexProviderServer()
}
// UnimplementedIndexProviderServer must 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.
type UnimplementedIndexProviderServer struct{}
func (UnimplementedIndexProviderServer) Search(context.Context, *SearchIndexRequest) (*SearchIndexResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Search not implemented")
}
func (UnimplementedIndexProviderServer) mustEmbedUnimplementedIndexProviderServer() {}
func (UnimplementedIndexProviderServer) testEmbeddedByValue() {}
// UnsafeIndexProviderServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to IndexProviderServer will
// result in compilation errors.
type UnsafeIndexProviderServer interface {
mustEmbedUnimplementedIndexProviderServer()
}
func RegisterIndexProviderServer(s grpc.ServiceRegistrar, srv IndexProviderServer) {
// If the following call panics, it indicates UnimplementedIndexProviderServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&IndexProvider_ServiceDesc, srv)
}
func _IndexProvider_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchIndexRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IndexProviderServer).Search(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: IndexProvider_Search_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IndexProviderServer).Search(ctx, req.(*SearchIndexRequest))
}
return interceptor(ctx, in, info, handler)
}
// IndexProvider_ServiceDesc is the grpc.ServiceDesc for IndexProvider service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var IndexProvider_ServiceDesc = grpc.ServiceDesc{
ServiceName: "opencloud.services.search.v0.IndexProvider",
HandlerType: (*IndexProviderServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Search",
Handler: _IndexProvider_Search_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "opencloud/services/search/v0/search.proto",
}
@@ -0,0 +1,922 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc (unknown)
// source: opencloud/services/settings/v0/settings.proto
package v0
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
BundleService_SaveBundle_FullMethodName = "/opencloud.services.settings.v0.BundleService/SaveBundle"
BundleService_GetBundle_FullMethodName = "/opencloud.services.settings.v0.BundleService/GetBundle"
BundleService_ListBundles_FullMethodName = "/opencloud.services.settings.v0.BundleService/ListBundles"
BundleService_AddSettingToBundle_FullMethodName = "/opencloud.services.settings.v0.BundleService/AddSettingToBundle"
BundleService_RemoveSettingFromBundle_FullMethodName = "/opencloud.services.settings.v0.BundleService/RemoveSettingFromBundle"
)
// BundleServiceClient is the client API for BundleService 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.
type BundleServiceClient interface {
SaveBundle(ctx context.Context, in *SaveBundleRequest, opts ...grpc.CallOption) (*SaveBundleResponse, error)
GetBundle(ctx context.Context, in *GetBundleRequest, opts ...grpc.CallOption) (*GetBundleResponse, error)
ListBundles(ctx context.Context, in *ListBundlesRequest, opts ...grpc.CallOption) (*ListBundlesResponse, error)
AddSettingToBundle(ctx context.Context, in *AddSettingToBundleRequest, opts ...grpc.CallOption) (*AddSettingToBundleResponse, error)
RemoveSettingFromBundle(ctx context.Context, in *RemoveSettingFromBundleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type bundleServiceClient struct {
cc grpc.ClientConnInterface
}
func NewBundleServiceClient(cc grpc.ClientConnInterface) BundleServiceClient {
return &bundleServiceClient{cc}
}
func (c *bundleServiceClient) SaveBundle(ctx context.Context, in *SaveBundleRequest, opts ...grpc.CallOption) (*SaveBundleResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SaveBundleResponse)
err := c.cc.Invoke(ctx, BundleService_SaveBundle_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bundleServiceClient) GetBundle(ctx context.Context, in *GetBundleRequest, opts ...grpc.CallOption) (*GetBundleResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetBundleResponse)
err := c.cc.Invoke(ctx, BundleService_GetBundle_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bundleServiceClient) ListBundles(ctx context.Context, in *ListBundlesRequest, opts ...grpc.CallOption) (*ListBundlesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListBundlesResponse)
err := c.cc.Invoke(ctx, BundleService_ListBundles_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bundleServiceClient) AddSettingToBundle(ctx context.Context, in *AddSettingToBundleRequest, opts ...grpc.CallOption) (*AddSettingToBundleResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AddSettingToBundleResponse)
err := c.cc.Invoke(ctx, BundleService_AddSettingToBundle_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bundleServiceClient) RemoveSettingFromBundle(ctx context.Context, in *RemoveSettingFromBundleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, BundleService_RemoveSettingFromBundle_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// BundleServiceServer is the server API for BundleService service.
// All implementations must embed UnimplementedBundleServiceServer
// for forward compatibility.
type BundleServiceServer interface {
SaveBundle(context.Context, *SaveBundleRequest) (*SaveBundleResponse, error)
GetBundle(context.Context, *GetBundleRequest) (*GetBundleResponse, error)
ListBundles(context.Context, *ListBundlesRequest) (*ListBundlesResponse, error)
AddSettingToBundle(context.Context, *AddSettingToBundleRequest) (*AddSettingToBundleResponse, error)
RemoveSettingFromBundle(context.Context, *RemoveSettingFromBundleRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedBundleServiceServer()
}
// UnimplementedBundleServiceServer must 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.
type UnimplementedBundleServiceServer struct{}
func (UnimplementedBundleServiceServer) SaveBundle(context.Context, *SaveBundleRequest) (*SaveBundleResponse, error) {
return nil, status.Error(codes.Unimplemented, "method SaveBundle not implemented")
}
func (UnimplementedBundleServiceServer) GetBundle(context.Context, *GetBundleRequest) (*GetBundleResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetBundle not implemented")
}
func (UnimplementedBundleServiceServer) ListBundles(context.Context, *ListBundlesRequest) (*ListBundlesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListBundles not implemented")
}
func (UnimplementedBundleServiceServer) AddSettingToBundle(context.Context, *AddSettingToBundleRequest) (*AddSettingToBundleResponse, error) {
return nil, status.Error(codes.Unimplemented, "method AddSettingToBundle not implemented")
}
func (UnimplementedBundleServiceServer) RemoveSettingFromBundle(context.Context, *RemoveSettingFromBundleRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method RemoveSettingFromBundle not implemented")
}
func (UnimplementedBundleServiceServer) mustEmbedUnimplementedBundleServiceServer() {}
func (UnimplementedBundleServiceServer) testEmbeddedByValue() {}
// UnsafeBundleServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BundleServiceServer will
// result in compilation errors.
type UnsafeBundleServiceServer interface {
mustEmbedUnimplementedBundleServiceServer()
}
func RegisterBundleServiceServer(s grpc.ServiceRegistrar, srv BundleServiceServer) {
// If the following call panics, it indicates UnimplementedBundleServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&BundleService_ServiceDesc, srv)
}
func _BundleService_SaveBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SaveBundleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BundleServiceServer).SaveBundle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BundleService_SaveBundle_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BundleServiceServer).SaveBundle(ctx, req.(*SaveBundleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BundleService_GetBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetBundleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BundleServiceServer).GetBundle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BundleService_GetBundle_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BundleServiceServer).GetBundle(ctx, req.(*GetBundleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BundleService_ListBundles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListBundlesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BundleServiceServer).ListBundles(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BundleService_ListBundles_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BundleServiceServer).ListBundles(ctx, req.(*ListBundlesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BundleService_AddSettingToBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddSettingToBundleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BundleServiceServer).AddSettingToBundle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BundleService_AddSettingToBundle_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BundleServiceServer).AddSettingToBundle(ctx, req.(*AddSettingToBundleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BundleService_RemoveSettingFromBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RemoveSettingFromBundleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BundleServiceServer).RemoveSettingFromBundle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BundleService_RemoveSettingFromBundle_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BundleServiceServer).RemoveSettingFromBundle(ctx, req.(*RemoveSettingFromBundleRequest))
}
return interceptor(ctx, in, info, handler)
}
// BundleService_ServiceDesc is the grpc.ServiceDesc for BundleService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BundleService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "opencloud.services.settings.v0.BundleService",
HandlerType: (*BundleServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SaveBundle",
Handler: _BundleService_SaveBundle_Handler,
},
{
MethodName: "GetBundle",
Handler: _BundleService_GetBundle_Handler,
},
{
MethodName: "ListBundles",
Handler: _BundleService_ListBundles_Handler,
},
{
MethodName: "AddSettingToBundle",
Handler: _BundleService_AddSettingToBundle_Handler,
},
{
MethodName: "RemoveSettingFromBundle",
Handler: _BundleService_RemoveSettingFromBundle_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "opencloud/services/settings/v0/settings.proto",
}
const (
ValueService_SaveValue_FullMethodName = "/opencloud.services.settings.v0.ValueService/SaveValue"
ValueService_GetValue_FullMethodName = "/opencloud.services.settings.v0.ValueService/GetValue"
ValueService_ListValues_FullMethodName = "/opencloud.services.settings.v0.ValueService/ListValues"
ValueService_GetValueByUniqueIdentifiers_FullMethodName = "/opencloud.services.settings.v0.ValueService/GetValueByUniqueIdentifiers"
)
// ValueServiceClient is the client API for ValueService 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.
type ValueServiceClient interface {
SaveValue(ctx context.Context, in *SaveValueRequest, opts ...grpc.CallOption) (*SaveValueResponse, error)
GetValue(ctx context.Context, in *GetValueRequest, opts ...grpc.CallOption) (*GetValueResponse, error)
ListValues(ctx context.Context, in *ListValuesRequest, opts ...grpc.CallOption) (*ListValuesResponse, error)
GetValueByUniqueIdentifiers(ctx context.Context, in *GetValueByUniqueIdentifiersRequest, opts ...grpc.CallOption) (*GetValueResponse, error)
}
type valueServiceClient struct {
cc grpc.ClientConnInterface
}
func NewValueServiceClient(cc grpc.ClientConnInterface) ValueServiceClient {
return &valueServiceClient{cc}
}
func (c *valueServiceClient) SaveValue(ctx context.Context, in *SaveValueRequest, opts ...grpc.CallOption) (*SaveValueResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SaveValueResponse)
err := c.cc.Invoke(ctx, ValueService_SaveValue_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *valueServiceClient) GetValue(ctx context.Context, in *GetValueRequest, opts ...grpc.CallOption) (*GetValueResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetValueResponse)
err := c.cc.Invoke(ctx, ValueService_GetValue_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *valueServiceClient) ListValues(ctx context.Context, in *ListValuesRequest, opts ...grpc.CallOption) (*ListValuesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListValuesResponse)
err := c.cc.Invoke(ctx, ValueService_ListValues_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *valueServiceClient) GetValueByUniqueIdentifiers(ctx context.Context, in *GetValueByUniqueIdentifiersRequest, opts ...grpc.CallOption) (*GetValueResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetValueResponse)
err := c.cc.Invoke(ctx, ValueService_GetValueByUniqueIdentifiers_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// ValueServiceServer is the server API for ValueService service.
// All implementations must embed UnimplementedValueServiceServer
// for forward compatibility.
type ValueServiceServer interface {
SaveValue(context.Context, *SaveValueRequest) (*SaveValueResponse, error)
GetValue(context.Context, *GetValueRequest) (*GetValueResponse, error)
ListValues(context.Context, *ListValuesRequest) (*ListValuesResponse, error)
GetValueByUniqueIdentifiers(context.Context, *GetValueByUniqueIdentifiersRequest) (*GetValueResponse, error)
mustEmbedUnimplementedValueServiceServer()
}
// UnimplementedValueServiceServer must 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.
type UnimplementedValueServiceServer struct{}
func (UnimplementedValueServiceServer) SaveValue(context.Context, *SaveValueRequest) (*SaveValueResponse, error) {
return nil, status.Error(codes.Unimplemented, "method SaveValue not implemented")
}
func (UnimplementedValueServiceServer) GetValue(context.Context, *GetValueRequest) (*GetValueResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetValue not implemented")
}
func (UnimplementedValueServiceServer) ListValues(context.Context, *ListValuesRequest) (*ListValuesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListValues not implemented")
}
func (UnimplementedValueServiceServer) GetValueByUniqueIdentifiers(context.Context, *GetValueByUniqueIdentifiersRequest) (*GetValueResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetValueByUniqueIdentifiers not implemented")
}
func (UnimplementedValueServiceServer) mustEmbedUnimplementedValueServiceServer() {}
func (UnimplementedValueServiceServer) testEmbeddedByValue() {}
// UnsafeValueServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ValueServiceServer will
// result in compilation errors.
type UnsafeValueServiceServer interface {
mustEmbedUnimplementedValueServiceServer()
}
func RegisterValueServiceServer(s grpc.ServiceRegistrar, srv ValueServiceServer) {
// If the following call panics, it indicates UnimplementedValueServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&ValueService_ServiceDesc, srv)
}
func _ValueService_SaveValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SaveValueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ValueServiceServer).SaveValue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ValueService_SaveValue_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ValueServiceServer).SaveValue(ctx, req.(*SaveValueRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ValueService_GetValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetValueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ValueServiceServer).GetValue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ValueService_GetValue_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ValueServiceServer).GetValue(ctx, req.(*GetValueRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ValueService_ListValues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListValuesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ValueServiceServer).ListValues(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ValueService_ListValues_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ValueServiceServer).ListValues(ctx, req.(*ListValuesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ValueService_GetValueByUniqueIdentifiers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetValueByUniqueIdentifiersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ValueServiceServer).GetValueByUniqueIdentifiers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ValueService_GetValueByUniqueIdentifiers_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ValueServiceServer).GetValueByUniqueIdentifiers(ctx, req.(*GetValueByUniqueIdentifiersRequest))
}
return interceptor(ctx, in, info, handler)
}
// ValueService_ServiceDesc is the grpc.ServiceDesc for ValueService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ValueService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "opencloud.services.settings.v0.ValueService",
HandlerType: (*ValueServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SaveValue",
Handler: _ValueService_SaveValue_Handler,
},
{
MethodName: "GetValue",
Handler: _ValueService_GetValue_Handler,
},
{
MethodName: "ListValues",
Handler: _ValueService_ListValues_Handler,
},
{
MethodName: "GetValueByUniqueIdentifiers",
Handler: _ValueService_GetValueByUniqueIdentifiers_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "opencloud/services/settings/v0/settings.proto",
}
const (
RoleService_ListRoles_FullMethodName = "/opencloud.services.settings.v0.RoleService/ListRoles"
RoleService_ListRoleAssignments_FullMethodName = "/opencloud.services.settings.v0.RoleService/ListRoleAssignments"
RoleService_ListRoleAssignmentsFiltered_FullMethodName = "/opencloud.services.settings.v0.RoleService/ListRoleAssignmentsFiltered"
RoleService_AssignRoleToUser_FullMethodName = "/opencloud.services.settings.v0.RoleService/AssignRoleToUser"
RoleService_RemoveRoleFromUser_FullMethodName = "/opencloud.services.settings.v0.RoleService/RemoveRoleFromUser"
)
// RoleServiceClient is the client API for RoleService 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.
type RoleServiceClient interface {
ListRoles(ctx context.Context, in *ListBundlesRequest, opts ...grpc.CallOption) (*ListBundlesResponse, error)
ListRoleAssignments(ctx context.Context, in *ListRoleAssignmentsRequest, opts ...grpc.CallOption) (*ListRoleAssignmentsResponse, error)
ListRoleAssignmentsFiltered(ctx context.Context, in *ListRoleAssignmentsFilteredRequest, opts ...grpc.CallOption) (*ListRoleAssignmentsResponse, error)
AssignRoleToUser(ctx context.Context, in *AssignRoleToUserRequest, opts ...grpc.CallOption) (*AssignRoleToUserResponse, error)
RemoveRoleFromUser(ctx context.Context, in *RemoveRoleFromUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type roleServiceClient struct {
cc grpc.ClientConnInterface
}
func NewRoleServiceClient(cc grpc.ClientConnInterface) RoleServiceClient {
return &roleServiceClient{cc}
}
func (c *roleServiceClient) ListRoles(ctx context.Context, in *ListBundlesRequest, opts ...grpc.CallOption) (*ListBundlesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListBundlesResponse)
err := c.cc.Invoke(ctx, RoleService_ListRoles_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roleServiceClient) ListRoleAssignments(ctx context.Context, in *ListRoleAssignmentsRequest, opts ...grpc.CallOption) (*ListRoleAssignmentsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListRoleAssignmentsResponse)
err := c.cc.Invoke(ctx, RoleService_ListRoleAssignments_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roleServiceClient) ListRoleAssignmentsFiltered(ctx context.Context, in *ListRoleAssignmentsFilteredRequest, opts ...grpc.CallOption) (*ListRoleAssignmentsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListRoleAssignmentsResponse)
err := c.cc.Invoke(ctx, RoleService_ListRoleAssignmentsFiltered_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roleServiceClient) AssignRoleToUser(ctx context.Context, in *AssignRoleToUserRequest, opts ...grpc.CallOption) (*AssignRoleToUserResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AssignRoleToUserResponse)
err := c.cc.Invoke(ctx, RoleService_AssignRoleToUser_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roleServiceClient) RemoveRoleFromUser(ctx context.Context, in *RemoveRoleFromUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, RoleService_RemoveRoleFromUser_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// RoleServiceServer is the server API for RoleService service.
// All implementations must embed UnimplementedRoleServiceServer
// for forward compatibility.
type RoleServiceServer interface {
ListRoles(context.Context, *ListBundlesRequest) (*ListBundlesResponse, error)
ListRoleAssignments(context.Context, *ListRoleAssignmentsRequest) (*ListRoleAssignmentsResponse, error)
ListRoleAssignmentsFiltered(context.Context, *ListRoleAssignmentsFilteredRequest) (*ListRoleAssignmentsResponse, error)
AssignRoleToUser(context.Context, *AssignRoleToUserRequest) (*AssignRoleToUserResponse, error)
RemoveRoleFromUser(context.Context, *RemoveRoleFromUserRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedRoleServiceServer()
}
// UnimplementedRoleServiceServer must 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.
type UnimplementedRoleServiceServer struct{}
func (UnimplementedRoleServiceServer) ListRoles(context.Context, *ListBundlesRequest) (*ListBundlesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListRoles not implemented")
}
func (UnimplementedRoleServiceServer) ListRoleAssignments(context.Context, *ListRoleAssignmentsRequest) (*ListRoleAssignmentsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListRoleAssignments not implemented")
}
func (UnimplementedRoleServiceServer) ListRoleAssignmentsFiltered(context.Context, *ListRoleAssignmentsFilteredRequest) (*ListRoleAssignmentsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListRoleAssignmentsFiltered not implemented")
}
func (UnimplementedRoleServiceServer) AssignRoleToUser(context.Context, *AssignRoleToUserRequest) (*AssignRoleToUserResponse, error) {
return nil, status.Error(codes.Unimplemented, "method AssignRoleToUser not implemented")
}
func (UnimplementedRoleServiceServer) RemoveRoleFromUser(context.Context, *RemoveRoleFromUserRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method RemoveRoleFromUser not implemented")
}
func (UnimplementedRoleServiceServer) mustEmbedUnimplementedRoleServiceServer() {}
func (UnimplementedRoleServiceServer) testEmbeddedByValue() {}
// UnsafeRoleServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RoleServiceServer will
// result in compilation errors.
type UnsafeRoleServiceServer interface {
mustEmbedUnimplementedRoleServiceServer()
}
func RegisterRoleServiceServer(s grpc.ServiceRegistrar, srv RoleServiceServer) {
// If the following call panics, it indicates UnimplementedRoleServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&RoleService_ServiceDesc, srv)
}
func _RoleService_ListRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListBundlesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RoleServiceServer).ListRoles(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RoleService_ListRoles_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RoleServiceServer).ListRoles(ctx, req.(*ListBundlesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RoleService_ListRoleAssignments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListRoleAssignmentsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RoleServiceServer).ListRoleAssignments(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RoleService_ListRoleAssignments_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RoleServiceServer).ListRoleAssignments(ctx, req.(*ListRoleAssignmentsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RoleService_ListRoleAssignmentsFiltered_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListRoleAssignmentsFilteredRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RoleServiceServer).ListRoleAssignmentsFiltered(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RoleService_ListRoleAssignmentsFiltered_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RoleServiceServer).ListRoleAssignmentsFiltered(ctx, req.(*ListRoleAssignmentsFilteredRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RoleService_AssignRoleToUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AssignRoleToUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RoleServiceServer).AssignRoleToUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RoleService_AssignRoleToUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RoleServiceServer).AssignRoleToUser(ctx, req.(*AssignRoleToUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RoleService_RemoveRoleFromUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RemoveRoleFromUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RoleServiceServer).RemoveRoleFromUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RoleService_RemoveRoleFromUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RoleServiceServer).RemoveRoleFromUser(ctx, req.(*RemoveRoleFromUserRequest))
}
return interceptor(ctx, in, info, handler)
}
// RoleService_ServiceDesc is the grpc.ServiceDesc for RoleService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RoleService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "opencloud.services.settings.v0.RoleService",
HandlerType: (*RoleServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListRoles",
Handler: _RoleService_ListRoles_Handler,
},
{
MethodName: "ListRoleAssignments",
Handler: _RoleService_ListRoleAssignments_Handler,
},
{
MethodName: "ListRoleAssignmentsFiltered",
Handler: _RoleService_ListRoleAssignmentsFiltered_Handler,
},
{
MethodName: "AssignRoleToUser",
Handler: _RoleService_AssignRoleToUser_Handler,
},
{
MethodName: "RemoveRoleFromUser",
Handler: _RoleService_RemoveRoleFromUser_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "opencloud/services/settings/v0/settings.proto",
}
const (
PermissionService_ListPermissions_FullMethodName = "/opencloud.services.settings.v0.PermissionService/ListPermissions"
PermissionService_ListPermissionsByResource_FullMethodName = "/opencloud.services.settings.v0.PermissionService/ListPermissionsByResource"
PermissionService_GetPermissionByID_FullMethodName = "/opencloud.services.settings.v0.PermissionService/GetPermissionByID"
)
// PermissionServiceClient is the client API for PermissionService 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.
type PermissionServiceClient interface {
ListPermissions(ctx context.Context, in *ListPermissionsRequest, opts ...grpc.CallOption) (*ListPermissionsResponse, error)
ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, opts ...grpc.CallOption) (*ListPermissionsByResourceResponse, error)
GetPermissionByID(ctx context.Context, in *GetPermissionByIDRequest, opts ...grpc.CallOption) (*GetPermissionByIDResponse, error)
}
type permissionServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPermissionServiceClient(cc grpc.ClientConnInterface) PermissionServiceClient {
return &permissionServiceClient{cc}
}
func (c *permissionServiceClient) ListPermissions(ctx context.Context, in *ListPermissionsRequest, opts ...grpc.CallOption) (*ListPermissionsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListPermissionsResponse)
err := c.cc.Invoke(ctx, PermissionService_ListPermissions_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *permissionServiceClient) ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, opts ...grpc.CallOption) (*ListPermissionsByResourceResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListPermissionsByResourceResponse)
err := c.cc.Invoke(ctx, PermissionService_ListPermissionsByResource_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *permissionServiceClient) GetPermissionByID(ctx context.Context, in *GetPermissionByIDRequest, opts ...grpc.CallOption) (*GetPermissionByIDResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPermissionByIDResponse)
err := c.cc.Invoke(ctx, PermissionService_GetPermissionByID_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// PermissionServiceServer is the server API for PermissionService service.
// All implementations must embed UnimplementedPermissionServiceServer
// for forward compatibility.
type PermissionServiceServer interface {
ListPermissions(context.Context, *ListPermissionsRequest) (*ListPermissionsResponse, error)
ListPermissionsByResource(context.Context, *ListPermissionsByResourceRequest) (*ListPermissionsByResourceResponse, error)
GetPermissionByID(context.Context, *GetPermissionByIDRequest) (*GetPermissionByIDResponse, error)
mustEmbedUnimplementedPermissionServiceServer()
}
// UnimplementedPermissionServiceServer must 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.
type UnimplementedPermissionServiceServer struct{}
func (UnimplementedPermissionServiceServer) ListPermissions(context.Context, *ListPermissionsRequest) (*ListPermissionsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListPermissions not implemented")
}
func (UnimplementedPermissionServiceServer) ListPermissionsByResource(context.Context, *ListPermissionsByResourceRequest) (*ListPermissionsByResourceResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListPermissionsByResource not implemented")
}
func (UnimplementedPermissionServiceServer) GetPermissionByID(context.Context, *GetPermissionByIDRequest) (*GetPermissionByIDResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetPermissionByID not implemented")
}
func (UnimplementedPermissionServiceServer) mustEmbedUnimplementedPermissionServiceServer() {}
func (UnimplementedPermissionServiceServer) testEmbeddedByValue() {}
// UnsafePermissionServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PermissionServiceServer will
// result in compilation errors.
type UnsafePermissionServiceServer interface {
mustEmbedUnimplementedPermissionServiceServer()
}
func RegisterPermissionServiceServer(s grpc.ServiceRegistrar, srv PermissionServiceServer) {
// If the following call panics, it indicates UnimplementedPermissionServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&PermissionService_ServiceDesc, srv)
}
func _PermissionService_ListPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListPermissionsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PermissionServiceServer).ListPermissions(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PermissionService_ListPermissions_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PermissionServiceServer).ListPermissions(ctx, req.(*ListPermissionsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PermissionService_ListPermissionsByResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListPermissionsByResourceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PermissionServiceServer).ListPermissionsByResource(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PermissionService_ListPermissionsByResource_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PermissionServiceServer).ListPermissionsByResource(ctx, req.(*ListPermissionsByResourceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PermissionService_GetPermissionByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPermissionByIDRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PermissionServiceServer).GetPermissionByID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PermissionService_GetPermissionByID_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PermissionServiceServer).GetPermissionByID(ctx, req.(*GetPermissionByIDRequest))
}
return interceptor(ctx, in, info, handler)
}
// PermissionService_ServiceDesc is the grpc.ServiceDesc for PermissionService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PermissionService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "opencloud.services.settings.v0.PermissionService",
HandlerType: (*PermissionServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListPermissions",
Handler: _PermissionService_ListPermissions_Handler,
},
{
MethodName: "ListPermissionsByResource",
Handler: _PermissionService_ListPermissionsByResource_Handler,
},
{
MethodName: "GetPermissionByID",
Handler: _PermissionService_GetPermissionByID_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "opencloud/services/settings/v0/settings.proto",
}
@@ -0,0 +1,315 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc (unknown)
// source: opencloud/services/store/v0/store.proto
package v0
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Store_Read_FullMethodName = "/opencloud.services.store.v0.Store/Read"
Store_Write_FullMethodName = "/opencloud.services.store.v0.Store/Write"
Store_Delete_FullMethodName = "/opencloud.services.store.v0.Store/Delete"
Store_List_FullMethodName = "/opencloud.services.store.v0.Store/List"
Store_Databases_FullMethodName = "/opencloud.services.store.v0.Store/Databases"
Store_Tables_FullMethodName = "/opencloud.services.store.v0.Store/Tables"
)
// StoreClient is the client API for Store 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.
type StoreClient interface {
Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error)
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListResponse], error)
Databases(ctx context.Context, in *DatabasesRequest, opts ...grpc.CallOption) (*DatabasesResponse, error)
Tables(ctx context.Context, in *TablesRequest, opts ...grpc.CallOption) (*TablesResponse, error)
}
type storeClient struct {
cc grpc.ClientConnInterface
}
func NewStoreClient(cc grpc.ClientConnInterface) StoreClient {
return &storeClient{cc}
}
func (c *storeClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ReadResponse)
err := c.cc.Invoke(ctx, Store_Read_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *storeClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(WriteResponse)
err := c.cc.Invoke(ctx, Store_Write_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *storeClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DeleteResponse)
err := c.cc.Invoke(ctx, Store_Delete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *storeClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListResponse], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &Store_ServiceDesc.Streams[0], Store_List_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[ListRequest, ListResponse]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Store_ListClient = grpc.ServerStreamingClient[ListResponse]
func (c *storeClient) Databases(ctx context.Context, in *DatabasesRequest, opts ...grpc.CallOption) (*DatabasesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DatabasesResponse)
err := c.cc.Invoke(ctx, Store_Databases_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *storeClient) Tables(ctx context.Context, in *TablesRequest, opts ...grpc.CallOption) (*TablesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(TablesResponse)
err := c.cc.Invoke(ctx, Store_Tables_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// StoreServer is the server API for Store service.
// All implementations must embed UnimplementedStoreServer
// for forward compatibility.
type StoreServer interface {
Read(context.Context, *ReadRequest) (*ReadResponse, error)
Write(context.Context, *WriteRequest) (*WriteResponse, error)
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
List(*ListRequest, grpc.ServerStreamingServer[ListResponse]) error
Databases(context.Context, *DatabasesRequest) (*DatabasesResponse, error)
Tables(context.Context, *TablesRequest) (*TablesResponse, error)
mustEmbedUnimplementedStoreServer()
}
// UnimplementedStoreServer must 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.
type UnimplementedStoreServer struct{}
func (UnimplementedStoreServer) Read(context.Context, *ReadRequest) (*ReadResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Read not implemented")
}
func (UnimplementedStoreServer) Write(context.Context, *WriteRequest) (*WriteResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Write not implemented")
}
func (UnimplementedStoreServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedStoreServer) List(*ListRequest, grpc.ServerStreamingServer[ListResponse]) error {
return status.Error(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedStoreServer) Databases(context.Context, *DatabasesRequest) (*DatabasesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Databases not implemented")
}
func (UnimplementedStoreServer) Tables(context.Context, *TablesRequest) (*TablesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Tables not implemented")
}
func (UnimplementedStoreServer) mustEmbedUnimplementedStoreServer() {}
func (UnimplementedStoreServer) testEmbeddedByValue() {}
// UnsafeStoreServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to StoreServer will
// result in compilation errors.
type UnsafeStoreServer interface {
mustEmbedUnimplementedStoreServer()
}
func RegisterStoreServer(s grpc.ServiceRegistrar, srv StoreServer) {
// If the following call panics, it indicates UnimplementedStoreServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Store_ServiceDesc, srv)
}
func _Store_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReadRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StoreServer).Read(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Store_Read_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StoreServer).Read(ctx, req.(*ReadRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Store_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(WriteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StoreServer).Write(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Store_Write_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StoreServer).Write(ctx, req.(*WriteRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Store_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StoreServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Store_Delete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StoreServer).Delete(ctx, req.(*DeleteRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Store_List_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(ListRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(StoreServer).List(m, &grpc.GenericServerStream[ListRequest, ListResponse]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Store_ListServer = grpc.ServerStreamingServer[ListResponse]
func _Store_Databases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DatabasesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StoreServer).Databases(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Store_Databases_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StoreServer).Databases(ctx, req.(*DatabasesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Store_Tables_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TablesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StoreServer).Tables(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Store_Tables_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StoreServer).Tables(ctx, req.(*TablesRequest))
}
return interceptor(ctx, in, info, handler)
}
// Store_ServiceDesc is the grpc.ServiceDesc for Store service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Store_ServiceDesc = grpc.ServiceDesc{
ServiceName: "opencloud.services.store.v0.Store",
HandlerType: (*StoreServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Read",
Handler: _Store_Read_Handler,
},
{
MethodName: "Write",
Handler: _Store_Write_Handler,
},
{
MethodName: "Delete",
Handler: _Store_Delete_Handler,
},
{
MethodName: "Databases",
Handler: _Store_Databases_Handler,
},
{
MethodName: "Tables",
Handler: _Store_Tables_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "List",
Handler: _Store_List_Handler,
ServerStreams: true,
},
},
Metadata: "opencloud/services/store/v0/store.proto",
}
@@ -0,0 +1,127 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc (unknown)
// source: opencloud/services/thumbnails/v0/thumbnails.proto
package v0
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
ThumbnailService_GetThumbnail_FullMethodName = "/opencloud.services.thumbnails.v0.ThumbnailService/GetThumbnail"
)
// ThumbnailServiceClient is the client API for ThumbnailService 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.
//
// A Service for handling thumbnail generation
type ThumbnailServiceClient interface {
// Generates the thumbnail and returns it.
GetThumbnail(ctx context.Context, in *GetThumbnailRequest, opts ...grpc.CallOption) (*GetThumbnailResponse, error)
}
type thumbnailServiceClient struct {
cc grpc.ClientConnInterface
}
func NewThumbnailServiceClient(cc grpc.ClientConnInterface) ThumbnailServiceClient {
return &thumbnailServiceClient{cc}
}
func (c *thumbnailServiceClient) GetThumbnail(ctx context.Context, in *GetThumbnailRequest, opts ...grpc.CallOption) (*GetThumbnailResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetThumbnailResponse)
err := c.cc.Invoke(ctx, ThumbnailService_GetThumbnail_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// ThumbnailServiceServer is the server API for ThumbnailService service.
// All implementations must embed UnimplementedThumbnailServiceServer
// for forward compatibility.
//
// A Service for handling thumbnail generation
type ThumbnailServiceServer interface {
// Generates the thumbnail and returns it.
GetThumbnail(context.Context, *GetThumbnailRequest) (*GetThumbnailResponse, error)
mustEmbedUnimplementedThumbnailServiceServer()
}
// UnimplementedThumbnailServiceServer must 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.
type UnimplementedThumbnailServiceServer struct{}
func (UnimplementedThumbnailServiceServer) GetThumbnail(context.Context, *GetThumbnailRequest) (*GetThumbnailResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetThumbnail not implemented")
}
func (UnimplementedThumbnailServiceServer) mustEmbedUnimplementedThumbnailServiceServer() {}
func (UnimplementedThumbnailServiceServer) testEmbeddedByValue() {}
// UnsafeThumbnailServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ThumbnailServiceServer will
// result in compilation errors.
type UnsafeThumbnailServiceServer interface {
mustEmbedUnimplementedThumbnailServiceServer()
}
func RegisterThumbnailServiceServer(s grpc.ServiceRegistrar, srv ThumbnailServiceServer) {
// If the following call panics, it indicates UnimplementedThumbnailServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&ThumbnailService_ServiceDesc, srv)
}
func _ThumbnailService_GetThumbnail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetThumbnailRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ThumbnailServiceServer).GetThumbnail(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ThumbnailService_GetThumbnail_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ThumbnailServiceServer).GetThumbnail(ctx, req.(*GetThumbnailRequest))
}
return interceptor(ctx, in, info, handler)
}
// ThumbnailService_ServiceDesc is the grpc.ServiceDesc for ThumbnailService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ThumbnailService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "opencloud.services.thumbnails.v0.ThumbnailService",
HandlerType: (*ThumbnailServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetThumbnail",
Handler: _ThumbnailService_GetThumbnail_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "opencloud/services/thumbnails/v0/thumbnails.proto",
}
+6
View File
@@ -6,6 +6,12 @@ plugins:
opt:
- paths=source_relative
- name: go-grpc
path: ../../.bingo/protoc-gen-go-grpc
out: ../gen/
opt:
- paths=source_relative
- name: micro
path: ../../.bingo/protoc-gen-micro
out: ../gen/