userpb

package
v0.0.0-...-45ec72a Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Operation_name = map[int32]string{
		0: "CREATE",
		1: "UPDATE",
	}
	Operation_value = map[string]int32{
		"CREATE": 0,
		"UPDATE": 1,
	}
)

Enum value maps for Operation.

View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "userpb.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUserDetails",
			Handler:    _UserService_GetUserDetails_Handler,
		},
		{
			MethodName: "GetUsers",
			Handler:    _UserService_GetUsers_Handler,
		},
		{
			MethodName: "CreateUpdateUser",
			Handler:    _UserService_CreateUpdateUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user.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 CreateUpdateUserRequest

type CreateUpdateUserRequest struct {
	Operation Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=userpb.Operation" json:"operation,omitempty"`
	Id        string    `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Name      string    `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Age       int32     `protobuf:"varint,4,opt,name=age,proto3" json:"age,omitempty"`
	Greeting  string    `protobuf:"bytes,5,opt,name=greeting,proto3" json:"greeting,omitempty"`
	Salary    int32     `protobuf:"varint,6,opt,name=salary,proto3" json:"salary,omitempty"`
	Power     string    `protobuf:"bytes,7,opt,name=power,proto3" json:"power,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUpdateUserRequest) Descriptor deprecated

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

Deprecated: Use CreateUpdateUserRequest.ProtoReflect.Descriptor instead.

func (*CreateUpdateUserRequest) GetAge

func (x *CreateUpdateUserRequest) GetAge() int32

func (*CreateUpdateUserRequest) GetGreeting

func (x *CreateUpdateUserRequest) GetGreeting() string

func (*CreateUpdateUserRequest) GetId

func (x *CreateUpdateUserRequest) GetId() string

func (*CreateUpdateUserRequest) GetName

func (x *CreateUpdateUserRequest) GetName() string

func (*CreateUpdateUserRequest) GetOperation

func (x *CreateUpdateUserRequest) GetOperation() Operation

func (*CreateUpdateUserRequest) GetPower

func (x *CreateUpdateUserRequest) GetPower() string

func (*CreateUpdateUserRequest) GetSalary

func (x *CreateUpdateUserRequest) GetSalary() int32

func (*CreateUpdateUserRequest) ProtoMessage

func (*CreateUpdateUserRequest) ProtoMessage()

func (*CreateUpdateUserRequest) ProtoReflect

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

func (*CreateUpdateUserRequest) Reset

func (x *CreateUpdateUserRequest) Reset()

func (*CreateUpdateUserRequest) String

func (x *CreateUpdateUserRequest) String() string

type CreateUpdateUserResponse

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

func (*CreateUpdateUserResponse) Descriptor deprecated

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

Deprecated: Use CreateUpdateUserResponse.ProtoReflect.Descriptor instead.

func (*CreateUpdateUserResponse) GetId

func (x *CreateUpdateUserResponse) GetId() string

func (*CreateUpdateUserResponse) ProtoMessage

func (*CreateUpdateUserResponse) ProtoMessage()

func (*CreateUpdateUserResponse) ProtoReflect

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

func (*CreateUpdateUserResponse) Reset

func (x *CreateUpdateUserResponse) Reset()

func (*CreateUpdateUserResponse) String

func (x *CreateUpdateUserResponse) String() string

type GetUserDetailsRequest

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

func (*GetUserDetailsRequest) Descriptor deprecated

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

Deprecated: Use GetUserDetailsRequest.ProtoReflect.Descriptor instead.

func (*GetUserDetailsRequest) GetId

func (x *GetUserDetailsRequest) GetId() string

func (*GetUserDetailsRequest) ProtoMessage

func (*GetUserDetailsRequest) ProtoMessage()

func (*GetUserDetailsRequest) ProtoReflect

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

func (*GetUserDetailsRequest) Reset

func (x *GetUserDetailsRequest) Reset()

func (*GetUserDetailsRequest) String

func (x *GetUserDetailsRequest) String() string

type GetUserDetailsResponse

type GetUserDetailsResponse struct {
	Salary int32  `protobuf:"varint,1,opt,name=salary,proto3" json:"salary,omitempty"`
	Power  string `protobuf:"bytes,2,opt,name=power,proto3" json:"power,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserDetailsResponse) Descriptor deprecated

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

Deprecated: Use GetUserDetailsResponse.ProtoReflect.Descriptor instead.

func (*GetUserDetailsResponse) GetPower

func (x *GetUserDetailsResponse) GetPower() string

func (*GetUserDetailsResponse) GetSalary

func (x *GetUserDetailsResponse) GetSalary() int32

func (*GetUserDetailsResponse) ProtoMessage

func (*GetUserDetailsResponse) ProtoMessage()

func (*GetUserDetailsResponse) ProtoReflect

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

func (*GetUserDetailsResponse) Reset

func (x *GetUserDetailsResponse) Reset()

func (*GetUserDetailsResponse) String

func (x *GetUserDetailsResponse) String() string

type GetUserResponse

type GetUserResponse struct {
	Id       string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Age      int32  `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"`
	Greeting string `protobuf:"bytes,4,opt,name=greeting,proto3" json:"greeting,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserResponse) Descriptor deprecated

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

Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.

func (*GetUserResponse) GetAge

func (x *GetUserResponse) GetAge() int32

func (*GetUserResponse) GetGreeting

func (x *GetUserResponse) GetGreeting() string

func (*GetUserResponse) GetId

func (x *GetUserResponse) GetId() string

func (*GetUserResponse) GetName

func (x *GetUserResponse) GetName() string

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 GetUsersRequest

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

func (*GetUsersRequest) Descriptor deprecated

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

Deprecated: Use GetUsersRequest.ProtoReflect.Descriptor instead.

func (*GetUsersRequest) ProtoMessage

func (*GetUsersRequest) ProtoMessage()

func (*GetUsersRequest) ProtoReflect

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

func (*GetUsersRequest) Reset

func (x *GetUsersRequest) Reset()

func (*GetUsersRequest) String

func (x *GetUsersRequest) String() string

type GetUsersResponse

type GetUsersResponse struct {
	Users []*GetUserResponse `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUsersResponse) Descriptor deprecated

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

Deprecated: Use GetUsersResponse.ProtoReflect.Descriptor instead.

func (*GetUsersResponse) GetUsers

func (x *GetUsersResponse) GetUsers() []*GetUserResponse

func (*GetUsersResponse) ProtoMessage

func (*GetUsersResponse) ProtoMessage()

func (*GetUsersResponse) ProtoReflect

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

func (*GetUsersResponse) Reset

func (x *GetUsersResponse) Reset()

func (*GetUsersResponse) String

func (x *GetUsersResponse) String() string

type Operation

type Operation int32
const (
	Operation_CREATE Operation = 0
	Operation_UPDATE Operation = 1
)

func (Operation) Descriptor

func (Operation) Descriptor() protoreflect.EnumDescriptor

func (Operation) Enum

func (x Operation) Enum() *Operation

func (Operation) EnumDescriptor deprecated

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

Deprecated: Use Operation.Descriptor instead.

func (Operation) Number

func (x Operation) Number() protoreflect.EnumNumber

func (Operation) String

func (x Operation) String() string

func (Operation) Type

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) CreateUpdateUser

func (UnimplementedUserServiceServer) GetUserDetails

func (UnimplementedUserServiceServer) GetUsers

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 UserServiceClient

type UserServiceClient interface {
	GetUserDetails(ctx context.Context, in *GetUserDetailsRequest, opts ...grpc.CallOption) (*GetUserDetailsResponse, error)
	GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error)
	CreateUpdateUser(ctx context.Context, in *CreateUpdateUserRequest, opts ...grpc.CallOption) (*CreateUpdateUserResponse, 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 {
	GetUserDetails(context.Context, *GetUserDetailsRequest) (*GetUserDetailsResponse, error)
	GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error)
	CreateUpdateUser(context.Context, *CreateUpdateUserRequest) (*CreateUpdateUserResponse, 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