Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Datamock_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.datamock", HandlerType: (*DatamockServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetMockUserData", Handler: _Datamock_GetMockUserData_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/datamock.proto", }
Datamock_ServiceDesc is the grpc.ServiceDesc for Datamock service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_datamock_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDatamockServer ¶
func RegisterDatamockServer(s grpc.ServiceRegistrar, srv DatamockServer)
Types ¶
type DatamockClient ¶
type DatamockClient interface {
GetMockUserData(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*User, error)
}
DatamockClient is the client API for Datamock 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 NewDatamockClient ¶
func NewDatamockClient(cc grpc.ClientConnInterface) DatamockClient
type DatamockServer ¶
type DatamockServer interface { GetMockUserData(context.Context, *NameRequest) (*User, error) // contains filtered or unexported methods }
DatamockServer is the server API for Datamock service. All implementations must embed UnimplementedDatamockServer for forward compatibility
type NameRequest ¶
type NameRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*NameRequest) Descriptor
deprecated
func (*NameRequest) Descriptor() ([]byte, []int)
Deprecated: Use NameRequest.ProtoReflect.Descriptor instead.
func (*NameRequest) GetName ¶
func (x *NameRequest) GetName() string
func (*NameRequest) ProtoMessage ¶
func (*NameRequest) ProtoMessage()
func (*NameRequest) ProtoReflect ¶
func (x *NameRequest) ProtoReflect() protoreflect.Message
func (*NameRequest) Reset ¶
func (x *NameRequest) Reset()
func (*NameRequest) String ¶
func (x *NameRequest) String() string
type UnimplementedDatamockServer ¶
type UnimplementedDatamockServer struct { }
UnimplementedDatamockServer must be embedded to have forward compatible implementations.
func (UnimplementedDatamockServer) GetMockUserData ¶
func (UnimplementedDatamockServer) GetMockUserData(context.Context, *NameRequest) (*User, error)
type UnsafeDatamockServer ¶
type UnsafeDatamockServer interface {
// contains filtered or unexported methods
}
UnsafeDatamockServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DatamockServer will result in compilation errors.
type User ¶
type User struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Class string `protobuf:"bytes,2,opt,name=class,proto3" json:"class,omitempty"` Roll int64 `protobuf:"varint,3,opt,name=roll,proto3" json:"roll,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message