generated

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 21 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateUser",
			Handler:    _UserService_CreateUser_Handler,
		},
		{
			MethodName: "UpdateUser",
			Handler:    _UserService_UpdateUser_Handler,
		},
		{
			MethodName: "DetailUser",
			Handler:    _UserService_DetailUser_Handler,
		},
		{
			MethodName: "ListUser",
			Handler:    _UserService_ListUser_Handler,
		},
		{
			MethodName: "DeleteUser",
			Handler:    _UserService_DeleteUser_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 CreateUserInput

type CreateUserInput struct {
	Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,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 (*CreateUserInput) Descriptor deprecated

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

Deprecated: Use CreateUserInput.ProtoReflect.Descriptor instead.

func (*CreateUserInput) GetEmail

func (x *CreateUserInput) GetEmail() string

func (*CreateUserInput) GetName

func (x *CreateUserInput) GetName() string

func (*CreateUserInput) GetPhone

func (x *CreateUserInput) GetPhone() string

func (*CreateUserInput) ProtoMessage

func (*CreateUserInput) ProtoMessage()

func (*CreateUserInput) ProtoReflect

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

func (*CreateUserInput) Reset

func (x *CreateUserInput) Reset()

func (*CreateUserInput) String

func (x *CreateUserInput) String() string

func (*CreateUserInput) Validate

func (m *CreateUserInput) Validate() error

Validate checks the field values on CreateUserInput with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CreateUserInput) ValidateAll

func (m *CreateUserInput) ValidateAll() error

ValidateAll checks the field values on CreateUserInput with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CreateUserInputMultiError, or nil if none found.

type CreateUserInputMultiError

type CreateUserInputMultiError []error

CreateUserInputMultiError is an error wrapping multiple validation errors returned by CreateUserInput.ValidateAll() if the designated constraints aren't met.

func (CreateUserInputMultiError) AllErrors

func (m CreateUserInputMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateUserInputMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CreateUserInputValidationError

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

CreateUserInputValidationError is the validation error returned by CreateUserInput.Validate if the designated constraints aren't met.

func (CreateUserInputValidationError) Cause

Cause function returns cause value.

func (CreateUserInputValidationError) Error

Error satisfies the builtin error interface

func (CreateUserInputValidationError) ErrorName

func (e CreateUserInputValidationError) ErrorName() string

ErrorName returns error name.

func (CreateUserInputValidationError) Field

Field function returns field value.

func (CreateUserInputValidationError) Key

Key function returns key value.

func (CreateUserInputValidationError) Reason

Reason function returns reason value.

type DeleteUserInput added in v0.0.2

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

func (*DeleteUserInput) Descriptor deprecated added in v0.0.2

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

Deprecated: Use DeleteUserInput.ProtoReflect.Descriptor instead.

func (*DeleteUserInput) GetId added in v0.0.2

func (x *DeleteUserInput) GetId() string

func (*DeleteUserInput) ProtoMessage added in v0.0.2

func (*DeleteUserInput) ProtoMessage()

func (*DeleteUserInput) ProtoReflect added in v0.0.2

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

func (*DeleteUserInput) Reset added in v0.0.2

func (x *DeleteUserInput) Reset()

func (*DeleteUserInput) String added in v0.0.2

func (x *DeleteUserInput) String() string

func (*DeleteUserInput) Validate added in v0.0.2

func (m *DeleteUserInput) Validate() error

Validate checks the field values on DeleteUserInput with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*DeleteUserInput) ValidateAll added in v0.0.2

func (m *DeleteUserInput) ValidateAll() error

ValidateAll checks the field values on DeleteUserInput with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DeleteUserInputMultiError, or nil if none found.

type DeleteUserInputMultiError added in v0.0.2

type DeleteUserInputMultiError []error

DeleteUserInputMultiError is an error wrapping multiple validation errors returned by DeleteUserInput.ValidateAll() if the designated constraints aren't met.

func (DeleteUserInputMultiError) AllErrors added in v0.0.2

func (m DeleteUserInputMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DeleteUserInputMultiError) Error added in v0.0.2

Error returns a concatenation of all the error messages it wraps.

type DeleteUserInputValidationError added in v0.0.2

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

DeleteUserInputValidationError is the validation error returned by DeleteUserInput.Validate if the designated constraints aren't met.

func (DeleteUserInputValidationError) Cause added in v0.0.2

Cause function returns cause value.

func (DeleteUserInputValidationError) Error added in v0.0.2

Error satisfies the builtin error interface

func (DeleteUserInputValidationError) ErrorName added in v0.0.2

func (e DeleteUserInputValidationError) ErrorName() string

ErrorName returns error name.

func (DeleteUserInputValidationError) Field added in v0.0.2

Field function returns field value.

func (DeleteUserInputValidationError) Key added in v0.0.2

Key function returns key value.

func (DeleteUserInputValidationError) Reason added in v0.0.2

Reason function returns reason value.

type DetailUserInput

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

func (*DetailUserInput) Descriptor deprecated

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

Deprecated: Use DetailUserInput.ProtoReflect.Descriptor instead.

func (*DetailUserInput) GetId

func (x *DetailUserInput) GetId() string

func (*DetailUserInput) ProtoMessage

func (*DetailUserInput) ProtoMessage()

func (*DetailUserInput) ProtoReflect

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

func (*DetailUserInput) Reset

func (x *DetailUserInput) Reset()

func (*DetailUserInput) String

func (x *DetailUserInput) String() string

func (*DetailUserInput) Validate

func (m *DetailUserInput) Validate() error

Validate checks the field values on DetailUserInput with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*DetailUserInput) ValidateAll

func (m *DetailUserInput) ValidateAll() error

ValidateAll checks the field values on DetailUserInput with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DetailUserInputMultiError, or nil if none found.

type DetailUserInputMultiError

type DetailUserInputMultiError []error

DetailUserInputMultiError is an error wrapping multiple validation errors returned by DetailUserInput.ValidateAll() if the designated constraints aren't met.

func (DetailUserInputMultiError) AllErrors

func (m DetailUserInputMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DetailUserInputMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type DetailUserInputValidationError

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

DetailUserInputValidationError is the validation error returned by DetailUserInput.Validate if the designated constraints aren't met.

func (DetailUserInputValidationError) Cause

Cause function returns cause value.

func (DetailUserInputValidationError) Error

Error satisfies the builtin error interface

func (DetailUserInputValidationError) ErrorName

func (e DetailUserInputValidationError) ErrorName() string

ErrorName returns error name.

func (DetailUserInputValidationError) Field

Field function returns field value.

func (DetailUserInputValidationError) Key

Key function returns key value.

func (DetailUserInputValidationError) Reason

Reason function returns reason value.

type ListUserInput

type ListUserInput struct {
	Page   int32   `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	Limit  int32   `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	Search *string `protobuf:"bytes,3,opt,name=search,proto3,oneof" json:"search,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUserInput) Descriptor deprecated

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

Deprecated: Use ListUserInput.ProtoReflect.Descriptor instead.

func (*ListUserInput) GetLimit

func (x *ListUserInput) GetLimit() int32

func (*ListUserInput) GetPage

func (x *ListUserInput) GetPage() int32

func (*ListUserInput) GetSearch

func (x *ListUserInput) GetSearch() string

func (*ListUserInput) ProtoMessage

func (*ListUserInput) ProtoMessage()

func (*ListUserInput) ProtoReflect

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

func (*ListUserInput) Reset

func (x *ListUserInput) Reset()

func (*ListUserInput) String

func (x *ListUserInput) String() string

func (*ListUserInput) Validate

func (m *ListUserInput) Validate() error

Validate checks the field values on ListUserInput with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListUserInput) ValidateAll

func (m *ListUserInput) ValidateAll() error

ValidateAll checks the field values on ListUserInput with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListUserInputMultiError, or nil if none found.

type ListUserInputMultiError

type ListUserInputMultiError []error

ListUserInputMultiError is an error wrapping multiple validation errors returned by ListUserInput.ValidateAll() if the designated constraints aren't met.

func (ListUserInputMultiError) AllErrors

func (m ListUserInputMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListUserInputMultiError) Error

func (m ListUserInputMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ListUserInputValidationError

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

ListUserInputValidationError is the validation error returned by ListUserInput.Validate if the designated constraints aren't met.

func (ListUserInputValidationError) Cause

Cause function returns cause value.

func (ListUserInputValidationError) Error

Error satisfies the builtin error interface

func (ListUserInputValidationError) ErrorName

func (e ListUserInputValidationError) ErrorName() string

ErrorName returns error name.

func (ListUserInputValidationError) Field

Field function returns field value.

func (ListUserInputValidationError) Key

Key function returns key value.

func (ListUserInputValidationError) Reason

Reason function returns reason value.

type ListUserResponse

type ListUserResponse struct {
	Users     []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	Page      int32   `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
	Limit     int32   `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	Total     int32   `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"`
	TotalPage int32   `protobuf:"varint,5,opt,name=total_page,json=totalPage,proto3" json:"total_page,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUserResponse) Descriptor deprecated

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

Deprecated: Use ListUserResponse.ProtoReflect.Descriptor instead.

func (*ListUserResponse) GetLimit

func (x *ListUserResponse) GetLimit() int32

func (*ListUserResponse) GetPage

func (x *ListUserResponse) GetPage() int32

func (*ListUserResponse) GetTotal

func (x *ListUserResponse) GetTotal() int32

func (*ListUserResponse) GetTotalPage

func (x *ListUserResponse) GetTotalPage() int32

func (*ListUserResponse) GetUsers

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

func (*ListUserResponse) ProtoMessage

func (*ListUserResponse) ProtoMessage()

func (*ListUserResponse) ProtoReflect

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

func (*ListUserResponse) Reset

func (x *ListUserResponse) Reset()

func (*ListUserResponse) String

func (x *ListUserResponse) String() string

func (*ListUserResponse) Validate

func (m *ListUserResponse) Validate() error

Validate checks the field values on ListUserResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListUserResponse) ValidateAll

func (m *ListUserResponse) ValidateAll() error

ValidateAll checks the field values on ListUserResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListUserResponseMultiError, or nil if none found.

type ListUserResponseMultiError

type ListUserResponseMultiError []error

ListUserResponseMultiError is an error wrapping multiple validation errors returned by ListUserResponse.ValidateAll() if the designated constraints aren't met.

func (ListUserResponseMultiError) AllErrors

func (m ListUserResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListUserResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ListUserResponseValidationError

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

ListUserResponseValidationError is the validation error returned by ListUserResponse.Validate if the designated constraints aren't met.

func (ListUserResponseValidationError) Cause

Cause function returns cause value.

func (ListUserResponseValidationError) Error

Error satisfies the builtin error interface

func (ListUserResponseValidationError) ErrorName

ErrorName returns error name.

func (ListUserResponseValidationError) Field

Field function returns field value.

func (ListUserResponseValidationError) Key

Key function returns key value.

func (ListUserResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) CreateUser

func (UnimplementedUserServiceServer) DeleteUser added in v0.0.2

func (UnimplementedUserServiceServer) DetailUser

func (UnimplementedUserServiceServer) ListUser

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 UpdateUserInput

type UpdateUserInput 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"`
	Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateUserInput) Descriptor deprecated

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

Deprecated: Use UpdateUserInput.ProtoReflect.Descriptor instead.

func (*UpdateUserInput) GetEmail

func (x *UpdateUserInput) GetEmail() string

func (*UpdateUserInput) GetId

func (x *UpdateUserInput) GetId() string

func (*UpdateUserInput) GetName

func (x *UpdateUserInput) GetName() string

func (*UpdateUserInput) GetPhone added in v0.0.2

func (x *UpdateUserInput) GetPhone() string

func (*UpdateUserInput) ProtoMessage

func (*UpdateUserInput) ProtoMessage()

func (*UpdateUserInput) ProtoReflect

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

func (*UpdateUserInput) Reset

func (x *UpdateUserInput) Reset()

func (*UpdateUserInput) String

func (x *UpdateUserInput) String() string

func (*UpdateUserInput) Validate

func (m *UpdateUserInput) Validate() error

Validate checks the field values on UpdateUserInput with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UpdateUserInput) ValidateAll

func (m *UpdateUserInput) ValidateAll() error

ValidateAll checks the field values on UpdateUserInput with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateUserInputMultiError, or nil if none found.

type UpdateUserInputMultiError

type UpdateUserInputMultiError []error

UpdateUserInputMultiError is an error wrapping multiple validation errors returned by UpdateUserInput.ValidateAll() if the designated constraints aren't met.

func (UpdateUserInputMultiError) AllErrors

func (m UpdateUserInputMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateUserInputMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type UpdateUserInputValidationError

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

UpdateUserInputValidationError is the validation error returned by UpdateUserInput.Validate if the designated constraints aren't met.

func (UpdateUserInputValidationError) Cause

Cause function returns cause value.

func (UpdateUserInputValidationError) Error

Error satisfies the builtin error interface

func (UpdateUserInputValidationError) ErrorName

func (e UpdateUserInputValidationError) ErrorName() string

ErrorName returns error name.

func (UpdateUserInputValidationError) Field

Field function returns field value.

func (UpdateUserInputValidationError) Key

Key function returns key value.

func (UpdateUserInputValidationError) Reason

Reason function returns reason value.

type User

type User 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"`
	Email     string                 `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Phone     string                 `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetCreatedAt

func (x *User) GetCreatedAt() *timestamppb.Timestamp

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetId

func (x *User) GetId() string

func (*User) GetName

func (x *User) GetName() string

func (*User) GetPhone

func (x *User) GetPhone() string

func (*User) GetUpdatedAt

func (x *User) GetUpdatedAt() *timestamppb.Timestamp

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

func (*User) Validate

func (m *User) Validate() error

Validate checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*User) ValidateAll

func (m *User) ValidateAll() error

ValidateAll checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserMultiError, or nil if none found.

type UserMultiError

type UserMultiError []error

UserMultiError is an error wrapping multiple validation errors returned by User.ValidateAll() if the designated constraints aren't met.

func (UserMultiError) AllErrors

func (m UserMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserMultiError) Error

func (m UserMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type UserServiceClient

type UserServiceClient interface {
	CreateUser(ctx context.Context, in *CreateUserInput, opts ...grpc.CallOption) (*User, error)
	UpdateUser(ctx context.Context, in *UpdateUserInput, opts ...grpc.CallOption) (*User, error)
	DetailUser(ctx context.Context, in *DetailUserInput, opts ...grpc.CallOption) (*User, error)
	ListUser(ctx context.Context, in *ListUserInput, opts ...grpc.CallOption) (*ListUserResponse, error)
	DeleteUser(ctx context.Context, in *DeleteUserInput, opts ...grpc.CallOption) (*User, 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, *CreateUserInput) (*User, error)
	UpdateUser(context.Context, *UpdateUserInput) (*User, error)
	DetailUser(context.Context, *DetailUserInput) (*User, error)
	ListUser(context.Context, *ListUserInput) (*ListUserResponse, error)
	DeleteUser(context.Context, *DeleteUserInput) (*User, error)
	// contains filtered or unexported methods
}

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

type UserValidationError

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

UserValidationError is the validation error returned by User.Validate if the designated constraints aren't met.

func (UserValidationError) Cause

func (e UserValidationError) Cause() error

Cause function returns cause value.

func (UserValidationError) Error

func (e UserValidationError) Error() string

Error satisfies the builtin error interface

func (UserValidationError) ErrorName

func (e UserValidationError) ErrorName() string

ErrorName returns error name.

func (UserValidationError) Field

func (e UserValidationError) Field() string

Field function returns field value.

func (UserValidationError) Key

func (e UserValidationError) Key() bool

Key function returns key value.

func (UserValidationError) Reason

func (e UserValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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