Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterDefaultModelServiceServer(s grpc.ServiceRegistrar, srv DefaultModelServiceServer)
- type DefaultModel
- func (*DefaultModel) Descriptor() ([]byte, []int)deprecated
- func (x *DefaultModel) GetID() string
- func (x *DefaultModel) GetName() string
- func (*DefaultModel) ProtoMessage()
- func (x *DefaultModel) ProtoReflect() protoreflect.Message
- func (x *DefaultModel) Reset()
- func (x *DefaultModel) String() string
- type DefaultModelServiceClient
- type DefaultModelServiceImpl
- type DefaultModelServiceServer
- type ReadDefaultModelRequest
- func (*ReadDefaultModelRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReadDefaultModelRequest) GetID() string
- func (*ReadDefaultModelRequest) ProtoMessage()
- func (x *ReadDefaultModelRequest) ProtoReflect() protoreflect.Message
- func (x *ReadDefaultModelRequest) Reset()
- func (x *ReadDefaultModelRequest) String() string
- type ReadManyDefaultModelRequest
- func (*ReadManyDefaultModelRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReadManyDefaultModelRequest) GetID() string
- func (*ReadManyDefaultModelRequest) ProtoMessage()
- func (x *ReadManyDefaultModelRequest) ProtoReflect() protoreflect.Message
- func (x *ReadManyDefaultModelRequest) Reset()
- func (x *ReadManyDefaultModelRequest) String() string
- type ReadManyDefaultModelResponse
- func (*ReadManyDefaultModelResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ReadManyDefaultModelResponse) GetItems() *DefaultModel
- func (*ReadManyDefaultModelResponse) ProtoMessage()
- func (x *ReadManyDefaultModelResponse) ProtoReflect() protoreflect.Message
- func (x *ReadManyDefaultModelResponse) Reset()
- func (x *ReadManyDefaultModelResponse) String() string
- type UnimplementedDefaultModelServiceServer
- type UnsafeDefaultModelServiceServer
Constants ¶
const (
DefaultModelService_ReadDefaultModel_FullMethodName = "/grpc.DefaultModelService/ReadDefaultModel"
)
Variables ¶
var DefaultModelService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc.DefaultModelService", HandlerType: (*DefaultModelServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ReadDefaultModel", Handler: _DefaultModelService_ReadDefaultModel_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "default_model_gen.proto", }
DefaultModelService_ServiceDesc is the grpc.ServiceDesc for DefaultModelService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_default_model_gen_proto protoreflect.FileDescriptor
var Module = fx.Module( "grpc", fx.Provide( New, ), fx.Invoke( func( impl *DefaultModelServiceImpl, logger *zap.Logger, grpcCfg config.GRPC, ) { srv := grpc.NewServer() RegisterDefaultModelServiceServer(srv, impl) listener, err := net.Listen("tcp", grpcCfg.HTTP.Addr+":"+grpcCfg.HTTP.Port) if err != nil { logger.Fatal("failed to listen", zap.Error(err)) } err = srv.Serve(listener) }, ), )
Functions ¶
func RegisterDefaultModelServiceServer ¶
func RegisterDefaultModelServiceServer(s grpc.ServiceRegistrar, srv DefaultModelServiceServer)
Types ¶
type DefaultModel ¶
type DefaultModel struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` // contains filtered or unexported fields }
func NewDefaultModel ¶
func NewDefaultModel(v service.DefaultModel) DefaultModel
func (*DefaultModel) Descriptor
deprecated
func (*DefaultModel) Descriptor() ([]byte, []int)
Deprecated: Use DefaultModel.ProtoReflect.Descriptor instead.
func (*DefaultModel) GetID ¶
func (x *DefaultModel) GetID() string
func (*DefaultModel) GetName ¶
func (x *DefaultModel) GetName() string
func (*DefaultModel) ProtoMessage ¶
func (*DefaultModel) ProtoMessage()
func (*DefaultModel) ProtoReflect ¶
func (x *DefaultModel) ProtoReflect() protoreflect.Message
func (*DefaultModel) Reset ¶
func (x *DefaultModel) Reset()
func (*DefaultModel) String ¶
func (x *DefaultModel) String() string
type DefaultModelServiceClient ¶
type DefaultModelServiceClient interface {
ReadDefaultModel(ctx context.Context, in *ReadDefaultModelRequest, opts ...grpc.CallOption) (*DefaultModel, error)
}
DefaultModelServiceClient is the client API for DefaultModelService 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 NewDefaultModelServiceClient ¶
func NewDefaultModelServiceClient(cc grpc.ClientConnInterface) DefaultModelServiceClient
type DefaultModelServiceImpl ¶
type DefaultModelServiceImpl struct { UnimplementedDefaultModelServiceServer // contains filtered or unexported fields }
func New ¶
func New(srvc *service.Service) *DefaultModelServiceImpl
func (*DefaultModelServiceImpl) ReadDefaultModel ¶
func (s *DefaultModelServiceImpl) ReadDefaultModel(ctx context.Context, r *ReadDefaultModelRequest) (*DefaultModel, error)
type DefaultModelServiceServer ¶
type DefaultModelServiceServer interface { ReadDefaultModel(context.Context, *ReadDefaultModelRequest) (*DefaultModel, error) // contains filtered or unexported methods }
DefaultModelServiceServer is the server API for DefaultModelService service. All implementations must embed UnimplementedDefaultModelServiceServer for forward compatibility
type ReadDefaultModelRequest ¶
type ReadDefaultModelRequest struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` // contains filtered or unexported fields }
func (*ReadDefaultModelRequest) Descriptor
deprecated
func (*ReadDefaultModelRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadDefaultModelRequest.ProtoReflect.Descriptor instead.
func (*ReadDefaultModelRequest) GetID ¶
func (x *ReadDefaultModelRequest) GetID() string
func (*ReadDefaultModelRequest) ProtoMessage ¶
func (*ReadDefaultModelRequest) ProtoMessage()
func (*ReadDefaultModelRequest) ProtoReflect ¶
func (x *ReadDefaultModelRequest) ProtoReflect() protoreflect.Message
func (*ReadDefaultModelRequest) Reset ¶
func (x *ReadDefaultModelRequest) Reset()
func (*ReadDefaultModelRequest) String ¶
func (x *ReadDefaultModelRequest) String() string
type ReadManyDefaultModelRequest ¶
type ReadManyDefaultModelRequest struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` // contains filtered or unexported fields }
func (*ReadManyDefaultModelRequest) Descriptor
deprecated
func (*ReadManyDefaultModelRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadManyDefaultModelRequest.ProtoReflect.Descriptor instead.
func (*ReadManyDefaultModelRequest) GetID ¶
func (x *ReadManyDefaultModelRequest) GetID() string
func (*ReadManyDefaultModelRequest) ProtoMessage ¶
func (*ReadManyDefaultModelRequest) ProtoMessage()
func (*ReadManyDefaultModelRequest) ProtoReflect ¶
func (x *ReadManyDefaultModelRequest) ProtoReflect() protoreflect.Message
func (*ReadManyDefaultModelRequest) Reset ¶
func (x *ReadManyDefaultModelRequest) Reset()
func (*ReadManyDefaultModelRequest) String ¶
func (x *ReadManyDefaultModelRequest) String() string
type ReadManyDefaultModelResponse ¶
type ReadManyDefaultModelResponse struct { Items *DefaultModel `protobuf:"bytes,1,opt,name=Items,proto3" json:"Items,omitempty"` // contains filtered or unexported fields }
func (*ReadManyDefaultModelResponse) Descriptor
deprecated
func (*ReadManyDefaultModelResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadManyDefaultModelResponse.ProtoReflect.Descriptor instead.
func (*ReadManyDefaultModelResponse) GetItems ¶
func (x *ReadManyDefaultModelResponse) GetItems() *DefaultModel
func (*ReadManyDefaultModelResponse) ProtoMessage ¶
func (*ReadManyDefaultModelResponse) ProtoMessage()
func (*ReadManyDefaultModelResponse) ProtoReflect ¶
func (x *ReadManyDefaultModelResponse) ProtoReflect() protoreflect.Message
func (*ReadManyDefaultModelResponse) Reset ¶
func (x *ReadManyDefaultModelResponse) Reset()
func (*ReadManyDefaultModelResponse) String ¶
func (x *ReadManyDefaultModelResponse) String() string
type UnimplementedDefaultModelServiceServer ¶
type UnimplementedDefaultModelServiceServer struct { }
UnimplementedDefaultModelServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedDefaultModelServiceServer) ReadDefaultModel ¶
func (UnimplementedDefaultModelServiceServer) ReadDefaultModel(context.Context, *ReadDefaultModelRequest) (*DefaultModel, error)
type UnsafeDefaultModelServiceServer ¶
type UnsafeDefaultModelServiceServer interface {
// contains filtered or unexported methods
}
UnsafeDefaultModelServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DefaultModelServiceServer will result in compilation errors.