userservice

package
v0.0.0-...-e768eea Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_users_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "userservice.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateUser",
			Handler:    _UserService_CreateUser_Handler,
		},
		{
			MethodName: "GetUserById",
			Handler:    _UserService_GetUserById_Handler,
		},
		{
			MethodName: "UpdateUser",
			Handler:    _UserService_UpdateUser_Handler,
		},
		{
			MethodName: "DeleteUser",
			Handler:    _UserService_DeleteUser_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetUsers",
			Handler:       _UserService_GetUsers_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "proto/users.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 Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) CreateUser

func (UnimplementedUserServiceServer) DeleteUser

func (UnimplementedUserServiceServer) GetUserById

func (UnimplementedUserServiceServer) GetUsers

func (UnimplementedUserServiceServer) UpdateUser

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 {
	Id        string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
	LastName  string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	Nickname  string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"`
	Email     string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"`
	Country   string `protobuf:"bytes,6,opt,name=country,proto3" json:"country,omitempty"`
	CreatedAt string `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt string `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetCountry

func (x *User) GetCountry() string

func (*User) GetCreatedAt

func (x *User) GetCreatedAt() string

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetFirstName

func (x *User) GetFirstName() string

func (*User) GetId

func (x *User) GetId() string

func (*User) GetLastName

func (x *User) GetLastName() string

func (*User) GetNickname

func (x *User) GetNickname() string

func (*User) GetUpdatedAt

func (x *User) GetUpdatedAt() 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 UserCreation

type UserCreation struct {
	FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
	LastName  string `protobuf:"bytes,2,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	Nickname  string `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname,omitempty"`
	Password  string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
	Email     string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"`
	Country   string `protobuf:"bytes,6,opt,name=country,proto3" json:"country,omitempty"`
	// contains filtered or unexported fields
}

func (*UserCreation) Descriptor deprecated

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

Deprecated: Use UserCreation.ProtoReflect.Descriptor instead.

func (*UserCreation) GetCountry

func (x *UserCreation) GetCountry() string

func (*UserCreation) GetEmail

func (x *UserCreation) GetEmail() string

func (*UserCreation) GetFirstName

func (x *UserCreation) GetFirstName() string

func (*UserCreation) GetLastName

func (x *UserCreation) GetLastName() string

func (*UserCreation) GetNickname

func (x *UserCreation) GetNickname() string

func (*UserCreation) GetPassword

func (x *UserCreation) GetPassword() string

func (*UserCreation) ProtoMessage

func (*UserCreation) ProtoMessage()

func (*UserCreation) ProtoReflect

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

func (*UserCreation) Reset

func (x *UserCreation) Reset()

func (*UserCreation) String

func (x *UserCreation) String() string

type UserCreationResponse

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

func (*UserCreationResponse) Descriptor deprecated

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

Deprecated: Use UserCreationResponse.ProtoReflect.Descriptor instead.

func (*UserCreationResponse) GetId

func (x *UserCreationResponse) GetId() string

func (*UserCreationResponse) ProtoMessage

func (*UserCreationResponse) ProtoMessage()

func (*UserCreationResponse) ProtoReflect

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

func (*UserCreationResponse) Reset

func (x *UserCreationResponse) Reset()

func (*UserCreationResponse) String

func (x *UserCreationResponse) String() string

type UserFilter

type UserFilter struct {
	FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
	LastName  string `protobuf:"bytes,2,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	Nickname  string `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname,omitempty"`
	Email     string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	Country   string `protobuf:"bytes,5,opt,name=country,proto3" json:"country,omitempty"`
	Offset    int32  `protobuf:"varint,6,opt,name=offset,proto3" json:"offset,omitempty"`
	Limit     int32  `protobuf:"varint,7,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

func (*UserFilter) Descriptor deprecated

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

Deprecated: Use UserFilter.ProtoReflect.Descriptor instead.

func (*UserFilter) GetCountry

func (x *UserFilter) GetCountry() string

func (*UserFilter) GetEmail

func (x *UserFilter) GetEmail() string

func (*UserFilter) GetFirstName

func (x *UserFilter) GetFirstName() string

func (*UserFilter) GetLastName

func (x *UserFilter) GetLastName() string

func (*UserFilter) GetLimit

func (x *UserFilter) GetLimit() int32

func (*UserFilter) GetNickname

func (x *UserFilter) GetNickname() string

func (*UserFilter) GetOffset

func (x *UserFilter) GetOffset() int32

func (*UserFilter) ProtoMessage

func (*UserFilter) ProtoMessage()

func (*UserFilter) ProtoReflect

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

func (*UserFilter) Reset

func (x *UserFilter) Reset()

func (*UserFilter) String

func (x *UserFilter) String() string

type UserId

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

func (*UserId) Descriptor deprecated

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

Deprecated: Use UserId.ProtoReflect.Descriptor instead.

func (*UserId) GetId

func (x *UserId) GetId() string

func (*UserId) ProtoMessage

func (*UserId) ProtoMessage()

func (*UserId) ProtoReflect

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

func (*UserId) Reset

func (x *UserId) Reset()

func (*UserId) String

func (x *UserId) String() string

type UserServiceClient

type UserServiceClient interface {
	CreateUser(ctx context.Context, in *UserCreation, opts ...grpc.CallOption) (*UserCreationResponse, error)
	GetUsers(ctx context.Context, in *UserFilter, opts ...grpc.CallOption) (UserService_GetUsersClient, error)
	GetUserById(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*User, error)
	UpdateUser(ctx context.Context, in *UserUpdate, opts ...grpc.CallOption) (*Empty, error)
	DeleteUser(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*Empty, 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 {
	CreateUser(context.Context, *UserCreation) (*UserCreationResponse, error)
	GetUsers(*UserFilter, UserService_GetUsersServer) error
	GetUserById(context.Context, *UserId) (*User, error)
	UpdateUser(context.Context, *UserUpdate) (*Empty, error)
	DeleteUser(context.Context, *UserId) (*Empty, error)
	// contains filtered or unexported methods
}

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

type UserService_GetUsersClient

type UserService_GetUsersClient interface {
	Recv() (*User, error)
	grpc.ClientStream
}

type UserService_GetUsersServer

type UserService_GetUsersServer interface {
	Send(*User) error
	grpc.ServerStream
}

type UserUpdate

type UserUpdate struct {
	Id        string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
	LastName  string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	Nickname  string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"`
	Password  string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"`
	Email     string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"`
	Country   string `protobuf:"bytes,7,opt,name=country,proto3" json:"country,omitempty"`
	// contains filtered or unexported fields
}

func (*UserUpdate) Descriptor deprecated

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

Deprecated: Use UserUpdate.ProtoReflect.Descriptor instead.

func (*UserUpdate) GetCountry

func (x *UserUpdate) GetCountry() string

func (*UserUpdate) GetEmail

func (x *UserUpdate) GetEmail() string

func (*UserUpdate) GetFirstName

func (x *UserUpdate) GetFirstName() string

func (*UserUpdate) GetId

func (x *UserUpdate) GetId() string

func (*UserUpdate) GetLastName

func (x *UserUpdate) GetLastName() string

func (*UserUpdate) GetNickname

func (x *UserUpdate) GetNickname() string

func (*UserUpdate) GetPassword

func (x *UserUpdate) GetPassword() string

func (*UserUpdate) ProtoMessage

func (*UserUpdate) ProtoMessage()

func (*UserUpdate) ProtoReflect

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

func (*UserUpdate) Reset

func (x *UserUpdate) Reset()

func (*UserUpdate) String

func (x *UserUpdate) String() string

Jump to

Keyboard shortcuts

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