user_v1

package
v0.0.0-...-aaa61ac Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: MIT Imports: 33 Imported by: 0

Documentation

Overview

Package user_v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	UserV1_Create_FullMethodName = "/user_v1.UserV1/Create"
	UserV1_Get_FullMethodName    = "/user_v1.UserV1/Get"
	UserV1_Update_FullMethodName = "/user_v1.UserV1/Update"
	UserV1_Delete_FullMethodName = "/user_v1.UserV1/Delete"
)

Variables

View Source
var (
	RoleInfo_name = map[int32]string{
		0: "USER",
		1: "ADMIN",
	}
	RoleInfo_value = map[string]int32{
		"USER":  0,
		"ADMIN": 1,
	}
)

Enum value maps for RoleInfo.

View Source
var File_service_proto protoreflect.FileDescriptor
View Source
var UserV1_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user_v1.UserV1",
	HandlerType: (*UserV1Server)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _UserV1_Create_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _UserV1_Get_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _UserV1_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _UserV1_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "service.proto",
}

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

Functions

func RegisterUserV1Handler

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

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

func RegisterUserV1HandlerClient

func RegisterUserV1HandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserV1Client) error

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

func RegisterUserV1HandlerFromEndpoint

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

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

func RegisterUserV1HandlerServer

func RegisterUserV1HandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserV1Server) error

RegisterUserV1HandlerServer registers the http handlers for service UserV1 to "mux". UnaryRPC :call UserV1Server 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 RegisterUserV1HandlerFromEndpoint instead.

func RegisterUserV1Server

func RegisterUserV1Server(s grpc.ServiceRegistrar, srv UserV1Server)

Types

type CreateRequest

type CreateRequest struct {
	User            *User  `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	PasswordConfirm string `protobuf:"bytes,4,opt,name=password_confirm,json=passwordConfirm,proto3" json:"password_confirm,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetPasswordConfirm

func (x *CreateRequest) GetPasswordConfirm() string

func (*CreateRequest) GetUser

func (x *CreateRequest) GetUser() *User

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

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

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

func (*CreateRequest) Validate

func (m *CreateRequest) Validate() error

Validate checks the field values on CreateRequest 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 (*CreateRequest) ValidateAll

func (m *CreateRequest) ValidateAll() error

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

type CreateRequestMultiError

type CreateRequestMultiError []error

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

func (CreateRequestMultiError) AllErrors

func (m CreateRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateRequestMultiError) Error

func (m CreateRequestMultiError) Error() string

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

type CreateRequestValidationError

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

CreateRequestValidationError is the validation error returned by CreateRequest.Validate if the designated constraints aren't met.

func (CreateRequestValidationError) Cause

Cause function returns cause value.

func (CreateRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateRequestValidationError) ErrorName

func (e CreateRequestValidationError) ErrorName() string

ErrorName returns error name.

func (CreateRequestValidationError) Field

Field function returns field value.

func (CreateRequestValidationError) Key

Key function returns key value.

func (CreateRequestValidationError) Reason

Reason function returns reason value.

type DeleteRequest

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

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetUsername

func (x *DeleteRequest) GetUsername() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

func (*DeleteRequest) Validate

func (m *DeleteRequest) Validate() error

Validate checks the field values on DeleteRequest 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 (*DeleteRequest) ValidateAll

func (m *DeleteRequest) ValidateAll() error

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

type DeleteRequestMultiError

type DeleteRequestMultiError []error

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

func (DeleteRequestMultiError) AllErrors

func (m DeleteRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DeleteRequestMultiError) Error

func (m DeleteRequestMultiError) Error() string

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

type DeleteRequestValidationError

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

DeleteRequestValidationError is the validation error returned by DeleteRequest.Validate if the designated constraints aren't met.

func (DeleteRequestValidationError) Cause

Cause function returns cause value.

func (DeleteRequestValidationError) Error

Error satisfies the builtin error interface

func (DeleteRequestValidationError) ErrorName

func (e DeleteRequestValidationError) ErrorName() string

ErrorName returns error name.

func (DeleteRequestValidationError) Field

Field function returns field value.

func (DeleteRequestValidationError) Key

Key function returns key value.

func (DeleteRequestValidationError) Reason

Reason function returns reason value.

type GetRequest

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

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetUsername

func (x *GetRequest) GetUsername() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

func (*GetRequest) Validate

func (m *GetRequest) Validate() error

Validate checks the field values on GetRequest 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 (*GetRequest) ValidateAll

func (m *GetRequest) ValidateAll() error

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

type GetRequestMultiError

type GetRequestMultiError []error

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

func (GetRequestMultiError) AllErrors

func (m GetRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetRequestMultiError) Error

func (m GetRequestMultiError) Error() string

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

type GetRequestValidationError

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

GetRequestValidationError is the validation error returned by GetRequest.Validate if the designated constraints aren't met.

func (GetRequestValidationError) Cause

func (e GetRequestValidationError) Cause() error

Cause function returns cause value.

func (GetRequestValidationError) Error

Error satisfies the builtin error interface

func (GetRequestValidationError) ErrorName

func (e GetRequestValidationError) ErrorName() string

ErrorName returns error name.

func (GetRequestValidationError) Field

Field function returns field value.

func (GetRequestValidationError) Key

Key function returns key value.

func (GetRequestValidationError) Reason

func (e GetRequestValidationError) Reason() string

Reason function returns reason value.

type GetResponse

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

func (*GetResponse) Descriptor deprecated

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

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetUserInfo

func (x *GetResponse) GetUserInfo() *UserInfo

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

func (*GetResponse) Validate

func (m *GetResponse) Validate() error

Validate checks the field values on GetResponse 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 (*GetResponse) ValidateAll

func (m *GetResponse) ValidateAll() error

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

type GetResponseMultiError

type GetResponseMultiError []error

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

func (GetResponseMultiError) AllErrors

func (m GetResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetResponseMultiError) Error

func (m GetResponseMultiError) Error() string

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

type GetResponseValidationError

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

GetResponseValidationError is the validation error returned by GetResponse.Validate if the designated constraints aren't met.

func (GetResponseValidationError) Cause

Cause function returns cause value.

func (GetResponseValidationError) Error

Error satisfies the builtin error interface

func (GetResponseValidationError) ErrorName

func (e GetResponseValidationError) ErrorName() string

ErrorName returns error name.

func (GetResponseValidationError) Field

Field function returns field value.

func (GetResponseValidationError) Key

Key function returns key value.

func (GetResponseValidationError) Reason

Reason function returns reason value.

type RoleInfo

type RoleInfo int32
const (
	RoleInfo_USER  RoleInfo = 0
	RoleInfo_ADMIN RoleInfo = 1
)

func (RoleInfo) Descriptor

func (RoleInfo) Descriptor() protoreflect.EnumDescriptor

func (RoleInfo) Enum

func (x RoleInfo) Enum() *RoleInfo

func (RoleInfo) EnumDescriptor deprecated

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

Deprecated: Use RoleInfo.Descriptor instead.

func (RoleInfo) Number

func (x RoleInfo) Number() protoreflect.EnumNumber

func (RoleInfo) String

func (x RoleInfo) String() string

func (RoleInfo) Type

type UnimplementedUserV1Server

type UnimplementedUserV1Server struct {
}

UnimplementedUserV1Server must be embedded to have forward compatible implementations.

func (UnimplementedUserV1Server) Create

func (UnimplementedUserV1Server) Delete

func (UnimplementedUserV1Server) Get

func (UnimplementedUserV1Server) Update

type UnsafeUserV1Server

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

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

type UpdateRequest

type UpdateRequest struct {
	Username string        `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	User     *UserNullable `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRequest) Descriptor deprecated

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

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetUser

func (x *UpdateRequest) GetUser() *UserNullable

func (*UpdateRequest) GetUsername

func (x *UpdateRequest) GetUsername() string

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect

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

func (*UpdateRequest) Reset

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String

func (x *UpdateRequest) String() string

func (*UpdateRequest) Validate

func (m *UpdateRequest) Validate() error

Validate checks the field values on UpdateRequest 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 (*UpdateRequest) ValidateAll

func (m *UpdateRequest) ValidateAll() error

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

type UpdateRequestMultiError

type UpdateRequestMultiError []error

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

func (UpdateRequestMultiError) AllErrors

func (m UpdateRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateRequestMultiError) Error

func (m UpdateRequestMultiError) Error() string

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

type UpdateRequestValidationError

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

UpdateRequestValidationError is the validation error returned by UpdateRequest.Validate if the designated constraints aren't met.

func (UpdateRequestValidationError) Cause

Cause function returns cause value.

func (UpdateRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateRequestValidationError) ErrorName

func (e UpdateRequestValidationError) ErrorName() string

ErrorName returns error name.

func (UpdateRequestValidationError) Field

Field function returns field value.

func (UpdateRequestValidationError) Key

Key function returns key value.

func (UpdateRequestValidationError) Reason

Reason function returns reason value.

type User

type User struct {

	// user's username
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	// user's email
	Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	// user's password
	Password string   `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	Role     RoleInfo `protobuf:"varint,5,opt,name=role,proto3,enum=user_v1.RoleInfo" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetPassword

func (x *User) GetPassword() string

func (*User) GetRole

func (x *User) GetRole() RoleInfo

func (*User) GetUsername

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

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 UserInfo

type UserInfo struct {
	User      *User                  `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInfo) Descriptor deprecated

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

Deprecated: Use UserInfo.ProtoReflect.Descriptor instead.

func (*UserInfo) GetCreatedAt

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

func (*UserInfo) GetUpdatedAt

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

func (*UserInfo) GetUser

func (x *UserInfo) GetUser() *User

func (*UserInfo) ProtoMessage

func (*UserInfo) ProtoMessage()

func (*UserInfo) ProtoReflect

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

func (*UserInfo) Reset

func (x *UserInfo) Reset()

func (*UserInfo) String

func (x *UserInfo) String() string

func (*UserInfo) Validate

func (m *UserInfo) Validate() error

Validate checks the field values on UserInfo 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 (*UserInfo) ValidateAll

func (m *UserInfo) ValidateAll() error

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

type UserInfoMultiError

type UserInfoMultiError []error

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

func (UserInfoMultiError) AllErrors

func (m UserInfoMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserInfoMultiError) Error

func (m UserInfoMultiError) Error() string

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

type UserInfoValidationError

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

UserInfoValidationError is the validation error returned by UserInfo.Validate if the designated constraints aren't met.

func (UserInfoValidationError) Cause

func (e UserInfoValidationError) Cause() error

Cause function returns cause value.

func (UserInfoValidationError) Error

func (e UserInfoValidationError) Error() string

Error satisfies the builtin error interface

func (UserInfoValidationError) ErrorName

func (e UserInfoValidationError) ErrorName() string

ErrorName returns error name.

func (UserInfoValidationError) Field

func (e UserInfoValidationError) Field() string

Field function returns field value.

func (UserInfoValidationError) Key

func (e UserInfoValidationError) Key() bool

Key function returns key value.

func (UserInfoValidationError) Reason

func (e UserInfoValidationError) Reason() string

Reason function returns reason value.

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 UserNullable

type UserNullable struct {
	Username *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Email    *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Password *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	Role     RoleInfo                `protobuf:"varint,5,opt,name=role,proto3,enum=user_v1.RoleInfo" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*UserNullable) Descriptor deprecated

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

Deprecated: Use UserNullable.ProtoReflect.Descriptor instead.

func (*UserNullable) GetEmail

func (x *UserNullable) GetEmail() *wrapperspb.StringValue

func (*UserNullable) GetPassword

func (x *UserNullable) GetPassword() *wrapperspb.StringValue

func (*UserNullable) GetRole

func (x *UserNullable) GetRole() RoleInfo

func (*UserNullable) GetUsername

func (x *UserNullable) GetUsername() *wrapperspb.StringValue

func (*UserNullable) ProtoMessage

func (*UserNullable) ProtoMessage()

func (*UserNullable) ProtoReflect

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

func (*UserNullable) Reset

func (x *UserNullable) Reset()

func (*UserNullable) String

func (x *UserNullable) String() string

func (*UserNullable) Validate

func (m *UserNullable) Validate() error

Validate checks the field values on UserNullable 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 (*UserNullable) ValidateAll

func (m *UserNullable) ValidateAll() error

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

type UserNullableMultiError

type UserNullableMultiError []error

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

func (UserNullableMultiError) AllErrors

func (m UserNullableMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserNullableMultiError) Error

func (m UserNullableMultiError) Error() string

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

type UserNullableValidationError

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

UserNullableValidationError is the validation error returned by UserNullable.Validate if the designated constraints aren't met.

func (UserNullableValidationError) Cause

Cause function returns cause value.

func (UserNullableValidationError) Error

Error satisfies the builtin error interface

func (UserNullableValidationError) ErrorName

func (e UserNullableValidationError) ErrorName() string

ErrorName returns error name.

func (UserNullableValidationError) Field

Field function returns field value.

func (UserNullableValidationError) Key

Key function returns key value.

func (UserNullableValidationError) Reason

Reason function returns reason value.

type UserV1Client

type UserV1Client interface {
	// Creates new user
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

UserV1Client is the client API for UserV1 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.

func NewUserV1Client

func NewUserV1Client(cc grpc.ClientConnInterface) UserV1Client

type UserV1Server

type UserV1Server interface {
	// Creates new user
	Create(context.Context, *CreateRequest) (*emptypb.Empty, error)
	Get(context.Context, *GetRequest) (*GetResponse, error)
	Update(context.Context, *UpdateRequest) (*emptypb.Empty, error)
	Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

UserV1Server is the server API for UserV1 service. All implementations must embed UnimplementedUserV1Server 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