Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterUserHTTPServer(s *http.Server, srv UserHTTPServer)
- func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
- type UnimplementedUserServer
- type UnsafeUserServer
- type UserClient
- type UserCreateResponse
- type UserHTTPClient
- type UserHTTPClientImpl
- type UserHTTPServer
- type UserQueryResponse
- func (*UserQueryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserQueryResponse) GetData() []*structpb.Struct
- func (x *UserQueryResponse) GetMeta() *UserQueryResponseMeta
- func (*UserQueryResponse) ProtoMessage()
- func (x *UserQueryResponse) ProtoReflect() protoreflect.Message
- func (x *UserQueryResponse) Reset()
- func (x *UserQueryResponse) String() string
- type UserQueryResponseMeta
- func (*UserQueryResponseMeta) Descriptor() ([]byte, []int)deprecated
- func (x *UserQueryResponseMeta) GetCount() int64
- func (*UserQueryResponseMeta) ProtoMessage()
- func (x *UserQueryResponseMeta) ProtoReflect() protoreflect.Message
- func (x *UserQueryResponseMeta) Reset()
- func (x *UserQueryResponseMeta) String() string
- type UserServer
Constants ¶
const OperationUserCreate = "/user.v1.User/Create"
const OperationUserQuery = "/user.v1.User/Query"
Variables ¶
var File_user_v1_user_gen_proto protoreflect.FileDescriptor
var User_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.v1.User", HandlerType: (*UserServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _User_Create_Handler, }, { MethodName: "Query", Handler: _User_Query_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/v1/user_gen.proto", }
User_ServiceDesc is the grpc.ServiceDesc for User service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserHTTPServer ¶
func RegisterUserHTTPServer(s *http.Server, srv UserHTTPServer)
func RegisterUserServer ¶
func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
Types ¶
type UnimplementedUserServer ¶
type UnimplementedUserServer struct { }
UnimplementedUserServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServer) Create ¶
func (UnimplementedUserServer) Create(context.Context, *structpb.Struct) (*UserCreateResponse, error)
func (UnimplementedUserServer) Query ¶
func (UnimplementedUserServer) Query(context.Context, *api.QueryRequest) (*UserQueryResponse, error)
type UnsafeUserServer ¶
type UnsafeUserServer interface {
// contains filtered or unexported methods
}
UnsafeUserServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServer will result in compilation errors.
type UserClient ¶
type UserClient interface { Create(ctx context.Context, in *structpb.Struct, opts ...grpc.CallOption) (*UserCreateResponse, error) Query(ctx context.Context, in *api.QueryRequest, opts ...grpc.CallOption) (*UserQueryResponse, error) }
UserClient is the client API for User 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 NewUserClient ¶
func NewUserClient(cc grpc.ClientConnInterface) UserClient
type UserCreateResponse ¶
type UserCreateResponse struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*UserCreateResponse) Descriptor
deprecated
func (*UserCreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserCreateResponse.ProtoReflect.Descriptor instead.
func (*UserCreateResponse) GetId ¶
func (x *UserCreateResponse) GetId() int32
func (*UserCreateResponse) ProtoMessage ¶
func (*UserCreateResponse) ProtoMessage()
func (*UserCreateResponse) ProtoReflect ¶
func (x *UserCreateResponse) ProtoReflect() protoreflect.Message
func (*UserCreateResponse) Reset ¶
func (x *UserCreateResponse) Reset()
func (*UserCreateResponse) String ¶
func (x *UserCreateResponse) String() string
type UserHTTPClient ¶
type UserHTTPClient interface { Create(ctx context.Context, req *structpb.Struct, opts ...http.CallOption) (rsp *UserCreateResponse, err error) Query(ctx context.Context, req *api.QueryRequest, opts ...http.CallOption) (rsp *UserQueryResponse, err error) }
func NewUserHTTPClient ¶
func NewUserHTTPClient(client *http.Client) UserHTTPClient
type UserHTTPClientImpl ¶
type UserHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*UserHTTPClientImpl) Create ¶
func (c *UserHTTPClientImpl) Create(ctx context.Context, in *structpb.Struct, opts ...http.CallOption) (*UserCreateResponse, error)
func (*UserHTTPClientImpl) Query ¶
func (c *UserHTTPClientImpl) Query(ctx context.Context, in *api.QueryRequest, opts ...http.CallOption) (*UserQueryResponse, error)
type UserHTTPServer ¶
type UserHTTPServer interface { Create(context.Context, *structpb.Struct) (*UserCreateResponse, error) Query(context.Context, *api.QueryRequest) (*UserQueryResponse, error) }
type UserQueryResponse ¶
type UserQueryResponse struct { Meta *UserQueryResponseMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` Data []*structpb.Struct `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*UserQueryResponse) Descriptor
deprecated
func (*UserQueryResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserQueryResponse.ProtoReflect.Descriptor instead.
func (*UserQueryResponse) GetData ¶
func (x *UserQueryResponse) GetData() []*structpb.Struct
func (*UserQueryResponse) GetMeta ¶
func (x *UserQueryResponse) GetMeta() *UserQueryResponseMeta
func (*UserQueryResponse) ProtoMessage ¶
func (*UserQueryResponse) ProtoMessage()
func (*UserQueryResponse) ProtoReflect ¶
func (x *UserQueryResponse) ProtoReflect() protoreflect.Message
func (*UserQueryResponse) Reset ¶
func (x *UserQueryResponse) Reset()
func (*UserQueryResponse) String ¶
func (x *UserQueryResponse) String() string
type UserQueryResponseMeta ¶
type UserQueryResponseMeta struct { Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*UserQueryResponseMeta) Descriptor
deprecated
func (*UserQueryResponseMeta) Descriptor() ([]byte, []int)
Deprecated: Use UserQueryResponseMeta.ProtoReflect.Descriptor instead.
func (*UserQueryResponseMeta) GetCount ¶
func (x *UserQueryResponseMeta) GetCount() int64
func (*UserQueryResponseMeta) ProtoMessage ¶
func (*UserQueryResponseMeta) ProtoMessage()
func (*UserQueryResponseMeta) ProtoReflect ¶
func (x *UserQueryResponseMeta) ProtoReflect() protoreflect.Message
func (*UserQueryResponseMeta) Reset ¶
func (x *UserQueryResponseMeta) Reset()
func (*UserQueryResponseMeta) String ¶
func (x *UserQueryResponseMeta) String() string
type UserServer ¶
type UserServer interface { Create(context.Context, *structpb.Struct) (*UserCreateResponse, error) Query(context.Context, *api.QueryRequest) (*UserQueryResponse, error) // contains filtered or unexported methods }
UserServer is the server API for User service. All implementations must embed UnimplementedUserServer for forward compatibility