protos

package
v0.0.0-...-8d32343 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Users_ListUser_FullMethodName = "/users.Users/ListUser"
)

Variables

View Source
var (
	ListUserOut_Status_name = map[int32]string{
		0: "OK",
		2: "NOT_FOUND",
	}
	ListUserOut_Status_value = map[string]int32{
		"OK":        0,
		"NOT_FOUND": 2,
	}
)

Enum value maps for ListUserOut_Status.

View Source
var File_resources_protos_users_proto protoreflect.FileDescriptor
View Source
var Users_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "users.Users",
	HandlerType: (*UsersServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListUser",
			Handler:    _Users_ListUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "resources/protos/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 ListUserIn

type ListUserIn struct {
	Q int64 `protobuf:"varint,1,opt,name=q,proto3" json:"q,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUserIn) Descriptor deprecated

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

Deprecated: Use ListUserIn.ProtoReflect.Descriptor instead.

func (*ListUserIn) GetQ

func (x *ListUserIn) GetQ() int64

func (*ListUserIn) ProtoMessage

func (*ListUserIn) ProtoMessage()

func (*ListUserIn) ProtoReflect

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

func (*ListUserIn) Reset

func (x *ListUserIn) Reset()

func (*ListUserIn) String

func (x *ListUserIn) String() string

type ListUserOut

type ListUserOut struct {
	Status ListUserOut_Status `protobuf:"varint,1,opt,name=status,proto3,enum=users.ListUserOut_Status" json:"status,omitempty"`
	Users  []*User            `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUserOut) Descriptor deprecated

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

Deprecated: Use ListUserOut.ProtoReflect.Descriptor instead.

func (*ListUserOut) GetStatus

func (x *ListUserOut) GetStatus() ListUserOut_Status

func (*ListUserOut) GetUsers

func (x *ListUserOut) GetUsers() []*User

func (*ListUserOut) ProtoMessage

func (*ListUserOut) ProtoMessage()

func (*ListUserOut) ProtoReflect

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

func (*ListUserOut) Reset

func (x *ListUserOut) Reset()

func (*ListUserOut) String

func (x *ListUserOut) String() string

type ListUserOut_Status

type ListUserOut_Status int32
const (
	ListUserOut_OK        ListUserOut_Status = 0
	ListUserOut_NOT_FOUND ListUserOut_Status = 2
)

func (ListUserOut_Status) Descriptor

func (ListUserOut_Status) Enum

func (ListUserOut_Status) EnumDescriptor deprecated

func (ListUserOut_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use ListUserOut_Status.Descriptor instead.

func (ListUserOut_Status) Number

func (ListUserOut_Status) String

func (x ListUserOut_Status) String() string

func (ListUserOut_Status) Type

type UnimplementedUsersServer

type UnimplementedUsersServer struct {
}

UnimplementedUsersServer must be embedded to have forward compatible implementations.

func (UnimplementedUsersServer) ListUser

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 User

type User struct {
	Id    int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name  string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetId

func (x *User) GetId() int64

func (*User) GetName

func (x *User) GetName() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UsersClient

type UsersClient interface {
	ListUser(ctx context.Context, in *ListUserIn, opts ...grpc.CallOption) (*ListUserOut, 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 {
	ListUser(context.Context, *ListUserIn) (*ListUserOut, error)
	// contains filtered or unexported methods
}

UsersServer is the server API for Users service. All implementations must embed UnimplementedUsersServer for forward compatibility

Jump to

Keyboard shortcuts

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