userv1

package
v0.0.0-...-6c0d599 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserService_GetUser_FullMethodName = "/user.v1.UserService/GetUser"
)

Variables

View Source
var (
	MaritalStatus_name = map[int32]string{
		0: "MARITAL_STATUS_UNSPECIFIED",
		1: "MARITAL_STATUS_SINGLE",
		2: "MARITAL_STATUS_MARRIED",
	}
	MaritalStatus_value = map[string]int32{
		"MARITAL_STATUS_UNSPECIFIED": 0,
		"MARITAL_STATUS_SINGLE":      1,
		"MARITAL_STATUS_MARRIED":     2,
	}
)

Enum value maps for MaritalStatus.

View Source
var File_user_v1_user_proto protoreflect.FileDescriptor
View Source
var File_user_v1_user_service_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.v1.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUser",
			Handler:    _UserService_GetUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user/v1/user_service.proto",
}

UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type Address

type Address struct {
	Street string `protobuf:"bytes,1,opt,name=street,proto3" json:"street,omitempty"`
	City   string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"`
	// contains filtered or unexported fields
}

func (*Address) Descriptor deprecated

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

Deprecated: Use Address.ProtoReflect.Descriptor instead.

func (*Address) GetCity

func (x *Address) GetCity() string

func (*Address) GetStreet

func (x *Address) GetStreet() string

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) ProtoReflect

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

func (*Address) Reset

func (x *Address) Reset()

func (*Address) String

func (x *Address) String() string

type GetUserRequest

type GetUserRequest struct {
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserRequest) Descriptor deprecated

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

Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.

func (*GetUserRequest) GetUuid

func (x *GetUserRequest) GetUuid() string

func (*GetUserRequest) ProtoMessage

func (*GetUserRequest) ProtoMessage()

func (*GetUserRequest) ProtoReflect

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

func (*GetUserRequest) Reset

func (x *GetUserRequest) Reset()

func (*GetUserRequest) String

func (x *GetUserRequest) String() string

type GetUserResponse

type GetUserResponse struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserResponse) Descriptor deprecated

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

Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.

func (*GetUserResponse) GetUser

func (x *GetUserResponse) GetUser() *User

func (*GetUserResponse) ProtoMessage

func (*GetUserResponse) ProtoMessage()

func (*GetUserResponse) ProtoReflect

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

func (*GetUserResponse) Reset

func (x *GetUserResponse) Reset()

func (*GetUserResponse) String

func (x *GetUserResponse) String() string

type MaritalStatus

type MaritalStatus int32
const (
	MaritalStatus_MARITAL_STATUS_UNSPECIFIED MaritalStatus = 0
	MaritalStatus_MARITAL_STATUS_SINGLE      MaritalStatus = 1
	MaritalStatus_MARITAL_STATUS_MARRIED     MaritalStatus = 2
)

func (MaritalStatus) Descriptor

func (MaritalStatus) Enum

func (x MaritalStatus) Enum() *MaritalStatus

func (MaritalStatus) EnumDescriptor deprecated

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

Deprecated: Use MaritalStatus.Descriptor instead.

func (MaritalStatus) Number

func (MaritalStatus) String

func (x MaritalStatus) String() string

func (MaritalStatus) Type

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) GetUser

type UnsafeUserServiceServer

type UnsafeUserServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.

type User

type User struct {
	Uuid          string        `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	FullName      string        `protobuf:"bytes,2,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"`
	BirthYear     int64         `protobuf:"varint,3,opt,name=birth_year,json=birthYear,proto3" json:"birth_year,omitempty"`
	Salary        *uint32       `protobuf:"varint,4,opt,name=salary,proto3,oneof" json:"salary,omitempty"`
	Addresses     []*Address    `protobuf:"bytes,5,rep,name=addresses,proto3" json:"addresses,omitempty"`
	MaritalStatus MaritalStatus `` /* 128-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAddresses

func (x *User) GetAddresses() []*Address

func (*User) GetBirthYear

func (x *User) GetBirthYear() int64

func (*User) GetFullName

func (x *User) GetFullName() string

func (*User) GetMaritalStatus

func (x *User) GetMaritalStatus() MaritalStatus

func (*User) GetSalary

func (x *User) GetSalary() uint32

func (*User) GetUuid

func (x *User) GetUuid() 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 UserServiceClient

type UserServiceClient interface {
	GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
}

UserServiceClient is the client API for UserService 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.

type UserServiceServer

type UserServiceServer interface {
	GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility

Jump to

Keyboard shortcuts

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