v1

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Greeter_SayHello_FullMethodName      = "/helloworld.v1.Greeter/SayHello"
	Greeter_WxLogin_FullMethodName       = "/helloworld.v1.Greeter/WxLogin"
	Greeter_BusinessLogin_FullMethodName = "/helloworld.v1.Greeter/BusinessLogin"
)
View Source
const OperationGreeterBusinessLogin = "/helloworld.v1.Greeter/BusinessLogin"
View Source
const OperationGreeterSayHello = "/helloworld.v1.Greeter/SayHello"
View Source
const OperationGreeterWxLogin = "/helloworld.v1.Greeter/WxLogin"

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "GREETER_UNSPECIFIED",
		1: "USER_NOT_FOUND",
	}
	ErrorReason_value = map[string]int32{
		"GREETER_UNSPECIFIED": 0,
		"USER_NOT_FOUND":      1,
	}
)

Enum value maps for ErrorReason.

View Source
var File_helloworld_v1_error_reason_proto protoreflect.FileDescriptor
View Source
var File_helloworld_v1_greeter_proto protoreflect.FileDescriptor
View Source
var Greeter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "helloworld.v1.Greeter",
	HandlerType: (*GreeterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SayHello",
			Handler:    _Greeter_SayHello_Handler,
		},
		{
			MethodName: "WxLogin",
			Handler:    _Greeter_WxLogin_Handler,
		},
		{
			MethodName: "BusinessLogin",
			Handler:    _Greeter_BusinessLogin_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "helloworld/v1/greeter.proto",
}

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

Functions

func RegisterGreeterHTTPServer

func RegisterGreeterHTTPServer(s *http.Server, srv GreeterHTTPServer)

func RegisterGreeterServer

func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)

Types

type BusinessLoginReply added in v0.1.1

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

The response message containing the greetings

func (*BusinessLoginReply) Descriptor deprecated added in v0.1.1

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

Deprecated: Use BusinessLoginReply.ProtoReflect.Descriptor instead.

func (*BusinessLoginReply) GetResponse added in v0.1.1

func (x *BusinessLoginReply) GetResponse() *BusinessLoginResponse

func (*BusinessLoginReply) ProtoMessage added in v0.1.1

func (*BusinessLoginReply) ProtoMessage()

func (*BusinessLoginReply) ProtoReflect added in v0.1.1

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

func (*BusinessLoginReply) Reset added in v0.1.1

func (x *BusinessLoginReply) Reset()

func (*BusinessLoginReply) String added in v0.1.1

func (x *BusinessLoginReply) String() string

func (*BusinessLoginReply) Validate added in v0.1.1

func (m *BusinessLoginReply) Validate() error

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

func (m *BusinessLoginReply) ValidateAll() error

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

type BusinessLoginReplyMultiError added in v0.1.1

type BusinessLoginReplyMultiError []error

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

func (BusinessLoginReplyMultiError) AllErrors added in v0.1.1

func (m BusinessLoginReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BusinessLoginReplyMultiError) Error added in v0.1.1

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

type BusinessLoginReplyValidationError added in v0.1.1

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

BusinessLoginReplyValidationError is the validation error returned by BusinessLoginReply.Validate if the designated constraints aren't met.

func (BusinessLoginReplyValidationError) Cause added in v0.1.1

Cause function returns cause value.

func (BusinessLoginReplyValidationError) Error added in v0.1.1

Error satisfies the builtin error interface

func (BusinessLoginReplyValidationError) ErrorName added in v0.1.1

ErrorName returns error name.

func (BusinessLoginReplyValidationError) Field added in v0.1.1

Field function returns field value.

func (BusinessLoginReplyValidationError) Key added in v0.1.1

Key function returns key value.

func (BusinessLoginReplyValidationError) Reason added in v0.1.1

Reason function returns reason value.

type BusinessLoginRequest added in v0.1.1

type BusinessLoginRequest struct {
	RequestID string `protobuf:"bytes,1,opt,name=RequestID,json=RequestId,proto3" json:"RequestID,omitempty"` // RequestId 所有的POST请求提统一携带此字段
	Name      string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	// contains filtered or unexported fields
}

The request message containing the user's name. 请求body,需要做参数校验

func (*BusinessLoginRequest) Descriptor deprecated added in v0.1.1

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

Deprecated: Use BusinessLoginRequest.ProtoReflect.Descriptor instead.

func (*BusinessLoginRequest) GetName added in v0.1.1

func (x *BusinessLoginRequest) GetName() string

func (*BusinessLoginRequest) GetRequestID added in v0.1.1

func (x *BusinessLoginRequest) GetRequestID() string

func (*BusinessLoginRequest) ProtoMessage added in v0.1.1

func (*BusinessLoginRequest) ProtoMessage()

func (*BusinessLoginRequest) ProtoReflect added in v0.1.1

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

func (*BusinessLoginRequest) Reset added in v0.1.1

func (x *BusinessLoginRequest) Reset()

func (*BusinessLoginRequest) String added in v0.1.1

func (x *BusinessLoginRequest) String() string

func (*BusinessLoginRequest) Validate added in v0.1.1

func (m *BusinessLoginRequest) Validate() error

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

func (m *BusinessLoginRequest) ValidateAll() error

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

type BusinessLoginRequestMultiError added in v0.1.1

type BusinessLoginRequestMultiError []error

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

func (BusinessLoginRequestMultiError) AllErrors added in v0.1.1

func (m BusinessLoginRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BusinessLoginRequestMultiError) Error added in v0.1.1

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

type BusinessLoginRequestValidationError added in v0.1.1

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

BusinessLoginRequestValidationError is the validation error returned by BusinessLoginRequest.Validate if the designated constraints aren't met.

func (BusinessLoginRequestValidationError) Cause added in v0.1.1

Cause function returns cause value.

func (BusinessLoginRequestValidationError) Error added in v0.1.1

Error satisfies the builtin error interface

func (BusinessLoginRequestValidationError) ErrorName added in v0.1.1

ErrorName returns error name.

func (BusinessLoginRequestValidationError) Field added in v0.1.1

Field function returns field value.

func (BusinessLoginRequestValidationError) Key added in v0.1.1

Key function returns key value.

func (BusinessLoginRequestValidationError) Reason added in v0.1.1

Reason function returns reason value.

type BusinessLoginResponse added in v0.1.1

type BusinessLoginResponse struct {
	RequestID string `protobuf:"bytes,1,opt,name=RequestID,json=RequestId,proto3" json:"RequestID,omitempty"` // RequestId 所有的POST请求的Response携带此字段
	Error     *Error `protobuf:"bytes,2,opt,name=Error,proto3,oneof" json:"Error,omitempty"`
	Data      string `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"`
	// contains filtered or unexported fields
}

func (*BusinessLoginResponse) Descriptor deprecated added in v0.1.1

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

Deprecated: Use BusinessLoginResponse.ProtoReflect.Descriptor instead.

func (*BusinessLoginResponse) GetData added in v0.1.1

func (x *BusinessLoginResponse) GetData() string

func (*BusinessLoginResponse) GetError added in v0.1.1

func (x *BusinessLoginResponse) GetError() *Error

func (*BusinessLoginResponse) GetRequestID added in v0.1.1

func (x *BusinessLoginResponse) GetRequestID() string

func (*BusinessLoginResponse) ProtoMessage added in v0.1.1

func (*BusinessLoginResponse) ProtoMessage()

func (*BusinessLoginResponse) ProtoReflect added in v0.1.1

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

func (*BusinessLoginResponse) Reset added in v0.1.1

func (x *BusinessLoginResponse) Reset()

func (*BusinessLoginResponse) String added in v0.1.1

func (x *BusinessLoginResponse) String() string

func (*BusinessLoginResponse) Validate added in v0.1.1

func (m *BusinessLoginResponse) Validate() error

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

func (m *BusinessLoginResponse) ValidateAll() error

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

type BusinessLoginResponseMultiError added in v0.1.1

type BusinessLoginResponseMultiError []error

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

func (BusinessLoginResponseMultiError) AllErrors added in v0.1.1

func (m BusinessLoginResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BusinessLoginResponseMultiError) Error added in v0.1.1

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

type BusinessLoginResponseValidationError added in v0.1.1

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

BusinessLoginResponseValidationError is the validation error returned by BusinessLoginResponse.Validate if the designated constraints aren't met.

func (BusinessLoginResponseValidationError) Cause added in v0.1.1

Cause function returns cause value.

func (BusinessLoginResponseValidationError) Error added in v0.1.1

Error satisfies the builtin error interface

func (BusinessLoginResponseValidationError) ErrorName added in v0.1.1

ErrorName returns error name.

func (BusinessLoginResponseValidationError) Field added in v0.1.1

Field function returns field value.

func (BusinessLoginResponseValidationError) Key added in v0.1.1

Key function returns key value.

func (BusinessLoginResponseValidationError) Reason added in v0.1.1

Reason function returns reason value.

type Error

type Error struct {
	Code    string `protobuf:"bytes,1,opt,name=Code,proto3" json:"Code,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() string

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

func (*Error) Validate

func (m *Error) Validate() error

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

func (m *Error) ValidateAll() error

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

type ErrorMultiError

type ErrorMultiError []error

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

func (ErrorMultiError) AllErrors

func (m ErrorMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ErrorMultiError) Error

func (m ErrorMultiError) Error() string

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

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_GREETER_UNSPECIFIED ErrorReason = 0
	ErrorReason_USER_NOT_FOUND      ErrorReason = 1
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

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

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type ErrorValidationError

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

ErrorValidationError is the validation error returned by Error.Validate if the designated constraints aren't met.

func (ErrorValidationError) Cause

func (e ErrorValidationError) Cause() error

Cause function returns cause value.

func (ErrorValidationError) Error

func (e ErrorValidationError) Error() string

Error satisfies the builtin error interface

func (ErrorValidationError) ErrorName

func (e ErrorValidationError) ErrorName() string

ErrorName returns error name.

func (ErrorValidationError) Field

func (e ErrorValidationError) Field() string

Field function returns field value.

func (ErrorValidationError) Key

func (e ErrorValidationError) Key() bool

Key function returns key value.

func (ErrorValidationError) Reason

func (e ErrorValidationError) Reason() string

Reason function returns reason value.

type GreeterClient

type GreeterClient interface {
	// Sends a greeting
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
	// WxLogin 小程序/公众号登录固定接口,使用时,仅修改URL
	WxLogin(ctx context.Context, in *WxLoginRequest, opts ...grpc.CallOption) (*WxLoginReply, error)
	// BusinessLogin 业务登录固定接口,使用时,仅修改URL
	BusinessLogin(ctx context.Context, in *BusinessLoginRequest, opts ...grpc.CallOption) (*BusinessLoginReply, error)
}

GreeterClient is the client API for Greeter 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 NewGreeterClient

func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient

type GreeterHTTPClient

type GreeterHTTPClient interface {
	BusinessLogin(ctx context.Context, req *BusinessLoginRequest, opts ...http.CallOption) (rsp *BusinessLoginReply, err error)
	SayHello(ctx context.Context, req *HelloRequest, opts ...http.CallOption) (rsp *HelloReply, err error)
	WxLogin(ctx context.Context, req *WxLoginRequest, opts ...http.CallOption) (rsp *WxLoginReply, err error)
}

func NewGreeterHTTPClient

func NewGreeterHTTPClient(client *http.Client) GreeterHTTPClient

type GreeterHTTPClientImpl

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

func (*GreeterHTTPClientImpl) BusinessLogin added in v0.1.1

func (*GreeterHTTPClientImpl) SayHello

func (c *GreeterHTTPClientImpl) SayHello(ctx context.Context, in *HelloRequest, opts ...http.CallOption) (*HelloReply, error)

func (*GreeterHTTPClientImpl) WxLogin added in v0.1.1

type GreeterHTTPServer

type GreeterHTTPServer interface {
	// BusinessLogin BusinessLogin 业务登录固定接口,使用时,仅修改URL
	BusinessLogin(context.Context, *BusinessLoginRequest) (*BusinessLoginReply, error)
	// SayHello Sends a greeting
	SayHello(context.Context, *HelloRequest) (*HelloReply, error)
	// WxLogin WxLogin 小程序/公众号登录固定接口,使用时,仅修改URL
	WxLogin(context.Context, *WxLoginRequest) (*WxLoginReply, error)
}

type GreeterServer

type GreeterServer interface {
	// Sends a greeting
	SayHello(context.Context, *HelloRequest) (*HelloReply, error)
	// WxLogin 小程序/公众号登录固定接口,使用时,仅修改URL
	WxLogin(context.Context, *WxLoginRequest) (*WxLoginReply, error)
	// BusinessLogin 业务登录固定接口,使用时,仅修改URL
	BusinessLogin(context.Context, *BusinessLoginRequest) (*BusinessLoginReply, error)
	// contains filtered or unexported methods
}

GreeterServer is the server API for Greeter service. All implementations must embed UnimplementedGreeterServer for forward compatibility

type HelloReply

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

The response message containing the greetings

func (*HelloReply) Descriptor deprecated

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

Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.

func (*HelloReply) GetResponse

func (x *HelloReply) GetResponse() *HelloResponse

func (*HelloReply) ProtoMessage

func (*HelloReply) ProtoMessage()

func (*HelloReply) ProtoReflect

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

func (*HelloReply) Reset

func (x *HelloReply) Reset()

func (*HelloReply) String

func (x *HelloReply) String() string

func (*HelloReply) Validate

func (m *HelloReply) Validate() error

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

func (m *HelloReply) ValidateAll() error

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

type HelloReplyMultiError

type HelloReplyMultiError []error

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

func (HelloReplyMultiError) AllErrors

func (m HelloReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HelloReplyMultiError) Error

func (m HelloReplyMultiError) Error() string

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

type HelloReplyValidationError

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

HelloReplyValidationError is the validation error returned by HelloReply.Validate if the designated constraints aren't met.

func (HelloReplyValidationError) Cause

func (e HelloReplyValidationError) Cause() error

Cause function returns cause value.

func (HelloReplyValidationError) Error

Error satisfies the builtin error interface

func (HelloReplyValidationError) ErrorName

func (e HelloReplyValidationError) ErrorName() string

ErrorName returns error name.

func (HelloReplyValidationError) Field

Field function returns field value.

func (HelloReplyValidationError) Key

Key function returns key value.

func (HelloReplyValidationError) Reason

func (e HelloReplyValidationError) Reason() string

Reason function returns reason value.

type HelloRequest

type HelloRequest struct {
	RequestID string `protobuf:"bytes,1,opt,name=RequestID,json=RequestId,proto3" json:"RequestID,omitempty"` // RequestId 所有的POST请求提统一携带此字段
	Name      string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	// contains filtered or unexported fields
}

The request message containing the user's name. 请求body,需要做参数校验

func (*HelloRequest) Descriptor deprecated

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

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) GetName

func (x *HelloRequest) GetName() string

func (*HelloRequest) GetRequestID

func (x *HelloRequest) GetRequestID() string

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) ProtoReflect

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

func (*HelloRequest) Reset

func (x *HelloRequest) Reset()

func (*HelloRequest) String

func (x *HelloRequest) String() string

func (*HelloRequest) Validate

func (m *HelloRequest) Validate() error

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

func (m *HelloRequest) ValidateAll() error

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

type HelloRequestMultiError

type HelloRequestMultiError []error

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

func (HelloRequestMultiError) AllErrors

func (m HelloRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HelloRequestMultiError) Error

func (m HelloRequestMultiError) Error() string

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

type HelloRequestValidationError

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

HelloRequestValidationError is the validation error returned by HelloRequest.Validate if the designated constraints aren't met.

func (HelloRequestValidationError) Cause

Cause function returns cause value.

func (HelloRequestValidationError) Error

Error satisfies the builtin error interface

func (HelloRequestValidationError) ErrorName

func (e HelloRequestValidationError) ErrorName() string

ErrorName returns error name.

func (HelloRequestValidationError) Field

Field function returns field value.

func (HelloRequestValidationError) Key

Key function returns key value.

func (HelloRequestValidationError) Reason

Reason function returns reason value.

type HelloResponse

type HelloResponse struct {
	RequestID string `protobuf:"bytes,1,opt,name=RequestID,json=RequestId,proto3" json:"RequestID,omitempty"` // RequestId 所有的POST请求的Response携带此字段
	Error     *Error `protobuf:"bytes,2,opt,name=Error,proto3,oneof" json:"Error,omitempty"`
	Data      string `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"`
	// contains filtered or unexported fields
}

func (*HelloResponse) Descriptor deprecated

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

Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.

func (*HelloResponse) GetData

func (x *HelloResponse) GetData() string

func (*HelloResponse) GetError

func (x *HelloResponse) GetError() *Error

func (*HelloResponse) GetRequestID

func (x *HelloResponse) GetRequestID() string

func (*HelloResponse) ProtoMessage

func (*HelloResponse) ProtoMessage()

func (*HelloResponse) ProtoReflect

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

func (*HelloResponse) Reset

func (x *HelloResponse) Reset()

func (*HelloResponse) String

func (x *HelloResponse) String() string

func (*HelloResponse) Validate

func (m *HelloResponse) Validate() error

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

func (m *HelloResponse) ValidateAll() error

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

type HelloResponseMultiError

type HelloResponseMultiError []error

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

func (HelloResponseMultiError) AllErrors

func (m HelloResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HelloResponseMultiError) Error

func (m HelloResponseMultiError) Error() string

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

type HelloResponseValidationError

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

HelloResponseValidationError is the validation error returned by HelloResponse.Validate if the designated constraints aren't met.

func (HelloResponseValidationError) Cause

Cause function returns cause value.

func (HelloResponseValidationError) Error

Error satisfies the builtin error interface

func (HelloResponseValidationError) ErrorName

func (e HelloResponseValidationError) ErrorName() string

ErrorName returns error name.

func (HelloResponseValidationError) Field

Field function returns field value.

func (HelloResponseValidationError) Key

Key function returns key value.

func (HelloResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedGreeterServer

type UnimplementedGreeterServer struct {
}

UnimplementedGreeterServer must be embedded to have forward compatible implementations.

func (UnimplementedGreeterServer) BusinessLogin added in v0.1.1

func (UnimplementedGreeterServer) SayHello

func (UnimplementedGreeterServer) WxLogin added in v0.1.1

type UnsafeGreeterServer

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

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

type WxLoginReply added in v0.1.1

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

The response message containing the greetings

func (*WxLoginReply) Descriptor deprecated added in v0.1.1

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

Deprecated: Use WxLoginReply.ProtoReflect.Descriptor instead.

func (*WxLoginReply) GetResponse added in v0.1.1

func (x *WxLoginReply) GetResponse() *WxLoginResponse

func (*WxLoginReply) ProtoMessage added in v0.1.1

func (*WxLoginReply) ProtoMessage()

func (*WxLoginReply) ProtoReflect added in v0.1.1

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

func (*WxLoginReply) Reset added in v0.1.1

func (x *WxLoginReply) Reset()

func (*WxLoginReply) String added in v0.1.1

func (x *WxLoginReply) String() string

func (*WxLoginReply) Validate added in v0.1.1

func (m *WxLoginReply) Validate() error

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

func (m *WxLoginReply) ValidateAll() error

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

type WxLoginReplyMultiError added in v0.1.1

type WxLoginReplyMultiError []error

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

func (WxLoginReplyMultiError) AllErrors added in v0.1.1

func (m WxLoginReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WxLoginReplyMultiError) Error added in v0.1.1

func (m WxLoginReplyMultiError) Error() string

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

type WxLoginReplyValidationError added in v0.1.1

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

WxLoginReplyValidationError is the validation error returned by WxLoginReply.Validate if the designated constraints aren't met.

func (WxLoginReplyValidationError) Cause added in v0.1.1

Cause function returns cause value.

func (WxLoginReplyValidationError) Error added in v0.1.1

Error satisfies the builtin error interface

func (WxLoginReplyValidationError) ErrorName added in v0.1.1

func (e WxLoginReplyValidationError) ErrorName() string

ErrorName returns error name.

func (WxLoginReplyValidationError) Field added in v0.1.1

Field function returns field value.

func (WxLoginReplyValidationError) Key added in v0.1.1

Key function returns key value.

func (WxLoginReplyValidationError) Reason added in v0.1.1

Reason function returns reason value.

type WxLoginRequest added in v0.1.1

type WxLoginRequest struct {
	RequestID string `protobuf:"bytes,1,opt,name=RequestID,json=RequestId,proto3" json:"RequestID,omitempty"` // RequestId 所有的POST请求提统一携带此字段
	Code      string `protobuf:"bytes,2,opt,name=Code,proto3" json:"Code,omitempty"`
	// contains filtered or unexported fields
}

The request message containing the user's name. 请求body,需要做参数校验

func (*WxLoginRequest) Descriptor deprecated added in v0.1.1

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

Deprecated: Use WxLoginRequest.ProtoReflect.Descriptor instead.

func (*WxLoginRequest) GetCode added in v0.1.1

func (x *WxLoginRequest) GetCode() string

func (*WxLoginRequest) GetRequestID added in v0.1.1

func (x *WxLoginRequest) GetRequestID() string

func (*WxLoginRequest) ProtoMessage added in v0.1.1

func (*WxLoginRequest) ProtoMessage()

func (*WxLoginRequest) ProtoReflect added in v0.1.1

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

func (*WxLoginRequest) Reset added in v0.1.1

func (x *WxLoginRequest) Reset()

func (*WxLoginRequest) String added in v0.1.1

func (x *WxLoginRequest) String() string

func (*WxLoginRequest) Validate added in v0.1.1

func (m *WxLoginRequest) Validate() error

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

func (m *WxLoginRequest) ValidateAll() error

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

type WxLoginRequestMultiError added in v0.1.1

type WxLoginRequestMultiError []error

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

func (WxLoginRequestMultiError) AllErrors added in v0.1.1

func (m WxLoginRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WxLoginRequestMultiError) Error added in v0.1.1

func (m WxLoginRequestMultiError) Error() string

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

type WxLoginRequestValidationError added in v0.1.1

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

WxLoginRequestValidationError is the validation error returned by WxLoginRequest.Validate if the designated constraints aren't met.

func (WxLoginRequestValidationError) Cause added in v0.1.1

Cause function returns cause value.

func (WxLoginRequestValidationError) Error added in v0.1.1

Error satisfies the builtin error interface

func (WxLoginRequestValidationError) ErrorName added in v0.1.1

func (e WxLoginRequestValidationError) ErrorName() string

ErrorName returns error name.

func (WxLoginRequestValidationError) Field added in v0.1.1

Field function returns field value.

func (WxLoginRequestValidationError) Key added in v0.1.1

Key function returns key value.

func (WxLoginRequestValidationError) Reason added in v0.1.1

Reason function returns reason value.

type WxLoginResponse added in v0.1.1

type WxLoginResponse struct {
	RequestID string `protobuf:"bytes,1,opt,name=RequestID,json=RequestId,proto3" json:"RequestID,omitempty"` // RequestId 所有的POST请求的Response携带此字段
	Error     *Error `protobuf:"bytes,2,opt,name=Error,proto3,oneof" json:"Error,omitempty"`
	Data      string `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"`
	// contains filtered or unexported fields
}

func (*WxLoginResponse) Descriptor deprecated added in v0.1.1

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

Deprecated: Use WxLoginResponse.ProtoReflect.Descriptor instead.

func (*WxLoginResponse) GetData added in v0.1.1

func (x *WxLoginResponse) GetData() string

func (*WxLoginResponse) GetError added in v0.1.1

func (x *WxLoginResponse) GetError() *Error

func (*WxLoginResponse) GetRequestID added in v0.1.1

func (x *WxLoginResponse) GetRequestID() string

func (*WxLoginResponse) ProtoMessage added in v0.1.1

func (*WxLoginResponse) ProtoMessage()

func (*WxLoginResponse) ProtoReflect added in v0.1.1

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

func (*WxLoginResponse) Reset added in v0.1.1

func (x *WxLoginResponse) Reset()

func (*WxLoginResponse) String added in v0.1.1

func (x *WxLoginResponse) String() string

func (*WxLoginResponse) Validate added in v0.1.1

func (m *WxLoginResponse) Validate() error

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

func (m *WxLoginResponse) ValidateAll() error

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

type WxLoginResponseMultiError added in v0.1.1

type WxLoginResponseMultiError []error

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

func (WxLoginResponseMultiError) AllErrors added in v0.1.1

func (m WxLoginResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WxLoginResponseMultiError) Error added in v0.1.1

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

type WxLoginResponseValidationError added in v0.1.1

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

WxLoginResponseValidationError is the validation error returned by WxLoginResponse.Validate if the designated constraints aren't met.

func (WxLoginResponseValidationError) Cause added in v0.1.1

Cause function returns cause value.

func (WxLoginResponseValidationError) Error added in v0.1.1

Error satisfies the builtin error interface

func (WxLoginResponseValidationError) ErrorName added in v0.1.1

func (e WxLoginResponseValidationError) ErrorName() string

ErrorName returns error name.

func (WxLoginResponseValidationError) Field added in v0.1.1

Field function returns field value.

func (WxLoginResponseValidationError) Key added in v0.1.1

Key function returns key value.

func (WxLoginResponseValidationError) Reason added in v0.1.1

Reason function returns reason value.

Jump to

Keyboard shortcuts

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