v1

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 30 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	UserService_GetUser_FullMethodName    = "/user.v1.UserService/GetUser"
	UserService_CreateUser_FullMethodName = "/user.v1.UserService/CreateUser"
	UserService_Signup_FullMethodName     = "/user.v1.UserService/Signup"
)

Variables

View Source
var File_user_v1_user_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,
		},
		{
			MethodName: "CreateUser",
			Handler:    _UserService_CreateUser_Handler,
		},
		{
			MethodName: "Signup",
			Handler:    _UserService_Signup_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user/v1/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 RegisterUserServiceHandler added in v1.2.0

func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterUserServiceHandler registers the http handlers for service UserService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterUserServiceHandlerClient added in v1.2.0

func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error

RegisterUserServiceHandlerClient registers the http handlers for service UserService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UserServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.

func RegisterUserServiceHandlerFromEndpoint added in v1.2.0

func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterUserServiceHandlerFromEndpoint is same as RegisterUserServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterUserServiceHandlerServer added in v1.2.0

func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error

RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux". UnaryRPC :call UserServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.

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"`
	State   string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
	Zip     string `protobuf:"bytes,4,opt,name=zip,proto3" json:"zip,omitempty"`
	Country string `protobuf:"bytes,5,opt,name=country,proto3" json:"country,omitempty"` // e.g. US, IT
	// contains filtered or unexported fields
}

The Address message represents a physical location.

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) GetCountry

func (x *Address) GetCountry() string

func (*Address) GetState

func (x *Address) GetState() string

func (*Address) GetStreet

func (x *Address) GetStreet() string

func (*Address) GetZip

func (x *Address) GetZip() 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

func (*Address) Validate added in v1.1.1

func (m *Address) Validate() error

Validate checks the field values on Address 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 (*Address) ValidateAll added in v1.1.1

func (m *Address) ValidateAll() error

ValidateAll checks the field values on Address 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 AddressMultiError, or nil if none found.

type AddressMultiError added in v1.1.1

type AddressMultiError []error

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

func (AddressMultiError) AllErrors added in v1.1.1

func (m AddressMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AddressMultiError) Error added in v1.1.1

func (m AddressMultiError) Error() string

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

type AddressValidationError added in v1.1.1

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

AddressValidationError is the validation error returned by Address.Validate if the designated constraints aren't met.

func (AddressValidationError) Cause added in v1.1.1

func (e AddressValidationError) Cause() error

Cause function returns cause value.

func (AddressValidationError) Error added in v1.1.1

func (e AddressValidationError) Error() string

Error satisfies the builtin error interface

func (AddressValidationError) ErrorName added in v1.1.1

func (e AddressValidationError) ErrorName() string

ErrorName returns error name.

func (AddressValidationError) Field added in v1.1.1

func (e AddressValidationError) Field() string

Field function returns field value.

func (AddressValidationError) Key added in v1.1.1

func (e AddressValidationError) Key() bool

Key function returns key value.

func (AddressValidationError) Reason added in v1.1.1

func (e AddressValidationError) Reason() string

Reason function returns reason value.

type CreateUserRequest

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

Request to create a new user.

func (*CreateUserRequest) Descriptor deprecated

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

Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.

func (*CreateUserRequest) GetEmail

func (x *CreateUserRequest) GetEmail() string

func (*CreateUserRequest) GetFirstName

func (x *CreateUserRequest) GetFirstName() string

func (*CreateUserRequest) GetLastName

func (x *CreateUserRequest) GetLastName() string

func (*CreateUserRequest) GetPassword added in v1.2.1

func (x *CreateUserRequest) GetPassword() string

func (*CreateUserRequest) GetRole

func (x *CreateUserRequest) GetRole() string

func (*CreateUserRequest) ProtoMessage

func (*CreateUserRequest) ProtoMessage()

func (*CreateUserRequest) ProtoReflect

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

func (*CreateUserRequest) Reset

func (x *CreateUserRequest) Reset()

func (*CreateUserRequest) String

func (x *CreateUserRequest) String() string

func (*CreateUserRequest) Validate added in v1.1.1

func (m *CreateUserRequest) Validate() error

Validate checks the field values on CreateUserRequest 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 (*CreateUserRequest) ValidateAll added in v1.1.1

func (m *CreateUserRequest) ValidateAll() error

ValidateAll checks the field values on CreateUserRequest 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 CreateUserRequestMultiError, or nil if none found.

type CreateUserRequestMultiError added in v1.1.1

type CreateUserRequestMultiError []error

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

func (CreateUserRequestMultiError) AllErrors added in v1.1.1

func (m CreateUserRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateUserRequestMultiError) Error added in v1.1.1

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

type CreateUserRequestValidationError added in v1.1.1

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

CreateUserRequestValidationError is the validation error returned by CreateUserRequest.Validate if the designated constraints aren't met.

func (CreateUserRequestValidationError) Cause added in v1.1.1

Cause function returns cause value.

func (CreateUserRequestValidationError) Error added in v1.1.1

Error satisfies the builtin error interface

func (CreateUserRequestValidationError) ErrorName added in v1.1.1

ErrorName returns error name.

func (CreateUserRequestValidationError) Field added in v1.1.1

Field function returns field value.

func (CreateUserRequestValidationError) Key added in v1.1.1

Key function returns key value.

func (CreateUserRequestValidationError) Reason added in v1.1.1

Reason function returns reason value.

type CreateUserResponse

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

Response for creating a user.

func (*CreateUserResponse) Descriptor deprecated

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

Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.

func (*CreateUserResponse) GetUser

func (x *CreateUserResponse) GetUser() *User

func (*CreateUserResponse) ProtoMessage

func (*CreateUserResponse) ProtoMessage()

func (*CreateUserResponse) ProtoReflect

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

func (*CreateUserResponse) Reset

func (x *CreateUserResponse) Reset()

func (*CreateUserResponse) String

func (x *CreateUserResponse) String() string

func (*CreateUserResponse) Validate added in v1.1.1

func (m *CreateUserResponse) Validate() error

Validate checks the field values on CreateUserResponse 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 (*CreateUserResponse) ValidateAll added in v1.1.1

func (m *CreateUserResponse) ValidateAll() error

ValidateAll checks the field values on CreateUserResponse 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 CreateUserResponseMultiError, or nil if none found.

type CreateUserResponseMultiError added in v1.1.1

type CreateUserResponseMultiError []error

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

func (CreateUserResponseMultiError) AllErrors added in v1.1.1

func (m CreateUserResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateUserResponseMultiError) Error added in v1.1.1

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

type CreateUserResponseValidationError added in v1.1.1

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

CreateUserResponseValidationError is the validation error returned by CreateUserResponse.Validate if the designated constraints aren't met.

func (CreateUserResponseValidationError) Cause added in v1.1.1

Cause function returns cause value.

func (CreateUserResponseValidationError) Error added in v1.1.1

Error satisfies the builtin error interface

func (CreateUserResponseValidationError) ErrorName added in v1.1.1

ErrorName returns error name.

func (CreateUserResponseValidationError) Field added in v1.1.1

Field function returns field value.

func (CreateUserResponseValidationError) Key added in v1.1.1

Key function returns key value.

func (CreateUserResponseValidationError) Reason added in v1.1.1

Reason function returns reason value.

type GetUserRequest

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

Request to get a user by ID.

func (*GetUserRequest) Descriptor deprecated

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

Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.

func (*GetUserRequest) GetId

func (x *GetUserRequest) GetId() 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

func (*GetUserRequest) Validate added in v1.1.1

func (m *GetUserRequest) Validate() error

Validate checks the field values on GetUserRequest 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 (*GetUserRequest) ValidateAll added in v1.1.1

func (m *GetUserRequest) ValidateAll() error

ValidateAll checks the field values on GetUserRequest 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 GetUserRequestMultiError, or nil if none found.

type GetUserRequestMultiError added in v1.1.1

type GetUserRequestMultiError []error

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

func (GetUserRequestMultiError) AllErrors added in v1.1.1

func (m GetUserRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetUserRequestMultiError) Error added in v1.1.1

func (m GetUserRequestMultiError) Error() string

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

type GetUserRequestValidationError added in v1.1.1

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

GetUserRequestValidationError is the validation error returned by GetUserRequest.Validate if the designated constraints aren't met.

func (GetUserRequestValidationError) Cause added in v1.1.1

Cause function returns cause value.

func (GetUserRequestValidationError) Error added in v1.1.1

Error satisfies the builtin error interface

func (GetUserRequestValidationError) ErrorName added in v1.1.1

func (e GetUserRequestValidationError) ErrorName() string

ErrorName returns error name.

func (GetUserRequestValidationError) Field added in v1.1.1

Field function returns field value.

func (GetUserRequestValidationError) Key added in v1.1.1

Key function returns key value.

func (GetUserRequestValidationError) Reason added in v1.1.1

Reason function returns reason value.

type GetUserResponse

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

Response for getting a user.

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

func (*GetUserResponse) Validate added in v1.1.1

func (m *GetUserResponse) Validate() error

Validate checks the field values on GetUserResponse 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 (*GetUserResponse) ValidateAll added in v1.1.1

func (m *GetUserResponse) ValidateAll() error

ValidateAll checks the field values on GetUserResponse 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 GetUserResponseMultiError, or nil if none found.

type GetUserResponseMultiError added in v1.1.1

type GetUserResponseMultiError []error

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

func (GetUserResponseMultiError) AllErrors added in v1.1.1

func (m GetUserResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetUserResponseMultiError) Error added in v1.1.1

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

type GetUserResponseValidationError added in v1.1.1

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

GetUserResponseValidationError is the validation error returned by GetUserResponse.Validate if the designated constraints aren't met.

func (GetUserResponseValidationError) Cause added in v1.1.1

Cause function returns cause value.

func (GetUserResponseValidationError) Error added in v1.1.1

Error satisfies the builtin error interface

func (GetUserResponseValidationError) ErrorName added in v1.1.1

func (e GetUserResponseValidationError) ErrorName() string

ErrorName returns error name.

func (GetUserResponseValidationError) Field added in v1.1.1

Field function returns field value.

func (GetUserResponseValidationError) Key added in v1.1.1

Key function returns key value.

func (GetUserResponseValidationError) Reason added in v1.1.1

Reason function returns reason value.

type SignupRequest added in v1.1.1

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

Request for customer signup

func (*SignupRequest) Descriptor deprecated added in v1.1.1

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

Deprecated: Use SignupRequest.ProtoReflect.Descriptor instead.

func (*SignupRequest) GetEmail added in v1.1.1

func (x *SignupRequest) GetEmail() string

func (*SignupRequest) GetFirstName added in v1.1.1

func (x *SignupRequest) GetFirstName() string

func (*SignupRequest) GetLastName added in v1.1.1

func (x *SignupRequest) GetLastName() string

func (*SignupRequest) GetPassword added in v1.1.1

func (x *SignupRequest) GetPassword() string

func (*SignupRequest) ProtoMessage added in v1.1.1

func (*SignupRequest) ProtoMessage()

func (*SignupRequest) ProtoReflect added in v1.1.1

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

func (*SignupRequest) Reset added in v1.1.1

func (x *SignupRequest) Reset()

func (*SignupRequest) String added in v1.1.1

func (x *SignupRequest) String() string

func (*SignupRequest) Validate added in v1.1.1

func (m *SignupRequest) Validate() error

Validate checks the field values on SignupRequest 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 (*SignupRequest) ValidateAll added in v1.1.1

func (m *SignupRequest) ValidateAll() error

ValidateAll checks the field values on SignupRequest 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 SignupRequestMultiError, or nil if none found.

type SignupRequestMultiError added in v1.1.1

type SignupRequestMultiError []error

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

func (SignupRequestMultiError) AllErrors added in v1.1.1

func (m SignupRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SignupRequestMultiError) Error added in v1.1.1

func (m SignupRequestMultiError) Error() string

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

type SignupRequestValidationError added in v1.1.1

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

SignupRequestValidationError is the validation error returned by SignupRequest.Validate if the designated constraints aren't met.

func (SignupRequestValidationError) Cause added in v1.1.1

Cause function returns cause value.

func (SignupRequestValidationError) Error added in v1.1.1

Error satisfies the builtin error interface

func (SignupRequestValidationError) ErrorName added in v1.1.1

func (e SignupRequestValidationError) ErrorName() string

ErrorName returns error name.

func (SignupRequestValidationError) Field added in v1.1.1

Field function returns field value.

func (SignupRequestValidationError) Key added in v1.1.1

Key function returns key value.

func (SignupRequestValidationError) Reason added in v1.1.1

Reason function returns reason value.

type SignupResponse added in v1.1.1

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

Response for customer signup

func (*SignupResponse) Descriptor deprecated added in v1.1.1

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

Deprecated: Use SignupResponse.ProtoReflect.Descriptor instead.

func (*SignupResponse) GetUser added in v1.2.0

func (x *SignupResponse) GetUser() *User

func (*SignupResponse) ProtoMessage added in v1.1.1

func (*SignupResponse) ProtoMessage()

func (*SignupResponse) ProtoReflect added in v1.1.1

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

func (*SignupResponse) Reset added in v1.1.1

func (x *SignupResponse) Reset()

func (*SignupResponse) String added in v1.1.1

func (x *SignupResponse) String() string

func (*SignupResponse) Validate added in v1.1.1

func (m *SignupResponse) Validate() error

Validate checks the field values on SignupResponse 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 (*SignupResponse) ValidateAll added in v1.1.1

func (m *SignupResponse) ValidateAll() error

ValidateAll checks the field values on SignupResponse 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 SignupResponseMultiError, or nil if none found.

type SignupResponseMultiError added in v1.1.1

type SignupResponseMultiError []error

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

func (SignupResponseMultiError) AllErrors added in v1.1.1

func (m SignupResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SignupResponseMultiError) Error added in v1.1.1

func (m SignupResponseMultiError) Error() string

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

type SignupResponseValidationError added in v1.1.1

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

SignupResponseValidationError is the validation error returned by SignupResponse.Validate if the designated constraints aren't met.

func (SignupResponseValidationError) Cause added in v1.1.1

Cause function returns cause value.

func (SignupResponseValidationError) Error added in v1.1.1

Error satisfies the builtin error interface

func (SignupResponseValidationError) ErrorName added in v1.1.1

func (e SignupResponseValidationError) ErrorName() string

ErrorName returns error name.

func (SignupResponseValidationError) Field added in v1.1.1

Field function returns field value.

func (SignupResponseValidationError) Key added in v1.1.1

Key function returns key value.

func (SignupResponseValidationError) Reason added in v1.1.1

Reason function returns reason value.

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct{}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedUserServiceServer) CreateUser

func (UnimplementedUserServiceServer) GetUser

func (UnimplementedUserServiceServer) Signup added in v1.1.1

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"`
	Email     string   `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	FirstName string   `protobuf:"bytes,3,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
	LastName  string   `protobuf:"bytes,8,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	Role      string   `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"`
	CreatedAt string   `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt string   `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	Address   *Address `protobuf:"bytes,7,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

The User message represents an e-commerce customer.

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAddress added in v1.1.1

func (x *User) GetAddress() *Address

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) GetRole

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

func (*User) Validate added in v1.1.1

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 added in v1.1.1

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 added in v1.1.1

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 added in v1.1.1

func (m UserMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserMultiError) Error added in v1.1.1

func (m UserMultiError) Error() string

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

type UserServiceClient

type UserServiceClient interface {
	GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
	CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
	Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponse, 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.

UserService provides user management operations.

type UserServiceServer

type UserServiceServer interface {
	GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
	CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
	Signup(context.Context, *SignupRequest) (*SignupResponse, error)
	// contains filtered or unexported methods
}

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

UserService provides user management operations.

type UserValidationError added in v1.1.1

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 added in v1.1.1

func (e UserValidationError) Cause() error

Cause function returns cause value.

func (UserValidationError) Error added in v1.1.1

func (e UserValidationError) Error() string

Error satisfies the builtin error interface

func (UserValidationError) ErrorName added in v1.1.1

func (e UserValidationError) ErrorName() string

ErrorName returns error name.

func (UserValidationError) Field added in v1.1.1

func (e UserValidationError) Field() string

Field function returns field value.

func (UserValidationError) Key added in v1.1.1

func (e UserValidationError) Key() bool

Key function returns key value.

func (UserValidationError) Reason added in v1.1.1

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