Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_proto_users_proto protoreflect.FileDescriptor
var Users_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Users", HandlerType: (*UsersServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _Users_CreateUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/users.proto", }
Users_ServiceDesc is the grpc.ServiceDesc for Users service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUsersServer ¶
func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)
Types ¶
type CreatedUser ¶
type CreatedUser struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` TxId string `protobuf:"bytes,2,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` // contains filtered or unexported fields }
func (*CreatedUser) Descriptor
deprecated
func (*CreatedUser) Descriptor() ([]byte, []int)
Deprecated: Use CreatedUser.ProtoReflect.Descriptor instead.
func (*CreatedUser) GetId ¶
func (x *CreatedUser) GetId() string
func (*CreatedUser) GetTxId ¶
func (x *CreatedUser) GetTxId() string
func (*CreatedUser) ProtoMessage ¶
func (*CreatedUser) ProtoMessage()
func (*CreatedUser) ProtoReflect ¶
func (x *CreatedUser) ProtoReflect() protoreflect.Message
func (*CreatedUser) Reset ¶
func (x *CreatedUser) Reset()
func (*CreatedUser) String ¶
func (x *CreatedUser) String() string
type NewUser ¶
type NewUser struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*NewUser) Descriptor
deprecated
func (*NewUser) ProtoMessage ¶
func (*NewUser) ProtoMessage()
func (*NewUser) ProtoReflect ¶
func (x *NewUser) ProtoReflect() protoreflect.Message
type UnimplementedUsersServer ¶
type UnimplementedUsersServer struct { }
UnimplementedUsersServer must be embedded to have forward compatible implementations.
func (UnimplementedUsersServer) CreateUser ¶
func (UnimplementedUsersServer) CreateUser(context.Context, *NewUser) (*CreatedUser, error)
type UnsafeUsersServer ¶
type UnsafeUsersServer interface {
// contains filtered or unexported methods
}
UnsafeUsersServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UsersServer will result in compilation errors.
type UsersClient ¶
type UsersClient interface {
CreateUser(ctx context.Context, in *NewUser, opts ...grpc.CallOption) (*CreatedUser, error)
}
UsersClient is the client API for Users 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 NewUsersClient ¶
func NewUsersClient(cc grpc.ClientConnInterface) UsersClient
type UsersServer ¶
type UsersServer interface { CreateUser(context.Context, *NewUser) (*CreatedUser, error) // contains filtered or unexported methods }
UsersServer is the server API for Users service. All implementations must embed UnimplementedUsersServer for forward compatibility