You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
142 lines
5.1 KiB
142 lines
5.1 KiB
4 years ago
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||
|
|
||
4 years ago
|
package metadata
|
||
4 years ago
|
|
||
|
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.32.0 or later.
|
||
|
const _ = grpc.SupportPackageIsVersion7
|
||
|
|
||
|
// MetadataClient is the client API for Metadata 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 MetadataClient interface {
|
||
4 years ago
|
// ListServices list the full name of all services.
|
||
|
ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesReply, error)
|
||
|
// GetServiceDesc get the full fileDescriptorSet of service.
|
||
|
GetServiceDesc(ctx context.Context, in *GetServiceDescRequest, opts ...grpc.CallOption) (*GetServiceDescReply, error)
|
||
4 years ago
|
}
|
||
|
|
||
|
type metadataClient struct {
|
||
|
cc grpc.ClientConnInterface
|
||
|
}
|
||
|
|
||
|
func NewMetadataClient(cc grpc.ClientConnInterface) MetadataClient {
|
||
|
return &metadataClient{cc}
|
||
|
}
|
||
|
|
||
4 years ago
|
func (c *metadataClient) ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesReply, error) {
|
||
4 years ago
|
out := new(ListServicesReply)
|
||
|
err := c.cc.Invoke(ctx, "/kratos.api.Metadata/ListServices", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
4 years ago
|
func (c *metadataClient) GetServiceDesc(ctx context.Context, in *GetServiceDescRequest, opts ...grpc.CallOption) (*GetServiceDescReply, error) {
|
||
|
out := new(GetServiceDescReply)
|
||
|
err := c.cc.Invoke(ctx, "/kratos.api.Metadata/GetServiceDesc", in, out, opts...)
|
||
4 years ago
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
// MetadataServer is the server API for Metadata service.
|
||
|
// All implementations must embed UnimplementedMetadataServer
|
||
|
// for forward compatibility
|
||
|
type MetadataServer interface {
|
||
4 years ago
|
// ListServices list the full name of all services.
|
||
|
ListServices(context.Context, *ListServicesRequest) (*ListServicesReply, error)
|
||
|
// GetServiceDesc get the full fileDescriptorSet of service.
|
||
|
GetServiceDesc(context.Context, *GetServiceDescRequest) (*GetServiceDescReply, error)
|
||
4 years ago
|
mustEmbedUnimplementedMetadataServer()
|
||
|
}
|
||
|
|
||
|
// UnimplementedMetadataServer must be embedded to have forward compatible implementations.
|
||
|
type UnimplementedMetadataServer struct {
|
||
|
}
|
||
|
|
||
4 years ago
|
func (UnimplementedMetadataServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesReply, error) {
|
||
4 years ago
|
return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented")
|
||
|
}
|
||
4 years ago
|
func (UnimplementedMetadataServer) GetServiceDesc(context.Context, *GetServiceDescRequest) (*GetServiceDescReply, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetServiceDesc not implemented")
|
||
4 years ago
|
}
|
||
|
func (UnimplementedMetadataServer) mustEmbedUnimplementedMetadataServer() {}
|
||
|
|
||
|
// UnsafeMetadataServer may be embedded to opt out of forward compatibility for this service.
|
||
|
// Use of this interface is not recommended, as added methods to MetadataServer will
|
||
|
// result in compilation errors.
|
||
|
type UnsafeMetadataServer interface {
|
||
|
mustEmbedUnimplementedMetadataServer()
|
||
|
}
|
||
|
|
||
|
func RegisterMetadataServer(s grpc.ServiceRegistrar, srv MetadataServer) {
|
||
|
s.RegisterService(&Metadata_ServiceDesc, srv)
|
||
|
}
|
||
|
|
||
|
func _Metadata_ListServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
4 years ago
|
in := new(ListServicesRequest)
|
||
4 years ago
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(MetadataServer).ListServices(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/kratos.api.Metadata/ListServices",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
4 years ago
|
return srv.(MetadataServer).ListServices(ctx, req.(*ListServicesRequest))
|
||
4 years ago
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
4 years ago
|
func _Metadata_GetServiceDesc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(GetServiceDescRequest)
|
||
4 years ago
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
4 years ago
|
return srv.(MetadataServer).GetServiceDesc(ctx, in)
|
||
4 years ago
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
4 years ago
|
FullMethod: "/kratos.api.Metadata/GetServiceDesc",
|
||
4 years ago
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
4 years ago
|
return srv.(MetadataServer).GetServiceDesc(ctx, req.(*GetServiceDescRequest))
|
||
4 years ago
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
// Metadata_ServiceDesc is the grpc.ServiceDesc for Metadata service.
|
||
|
// It's only intended for direct use with grpc.RegisterService,
|
||
|
// and not to be introspected or modified (even as a copy)
|
||
|
var Metadata_ServiceDesc = grpc.ServiceDesc{
|
||
|
ServiceName: "kratos.api.Metadata",
|
||
|
HandlerType: (*MetadataServer)(nil),
|
||
|
Methods: []grpc.MethodDesc{
|
||
|
{
|
||
|
MethodName: "ListServices",
|
||
|
Handler: _Metadata_ListServices_Handler,
|
||
|
},
|
||
|
{
|
||
4 years ago
|
MethodName: "GetServiceDesc",
|
||
|
Handler: _Metadata_GetServiceDesc_Handler,
|
||
4 years ago
|
},
|
||
|
},
|
||
|
Streams: []grpc.StreamDesc{},
|
||
4 years ago
|
Metadata: "metadata.proto",
|
||
4 years ago
|
}
|