user

package
v0.0.0-...-9971990 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	User_Insert_FullMethodName = "/user.User/Insert"
	User_Query_FullMethodName  = "/user.User/Query"
	User_Delete_FullMethodName = "/user.User/Delete"
)

Variables

View Source
var User_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.User",
	HandlerType: (*UserServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Insert",
			Handler:    _User_Insert_Handler,
		},
		{
			MethodName: "Query",
			Handler:    _User_Query_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _User_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user.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 RegisterUserServer

func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)

Types

type DeleteReq

type DeleteReq struct {
	Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty" v:"min:1#User id is required for deleting."` // v:min:1#User id is required for deleting.
	// contains filtered or unexported fields
}

func (*DeleteReq) Descriptor deprecated

func (*DeleteReq) Descriptor() ([]byte, []int)

Deprecated: Use DeleteReq.ProtoReflect.Descriptor instead.

func (*DeleteReq) GetId

func (x *DeleteReq) GetId() int32

func (*DeleteReq) ProtoMessage

func (*DeleteReq) ProtoMessage()

func (*DeleteReq) ProtoReflect

func (x *DeleteReq) ProtoReflect() protoreflect.Message

func (*DeleteReq) Reset

func (x *DeleteReq) Reset()

func (*DeleteReq) String

func (x *DeleteReq) String() string

type DeleteRes

type DeleteRes struct {
	// contains filtered or unexported fields
}

func (*DeleteRes) Descriptor deprecated

func (*DeleteRes) Descriptor() ([]byte, []int)

Deprecated: Use DeleteRes.ProtoReflect.Descriptor instead.

func (*DeleteRes) ProtoMessage

func (*DeleteRes) ProtoMessage()

func (*DeleteRes) ProtoReflect

func (x *DeleteRes) ProtoReflect() protoreflect.Message

func (*DeleteRes) Reset

func (x *DeleteRes) Reset()

func (*DeleteRes) String

func (x *DeleteRes) String() string

type InsertReq

type InsertReq struct {
	Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty" v:"required#Please input user name."` // v: required#Please input user name.
	// contains filtered or unexported fields
}

func (*InsertReq) Descriptor deprecated

func (*InsertReq) Descriptor() ([]byte, []int)

Deprecated: Use InsertReq.ProtoReflect.Descriptor instead.

func (*InsertReq) GetName

func (x *InsertReq) GetName() string

func (*InsertReq) ProtoMessage

func (*InsertReq) ProtoMessage()

func (*InsertReq) ProtoReflect

func (x *InsertReq) ProtoReflect() protoreflect.Message

func (*InsertReq) Reset

func (x *InsertReq) Reset()

func (*InsertReq) String

func (x *InsertReq) String() string

type InsertRes

type InsertRes struct {
	Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
	// contains filtered or unexported fields
}

func (*InsertRes) Descriptor deprecated

func (*InsertRes) Descriptor() ([]byte, []int)

Deprecated: Use InsertRes.ProtoReflect.Descriptor instead.

func (*InsertRes) GetId

func (x *InsertRes) GetId() int32

func (*InsertRes) ProtoMessage

func (*InsertRes) ProtoMessage()

func (*InsertRes) ProtoReflect

func (x *InsertRes) ProtoReflect() protoreflect.Message

func (*InsertRes) Reset

func (x *InsertRes) Reset()

func (*InsertRes) String

func (x *InsertRes) String() string

type QueryReq

type QueryReq struct {
	Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty" v:"min:1#User id is required for querying."` // v: min:1#User id is required for querying.
	// contains filtered or unexported fields
}

func (*QueryReq) Descriptor deprecated

func (*QueryReq) Descriptor() ([]byte, []int)

Deprecated: Use QueryReq.ProtoReflect.Descriptor instead.

func (*QueryReq) GetId

func (x *QueryReq) GetId() int32

func (*QueryReq) ProtoMessage

func (*QueryReq) ProtoMessage()

func (*QueryReq) ProtoReflect

func (x *QueryReq) ProtoReflect() protoreflect.Message

func (*QueryReq) Reset

func (x *QueryReq) Reset()

func (*QueryReq) String

func (x *QueryReq) String() string

type QueryRes

type QueryRes struct {
	Id   int32  `protobuf:"varint,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 (*QueryRes) Descriptor deprecated

func (*QueryRes) Descriptor() ([]byte, []int)

Deprecated: Use QueryRes.ProtoReflect.Descriptor instead.

func (*QueryRes) GetId

func (x *QueryRes) GetId() int32

func (*QueryRes) GetName

func (x *QueryRes) GetName() string

func (*QueryRes) ProtoMessage

func (*QueryRes) ProtoMessage()

func (*QueryRes) ProtoReflect

func (x *QueryRes) ProtoReflect() protoreflect.Message

func (*QueryRes) Reset

func (x *QueryRes) Reset()

func (*QueryRes) String

func (x *QueryRes) String() string

type UnimplementedUserServer

type UnimplementedUserServer struct {
}

UnimplementedUserServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServer) Delete

func (UnimplementedUserServer) Insert

func (UnimplementedUserServer) Query

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 {
	Insert(ctx context.Context, in *InsertReq, opts ...grpc.CallOption) (*InsertRes, error)
	Query(ctx context.Context, in *QueryReq, opts ...grpc.CallOption) (*QueryRes, error)
	Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*DeleteRes, 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 UserServer

type UserServer interface {
	Insert(context.Context, *InsertReq) (*InsertRes, error)
	Query(context.Context, *QueryReq) (*QueryRes, error)
	Delete(context.Context, *DeleteReq) (*DeleteRes, error)
	// contains filtered or unexported methods
}

UserServer is the server API for User service. All implementations must embed UnimplementedUserServer for forward compatibility

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL