v1

package
v0.0.0-...-cf50efe Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ShopInterfaceErrorReason_name = map[int32]string{
		0: "UNKNOWN_ERROR",
		1: "LOGIN_FAILED",
	}
	ShopInterfaceErrorReason_value = map[string]int32{
		"UNKNOWN_ERROR": 0,
		"LOGIN_FAILED":  1,
	}
)

Enum value maps for ShopInterfaceErrorReason.

View Source
var File_api_shop_interface_v1_shop_interface_error_proto protoreflect.FileDescriptor
View Source
var File_api_shop_interface_v1_shop_interface_proto protoreflect.FileDescriptor
View Source
var ShopInterface_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "shop.interface.v1.ShopInterface",
	HandlerType: (*ShopInterfaceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _ShopInterface_Register_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/shop/interface/v1/shop_interface.proto",
}

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

Functions

func ErrorLoginFailed

func ErrorLoginFailed(format string, args ...interface{}) *errors.Error

func ErrorUnknownError

func ErrorUnknownError(format string, args ...interface{}) *errors.Error

func IsLoginFailed

func IsLoginFailed(err error) bool

func IsUnknownError

func IsUnknownError(err error) bool

func RegisterShopInterfaceHTTPServer

func RegisterShopInterfaceHTTPServer(s *http.Server, srv ShopInterfaceHTTPServer)

func RegisterShopInterfaceServer

func RegisterShopInterfaceServer(s grpc.ServiceRegistrar, srv ShopInterfaceServer)

Types

type RegisterReply

type RegisterReply struct {
	Id     int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Mobile string `protobuf:"bytes,2,opt,name=mobile,proto3" json:"mobile,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterReply) Descriptor deprecated

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

Deprecated: Use RegisterReply.ProtoReflect.Descriptor instead.

func (*RegisterReply) GetId

func (x *RegisterReply) GetId() int64

func (*RegisterReply) GetMobile

func (x *RegisterReply) GetMobile() string

func (*RegisterReply) ProtoMessage

func (*RegisterReply) ProtoMessage()

func (*RegisterReply) ProtoReflect

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

func (*RegisterReply) Reset

func (x *RegisterReply) Reset()

func (*RegisterReply) String

func (x *RegisterReply) String() string

func (*RegisterReply) Validate

func (m *RegisterReply) Validate() error

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

func (m *RegisterReply) ValidateAll() error

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

type RegisterReplyMultiError

type RegisterReplyMultiError []error

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

func (RegisterReplyMultiError) AllErrors

func (m RegisterReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RegisterReplyMultiError) Error

func (m RegisterReplyMultiError) Error() string

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

type RegisterReplyValidationError

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

RegisterReplyValidationError is the validation error returned by RegisterReply.Validate if the designated constraints aren't met.

func (RegisterReplyValidationError) Cause

Cause function returns cause value.

func (RegisterReplyValidationError) Error

Error satisfies the builtin error interface

func (RegisterReplyValidationError) ErrorName

func (e RegisterReplyValidationError) ErrorName() string

ErrorName returns error name.

func (RegisterReplyValidationError) Field

Field function returns field value.

func (RegisterReplyValidationError) Key

Key function returns key value.

func (RegisterReplyValidationError) Reason

Reason function returns reason value.

type RegisterReq

type RegisterReq struct {
	Mobile   string `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Code     string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterReq) Descriptor deprecated

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

Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.

func (*RegisterReq) GetCode

func (x *RegisterReq) GetCode() string

func (*RegisterReq) GetMobile

func (x *RegisterReq) GetMobile() string

func (*RegisterReq) GetPassword

func (x *RegisterReq) GetPassword() string

func (*RegisterReq) ProtoMessage

func (*RegisterReq) ProtoMessage()

func (*RegisterReq) ProtoReflect

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

func (*RegisterReq) Reset

func (x *RegisterReq) Reset()

func (*RegisterReq) String

func (x *RegisterReq) String() string

func (*RegisterReq) Validate

func (m *RegisterReq) Validate() error

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

func (m *RegisterReq) ValidateAll() error

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

type RegisterReqMultiError

type RegisterReqMultiError []error

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

func (RegisterReqMultiError) AllErrors

func (m RegisterReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RegisterReqMultiError) Error

func (m RegisterReqMultiError) Error() string

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

type RegisterReqValidationError

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

RegisterReqValidationError is the validation error returned by RegisterReq.Validate if the designated constraints aren't met.

func (RegisterReqValidationError) Cause

Cause function returns cause value.

func (RegisterReqValidationError) Error

Error satisfies the builtin error interface

func (RegisterReqValidationError) ErrorName

func (e RegisterReqValidationError) ErrorName() string

ErrorName returns error name.

func (RegisterReqValidationError) Field

Field function returns field value.

func (RegisterReqValidationError) Key

Key function returns key value.

func (RegisterReqValidationError) Reason

Reason function returns reason value.

type ShopInterfaceClient

type ShopInterfaceClient interface {
	Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterReply, error)
}

ShopInterfaceClient is the client API for ShopInterface 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 ShopInterfaceErrorReason

type ShopInterfaceErrorReason int32
const (
	ShopInterfaceErrorReason_UNKNOWN_ERROR ShopInterfaceErrorReason = 0
	ShopInterfaceErrorReason_LOGIN_FAILED  ShopInterfaceErrorReason = 1
)

func (ShopInterfaceErrorReason) Descriptor

func (ShopInterfaceErrorReason) Enum

func (ShopInterfaceErrorReason) EnumDescriptor deprecated

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

Deprecated: Use ShopInterfaceErrorReason.Descriptor instead.

func (ShopInterfaceErrorReason) Number

func (ShopInterfaceErrorReason) String

func (x ShopInterfaceErrorReason) String() string

func (ShopInterfaceErrorReason) Type

type ShopInterfaceHTTPClient

type ShopInterfaceHTTPClient interface {
	Register(ctx context.Context, req *RegisterReq, opts ...http.CallOption) (rsp *RegisterReply, err error)
}

func NewShopInterfaceHTTPClient

func NewShopInterfaceHTTPClient(client *http.Client) ShopInterfaceHTTPClient

type ShopInterfaceHTTPClientImpl

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

func (*ShopInterfaceHTTPClientImpl) Register

type ShopInterfaceHTTPServer

type ShopInterfaceHTTPServer interface {
	Register(context.Context, *RegisterReq) (*RegisterReply, error)
}

type ShopInterfaceServer

type ShopInterfaceServer interface {
	Register(context.Context, *RegisterReq) (*RegisterReply, error)
	// contains filtered or unexported methods
}

ShopInterfaceServer is the server API for ShopInterface service. All implementations must embed UnimplementedShopInterfaceServer for forward compatibility

type UnimplementedShopInterfaceServer

type UnimplementedShopInterfaceServer struct {
}

UnimplementedShopInterfaceServer must be embedded to have forward compatible implementations.

func (UnimplementedShopInterfaceServer) Register

type UnsafeShopInterfaceServer

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

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

Jump to

Keyboard shortcuts

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