Documentation
¶
Index ¶
- Constants
- Variables
- func ErrorBadRequest(format string, args ...interface{}) *errors.Error
- func ErrorRecordAlreadyExists(format string, args ...interface{}) *errors.Error
- func ErrorRecordNotFound(format string, args ...interface{}) *errors.Error
- func ErrorSystemError(format string, args ...interface{}) *errors.Error
- func IsBadRequest(err error) bool
- func IsRecordAlreadyExists(err error) bool
- func IsRecordNotFound(err error) bool
- func IsSystemError(err error) bool
- func RegisterNotificationServiceHTTPServer(s *http.Server, srv NotificationServiceHTTPServer)
- func RegisterNotificationServiceServer(s grpc.ServiceRegistrar, srv NotificationServiceServer)
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
- type NotificationServiceClient
- type NotificationServiceHTTPClient
- type NotificationServiceHTTPClientImpl
- func (c *NotificationServiceHTTPClientImpl) SendEmail(ctx context.Context, in *SendEmailReq, opts ...http.CallOption) (*SendEmailReply, error)
- func (c *NotificationServiceHTTPClientImpl) SendSms(ctx context.Context, in *SendSmsReq, opts ...http.CallOption) (*SendSmsReply, error)
- func (c *NotificationServiceHTTPClientImpl) SendSmsVerifyCode(ctx context.Context, in *SendSmsVerifyCodeReq, opts ...http.CallOption) (*SendSmsVerifyCodeReply, error)
- type NotificationServiceHTTPServer
- type NotificationServiceServer
- type SendEmailReply
- func (*SendEmailReply) Descriptor() ([]byte, []int)deprecated
- func (x *SendEmailReply) GetSuccess() bool
- func (*SendEmailReply) ProtoMessage()
- func (x *SendEmailReply) ProtoReflect() protoreflect.Message
- func (x *SendEmailReply) Reset()
- func (x *SendEmailReply) String() string
- func (m *SendEmailReply) Validate() error
- func (m *SendEmailReply) ValidateAll() error
- type SendEmailReplyMultiError
- type SendEmailReplyValidationError
- func (e SendEmailReplyValidationError) Cause() error
- func (e SendEmailReplyValidationError) Error() string
- func (e SendEmailReplyValidationError) ErrorName() string
- func (e SendEmailReplyValidationError) Field() string
- func (e SendEmailReplyValidationError) Key() bool
- func (e SendEmailReplyValidationError) Reason() string
- type SendEmailReq
- func (*SendEmailReq) Descriptor() ([]byte, []int)deprecated
- func (x *SendEmailReq) GetAddress() string
- func (x *SendEmailReq) GetContent() string
- func (x *SendEmailReq) GetSubject() string
- func (x *SendEmailReq) GetUserId() int64
- func (*SendEmailReq) ProtoMessage()
- func (x *SendEmailReq) ProtoReflect() protoreflect.Message
- func (x *SendEmailReq) Reset()
- func (x *SendEmailReq) String() string
- func (m *SendEmailReq) Validate() error
- func (m *SendEmailReq) ValidateAll() error
- type SendEmailReqMultiError
- type SendEmailReqValidationError
- func (e SendEmailReqValidationError) Cause() error
- func (e SendEmailReqValidationError) Error() string
- func (e SendEmailReqValidationError) ErrorName() string
- func (e SendEmailReqValidationError) Field() string
- func (e SendEmailReqValidationError) Key() bool
- func (e SendEmailReqValidationError) Reason() string
- type SendSmsReply
- func (*SendSmsReply) Descriptor() ([]byte, []int)deprecated
- func (*SendSmsReply) ProtoMessage()
- func (x *SendSmsReply) ProtoReflect() protoreflect.Message
- func (x *SendSmsReply) Reset()
- func (x *SendSmsReply) String() string
- func (m *SendSmsReply) Validate() error
- func (m *SendSmsReply) ValidateAll() error
- type SendSmsReplyMultiError
- type SendSmsReplyValidationError
- func (e SendSmsReplyValidationError) Cause() error
- func (e SendSmsReplyValidationError) Error() string
- func (e SendSmsReplyValidationError) ErrorName() string
- func (e SendSmsReplyValidationError) Field() string
- func (e SendSmsReplyValidationError) Key() bool
- func (e SendSmsReplyValidationError) Reason() string
- type SendSmsReq
- type SendSmsReqMultiError
- type SendSmsReqValidationError
- type SendSmsVerifyCodeReply
- func (*SendSmsVerifyCodeReply) Descriptor() ([]byte, []int)deprecated
- func (x *SendSmsVerifyCodeReply) GetCode() string
- func (x *SendSmsVerifyCodeReply) GetSmsId() int64
- func (x *SendSmsVerifyCodeReply) GetStatus() int64
- func (*SendSmsVerifyCodeReply) ProtoMessage()
- func (x *SendSmsVerifyCodeReply) ProtoReflect() protoreflect.Message
- func (x *SendSmsVerifyCodeReply) Reset()
- func (x *SendSmsVerifyCodeReply) String() string
- func (m *SendSmsVerifyCodeReply) Validate() error
- func (m *SendSmsVerifyCodeReply) ValidateAll() error
- type SendSmsVerifyCodeReplyMultiError
- type SendSmsVerifyCodeReplyValidationError
- func (e SendSmsVerifyCodeReplyValidationError) Cause() error
- func (e SendSmsVerifyCodeReplyValidationError) Error() string
- func (e SendSmsVerifyCodeReplyValidationError) ErrorName() string
- func (e SendSmsVerifyCodeReplyValidationError) Field() string
- func (e SendSmsVerifyCodeReplyValidationError) Key() bool
- func (e SendSmsVerifyCodeReplyValidationError) Reason() string
- type SendSmsVerifyCodeReq
- func (*SendSmsVerifyCodeReq) Descriptor() ([]byte, []int)deprecated
- func (x *SendSmsVerifyCodeReq) GetPhone() string
- func (*SendSmsVerifyCodeReq) ProtoMessage()
- func (x *SendSmsVerifyCodeReq) ProtoReflect() protoreflect.Message
- func (x *SendSmsVerifyCodeReq) Reset()
- func (x *SendSmsVerifyCodeReq) String() string
- func (m *SendSmsVerifyCodeReq) Validate() error
- func (m *SendSmsVerifyCodeReq) ValidateAll() error
- type SendSmsVerifyCodeReqMultiError
- type SendSmsVerifyCodeReqValidationError
- func (e SendSmsVerifyCodeReqValidationError) Cause() error
- func (e SendSmsVerifyCodeReqValidationError) Error() string
- func (e SendSmsVerifyCodeReqValidationError) ErrorName() string
- func (e SendSmsVerifyCodeReqValidationError) Field() string
- func (e SendSmsVerifyCodeReqValidationError) Key() bool
- func (e SendSmsVerifyCodeReqValidationError) Reason() string
- type UnimplementedNotificationServiceServer
- func (UnimplementedNotificationServiceServer) SendEmail(context.Context, *SendEmailReq) (*SendEmailReply, error)
- func (UnimplementedNotificationServiceServer) SendSms(context.Context, *SendSmsReq) (*SendSmsReply, error)
- func (UnimplementedNotificationServiceServer) SendSmsVerifyCode(context.Context, *SendSmsVerifyCodeReq) (*SendSmsVerifyCodeReply, error)
- type UnsafeNotificationServiceServer
Constants ¶
const ( NotificationService_SendSmsVerifyCode_FullMethodName = "/api.notification.v1.NotificationService/SendSmsVerifyCode" NotificationService_SendSms_FullMethodName = "/api.notification.v1.NotificationService/SendSms" NotificationService_SendEmail_FullMethodName = "/api.notification.v1.NotificationService/SendEmail" )
const OperationNotificationServiceSendEmail = "/api.notification.v1.NotificationService/SendEmail"
const OperationNotificationServiceSendSms = "/api.notification.v1.NotificationService/SendSms"
const OperationNotificationServiceSendSmsVerifyCode = "/api.notification.v1.NotificationService/SendSmsVerifyCode"
Variables ¶
var ( ErrorReason_name = map[int32]string{ 0: "RECORD_NOT_FOUND", 1: "RECORD_ALREADY_EXISTS", 2: "BAD_REQUEST", 3: "SYSTEM_ERROR", } ErrorReason_value = map[string]int32{ "RECORD_NOT_FOUND": 0, "RECORD_ALREADY_EXISTS": 1, "BAD_REQUEST": 2, "SYSTEM_ERROR": 3, } )
Enum value maps for ErrorReason.
var File_notification_v1_error_reason_proto protoreflect.FileDescriptor
var File_notification_v1_notification_proto protoreflect.FileDescriptor
var NotificationService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.notification.v1.NotificationService", HandlerType: (*NotificationServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendSmsVerifyCode", Handler: _NotificationService_SendSmsVerifyCode_Handler, }, { MethodName: "SendSms", Handler: _NotificationService_SendSms_Handler, }, { MethodName: "SendEmail", Handler: _NotificationService_SendEmail_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "notification/v1/notification.proto", }
NotificationService_ServiceDesc is the grpc.ServiceDesc for NotificationService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func ErrorBadRequest ¶
func ErrorRecordNotFound ¶
func ErrorSystemError ¶
func IsBadRequest ¶
func IsRecordAlreadyExists ¶
func IsRecordNotFound ¶
func IsSystemError ¶
func RegisterNotificationServiceHTTPServer ¶
func RegisterNotificationServiceHTTPServer(s *http.Server, srv NotificationServiceHTTPServer)
func RegisterNotificationServiceServer ¶
func RegisterNotificationServiceServer(s grpc.ServiceRegistrar, srv NotificationServiceServer)
Types ¶
type ErrorReason ¶
type ErrorReason int32
const ( ErrorReason_RECORD_NOT_FOUND ErrorReason = 0 ErrorReason_RECORD_ALREADY_EXISTS ErrorReason = 1 ErrorReason_BAD_REQUEST ErrorReason = 2 ErrorReason_SYSTEM_ERROR ErrorReason = 3 )
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
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 ¶
func (ErrorReason) Type() protoreflect.EnumType
type NotificationServiceClient ¶
type NotificationServiceClient interface {
// 发送短信验证码
SendSmsVerifyCode(ctx context.Context, in *SendSmsVerifyCodeReq, opts ...grpc.CallOption) (*SendSmsVerifyCodeReply, error)
// 发送通用短信
SendSms(ctx context.Context, in *SendSmsReq, opts ...grpc.CallOption) (*SendSmsReply, error)
// 发送邮件
SendEmail(ctx context.Context, in *SendEmailReq, opts ...grpc.CallOption) (*SendEmailReply, error)
}
NotificationServiceClient is the client API for NotificationService 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 NewNotificationServiceClient ¶
func NewNotificationServiceClient(cc grpc.ClientConnInterface) NotificationServiceClient
type NotificationServiceHTTPClient ¶
type NotificationServiceHTTPClient interface {
SendEmail(ctx context.Context, req *SendEmailReq, opts ...http.CallOption) (rsp *SendEmailReply, err error)
SendSms(ctx context.Context, req *SendSmsReq, opts ...http.CallOption) (rsp *SendSmsReply, err error)
SendSmsVerifyCode(ctx context.Context, req *SendSmsVerifyCodeReq, opts ...http.CallOption) (rsp *SendSmsVerifyCodeReply, err error)
}
func NewNotificationServiceHTTPClient ¶
func NewNotificationServiceHTTPClient(client *http.Client) NotificationServiceHTTPClient
type NotificationServiceHTTPClientImpl ¶
type NotificationServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*NotificationServiceHTTPClientImpl) SendEmail ¶
func (c *NotificationServiceHTTPClientImpl) SendEmail(ctx context.Context, in *SendEmailReq, opts ...http.CallOption) (*SendEmailReply, error)
func (*NotificationServiceHTTPClientImpl) SendSms ¶
func (c *NotificationServiceHTTPClientImpl) SendSms(ctx context.Context, in *SendSmsReq, opts ...http.CallOption) (*SendSmsReply, error)
func (*NotificationServiceHTTPClientImpl) SendSmsVerifyCode ¶
func (c *NotificationServiceHTTPClientImpl) SendSmsVerifyCode(ctx context.Context, in *SendSmsVerifyCodeReq, opts ...http.CallOption) (*SendSmsVerifyCodeReply, error)
type NotificationServiceHTTPServer ¶
type NotificationServiceHTTPServer interface {
// SendEmail 发送邮件
SendEmail(context.Context, *SendEmailReq) (*SendEmailReply, error)
// SendSms 发送通用短信
SendSms(context.Context, *SendSmsReq) (*SendSmsReply, error)
// SendSmsVerifyCode 发送短信验证码
SendSmsVerifyCode(context.Context, *SendSmsVerifyCodeReq) (*SendSmsVerifyCodeReply, error)
}
type NotificationServiceServer ¶
type NotificationServiceServer interface {
// 发送短信验证码
SendSmsVerifyCode(context.Context, *SendSmsVerifyCodeReq) (*SendSmsVerifyCodeReply, error)
// 发送通用短信
SendSms(context.Context, *SendSmsReq) (*SendSmsReply, error)
// 发送邮件
SendEmail(context.Context, *SendEmailReq) (*SendEmailReply, error)
// contains filtered or unexported methods
}
NotificationServiceServer is the server API for NotificationService service. All implementations must embed UnimplementedNotificationServiceServer for forward compatibility
type SendEmailReply ¶
type SendEmailReply struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
// contains filtered or unexported fields
}
func (*SendEmailReply) Descriptor
deprecated
func (*SendEmailReply) Descriptor() ([]byte, []int)
Deprecated: Use SendEmailReply.ProtoReflect.Descriptor instead.
func (*SendEmailReply) GetSuccess ¶
func (x *SendEmailReply) GetSuccess() bool
func (*SendEmailReply) ProtoMessage ¶
func (*SendEmailReply) ProtoMessage()
func (*SendEmailReply) ProtoReflect ¶
func (x *SendEmailReply) ProtoReflect() protoreflect.Message
func (*SendEmailReply) Reset ¶
func (x *SendEmailReply) Reset()
func (*SendEmailReply) String ¶
func (x *SendEmailReply) String() string
func (*SendEmailReply) Validate ¶
func (m *SendEmailReply) Validate() error
Validate checks the field values on SendEmailReply 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 (*SendEmailReply) ValidateAll ¶
func (m *SendEmailReply) ValidateAll() error
ValidateAll checks the field values on SendEmailReply 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 SendEmailReplyMultiError, or nil if none found.
type SendEmailReplyMultiError ¶
type SendEmailReplyMultiError []error
SendEmailReplyMultiError is an error wrapping multiple validation errors returned by SendEmailReply.ValidateAll() if the designated constraints aren't met.
func (SendEmailReplyMultiError) AllErrors ¶
func (m SendEmailReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SendEmailReplyMultiError) Error ¶
func (m SendEmailReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SendEmailReplyValidationError ¶
type SendEmailReplyValidationError struct {
// contains filtered or unexported fields
}
SendEmailReplyValidationError is the validation error returned by SendEmailReply.Validate if the designated constraints aren't met.
func (SendEmailReplyValidationError) Cause ¶
func (e SendEmailReplyValidationError) Cause() error
Cause function returns cause value.
func (SendEmailReplyValidationError) Error ¶
func (e SendEmailReplyValidationError) Error() string
Error satisfies the builtin error interface
func (SendEmailReplyValidationError) ErrorName ¶
func (e SendEmailReplyValidationError) ErrorName() string
ErrorName returns error name.
func (SendEmailReplyValidationError) Field ¶
func (e SendEmailReplyValidationError) Field() string
Field function returns field value.
func (SendEmailReplyValidationError) Key ¶
func (e SendEmailReplyValidationError) Key() bool
Key function returns key value.
func (SendEmailReplyValidationError) Reason ¶
func (e SendEmailReplyValidationError) Reason() string
Reason function returns reason value.
type SendEmailReq ¶
type SendEmailReq struct {
UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
// 主题
Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
// 内容
Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
// contains filtered or unexported fields
}
func (*SendEmailReq) Descriptor
deprecated
func (*SendEmailReq) Descriptor() ([]byte, []int)
Deprecated: Use SendEmailReq.ProtoReflect.Descriptor instead.
func (*SendEmailReq) GetAddress ¶
func (x *SendEmailReq) GetAddress() string
func (*SendEmailReq) GetContent ¶
func (x *SendEmailReq) GetContent() string
func (*SendEmailReq) GetSubject ¶
func (x *SendEmailReq) GetSubject() string
func (*SendEmailReq) GetUserId ¶
func (x *SendEmailReq) GetUserId() int64
func (*SendEmailReq) ProtoMessage ¶
func (*SendEmailReq) ProtoMessage()
func (*SendEmailReq) ProtoReflect ¶
func (x *SendEmailReq) ProtoReflect() protoreflect.Message
func (*SendEmailReq) Reset ¶
func (x *SendEmailReq) Reset()
func (*SendEmailReq) String ¶
func (x *SendEmailReq) String() string
func (*SendEmailReq) Validate ¶
func (m *SendEmailReq) Validate() error
Validate checks the field values on SendEmailReq 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 (*SendEmailReq) ValidateAll ¶
func (m *SendEmailReq) ValidateAll() error
ValidateAll checks the field values on SendEmailReq 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 SendEmailReqMultiError, or nil if none found.
type SendEmailReqMultiError ¶
type SendEmailReqMultiError []error
SendEmailReqMultiError is an error wrapping multiple validation errors returned by SendEmailReq.ValidateAll() if the designated constraints aren't met.
func (SendEmailReqMultiError) AllErrors ¶
func (m SendEmailReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SendEmailReqMultiError) Error ¶
func (m SendEmailReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SendEmailReqValidationError ¶
type SendEmailReqValidationError struct {
// contains filtered or unexported fields
}
SendEmailReqValidationError is the validation error returned by SendEmailReq.Validate if the designated constraints aren't met.
func (SendEmailReqValidationError) Cause ¶
func (e SendEmailReqValidationError) Cause() error
Cause function returns cause value.
func (SendEmailReqValidationError) Error ¶
func (e SendEmailReqValidationError) Error() string
Error satisfies the builtin error interface
func (SendEmailReqValidationError) ErrorName ¶
func (e SendEmailReqValidationError) ErrorName() string
ErrorName returns error name.
func (SendEmailReqValidationError) Field ¶
func (e SendEmailReqValidationError) Field() string
Field function returns field value.
func (SendEmailReqValidationError) Key ¶
func (e SendEmailReqValidationError) Key() bool
Key function returns key value.
func (SendEmailReqValidationError) Reason ¶
func (e SendEmailReqValidationError) Reason() string
Reason function returns reason value.
type SendSmsReply ¶
type SendSmsReply struct {
// contains filtered or unexported fields
}
func (*SendSmsReply) Descriptor
deprecated
func (*SendSmsReply) Descriptor() ([]byte, []int)
Deprecated: Use SendSmsReply.ProtoReflect.Descriptor instead.
func (*SendSmsReply) ProtoMessage ¶
func (*SendSmsReply) ProtoMessage()
func (*SendSmsReply) ProtoReflect ¶
func (x *SendSmsReply) ProtoReflect() protoreflect.Message
func (*SendSmsReply) Reset ¶
func (x *SendSmsReply) Reset()
func (*SendSmsReply) String ¶
func (x *SendSmsReply) String() string
func (*SendSmsReply) Validate ¶
func (m *SendSmsReply) Validate() error
Validate checks the field values on SendSmsReply 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 (*SendSmsReply) ValidateAll ¶
func (m *SendSmsReply) ValidateAll() error
ValidateAll checks the field values on SendSmsReply 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 SendSmsReplyMultiError, or nil if none found.
type SendSmsReplyMultiError ¶
type SendSmsReplyMultiError []error
SendSmsReplyMultiError is an error wrapping multiple validation errors returned by SendSmsReply.ValidateAll() if the designated constraints aren't met.
func (SendSmsReplyMultiError) AllErrors ¶
func (m SendSmsReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SendSmsReplyMultiError) Error ¶
func (m SendSmsReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SendSmsReplyValidationError ¶
type SendSmsReplyValidationError struct {
// contains filtered or unexported fields
}
SendSmsReplyValidationError is the validation error returned by SendSmsReply.Validate if the designated constraints aren't met.
func (SendSmsReplyValidationError) Cause ¶
func (e SendSmsReplyValidationError) Cause() error
Cause function returns cause value.
func (SendSmsReplyValidationError) Error ¶
func (e SendSmsReplyValidationError) Error() string
Error satisfies the builtin error interface
func (SendSmsReplyValidationError) ErrorName ¶
func (e SendSmsReplyValidationError) ErrorName() string
ErrorName returns error name.
func (SendSmsReplyValidationError) Field ¶
func (e SendSmsReplyValidationError) Field() string
Field function returns field value.
func (SendSmsReplyValidationError) Key ¶
func (e SendSmsReplyValidationError) Key() bool
Key function returns key value.
func (SendSmsReplyValidationError) Reason ¶
func (e SendSmsReplyValidationError) Reason() string
Reason function returns reason value.
type SendSmsReq ¶
type SendSmsReq struct {
// contains filtered or unexported fields
}
func (*SendSmsReq) Descriptor
deprecated
func (*SendSmsReq) Descriptor() ([]byte, []int)
Deprecated: Use SendSmsReq.ProtoReflect.Descriptor instead.
func (*SendSmsReq) ProtoMessage ¶
func (*SendSmsReq) ProtoMessage()
func (*SendSmsReq) ProtoReflect ¶
func (x *SendSmsReq) ProtoReflect() protoreflect.Message
func (*SendSmsReq) Reset ¶
func (x *SendSmsReq) Reset()
func (*SendSmsReq) String ¶
func (x *SendSmsReq) String() string
func (*SendSmsReq) Validate ¶
func (m *SendSmsReq) Validate() error
Validate checks the field values on SendSmsReq 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 (*SendSmsReq) ValidateAll ¶
func (m *SendSmsReq) ValidateAll() error
ValidateAll checks the field values on SendSmsReq 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 SendSmsReqMultiError, or nil if none found.
type SendSmsReqMultiError ¶
type SendSmsReqMultiError []error
SendSmsReqMultiError is an error wrapping multiple validation errors returned by SendSmsReq.ValidateAll() if the designated constraints aren't met.
func (SendSmsReqMultiError) AllErrors ¶
func (m SendSmsReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SendSmsReqMultiError) Error ¶
func (m SendSmsReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SendSmsReqValidationError ¶
type SendSmsReqValidationError struct {
// contains filtered or unexported fields
}
SendSmsReqValidationError is the validation error returned by SendSmsReq.Validate if the designated constraints aren't met.
func (SendSmsReqValidationError) Cause ¶
func (e SendSmsReqValidationError) Cause() error
Cause function returns cause value.
func (SendSmsReqValidationError) Error ¶
func (e SendSmsReqValidationError) Error() string
Error satisfies the builtin error interface
func (SendSmsReqValidationError) ErrorName ¶
func (e SendSmsReqValidationError) ErrorName() string
ErrorName returns error name.
func (SendSmsReqValidationError) Field ¶
func (e SendSmsReqValidationError) Field() string
Field function returns field value.
func (SendSmsReqValidationError) Key ¶
func (e SendSmsReqValidationError) Key() bool
Key function returns key value.
func (SendSmsReqValidationError) Reason ¶
func (e SendSmsReqValidationError) Reason() string
Reason function returns reason value.
type SendSmsVerifyCodeReply ¶
type SendSmsVerifyCodeReply struct {
SmsId int64 `protobuf:"varint,1,opt,name=sms_id,json=smsId,proto3" json:"sms_id,omitempty"`
// 状态 0待发送 1已发送 2发送失败
Status int64 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
// contains filtered or unexported fields
}
func (*SendSmsVerifyCodeReply) Descriptor
deprecated
func (*SendSmsVerifyCodeReply) Descriptor() ([]byte, []int)
Deprecated: Use SendSmsVerifyCodeReply.ProtoReflect.Descriptor instead.
func (*SendSmsVerifyCodeReply) GetCode ¶
func (x *SendSmsVerifyCodeReply) GetCode() string
func (*SendSmsVerifyCodeReply) GetSmsId ¶
func (x *SendSmsVerifyCodeReply) GetSmsId() int64
func (*SendSmsVerifyCodeReply) GetStatus ¶
func (x *SendSmsVerifyCodeReply) GetStatus() int64
func (*SendSmsVerifyCodeReply) ProtoMessage ¶
func (*SendSmsVerifyCodeReply) ProtoMessage()
func (*SendSmsVerifyCodeReply) ProtoReflect ¶
func (x *SendSmsVerifyCodeReply) ProtoReflect() protoreflect.Message
func (*SendSmsVerifyCodeReply) Reset ¶
func (x *SendSmsVerifyCodeReply) Reset()
func (*SendSmsVerifyCodeReply) String ¶
func (x *SendSmsVerifyCodeReply) String() string
func (*SendSmsVerifyCodeReply) Validate ¶
func (m *SendSmsVerifyCodeReply) Validate() error
Validate checks the field values on SendSmsVerifyCodeReply 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 (*SendSmsVerifyCodeReply) ValidateAll ¶
func (m *SendSmsVerifyCodeReply) ValidateAll() error
ValidateAll checks the field values on SendSmsVerifyCodeReply 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 SendSmsVerifyCodeReplyMultiError, or nil if none found.
type SendSmsVerifyCodeReplyMultiError ¶
type SendSmsVerifyCodeReplyMultiError []error
SendSmsVerifyCodeReplyMultiError is an error wrapping multiple validation errors returned by SendSmsVerifyCodeReply.ValidateAll() if the designated constraints aren't met.
func (SendSmsVerifyCodeReplyMultiError) AllErrors ¶
func (m SendSmsVerifyCodeReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SendSmsVerifyCodeReplyMultiError) Error ¶
func (m SendSmsVerifyCodeReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SendSmsVerifyCodeReplyValidationError ¶
type SendSmsVerifyCodeReplyValidationError struct {
// contains filtered or unexported fields
}
SendSmsVerifyCodeReplyValidationError is the validation error returned by SendSmsVerifyCodeReply.Validate if the designated constraints aren't met.
func (SendSmsVerifyCodeReplyValidationError) Cause ¶
func (e SendSmsVerifyCodeReplyValidationError) Cause() error
Cause function returns cause value.
func (SendSmsVerifyCodeReplyValidationError) Error ¶
func (e SendSmsVerifyCodeReplyValidationError) Error() string
Error satisfies the builtin error interface
func (SendSmsVerifyCodeReplyValidationError) ErrorName ¶
func (e SendSmsVerifyCodeReplyValidationError) ErrorName() string
ErrorName returns error name.
func (SendSmsVerifyCodeReplyValidationError) Field ¶
func (e SendSmsVerifyCodeReplyValidationError) Field() string
Field function returns field value.
func (SendSmsVerifyCodeReplyValidationError) Key ¶
func (e SendSmsVerifyCodeReplyValidationError) Key() bool
Key function returns key value.
func (SendSmsVerifyCodeReplyValidationError) Reason ¶
func (e SendSmsVerifyCodeReplyValidationError) Reason() string
Reason function returns reason value.
type SendSmsVerifyCodeReq ¶
type SendSmsVerifyCodeReq struct {
// 如果需要带区号则自己修改校验条件
Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"`
// contains filtered or unexported fields
}
func (*SendSmsVerifyCodeReq) Descriptor
deprecated
func (*SendSmsVerifyCodeReq) Descriptor() ([]byte, []int)
Deprecated: Use SendSmsVerifyCodeReq.ProtoReflect.Descriptor instead.
func (*SendSmsVerifyCodeReq) GetPhone ¶
func (x *SendSmsVerifyCodeReq) GetPhone() string
func (*SendSmsVerifyCodeReq) ProtoMessage ¶
func (*SendSmsVerifyCodeReq) ProtoMessage()
func (*SendSmsVerifyCodeReq) ProtoReflect ¶
func (x *SendSmsVerifyCodeReq) ProtoReflect() protoreflect.Message
func (*SendSmsVerifyCodeReq) Reset ¶
func (x *SendSmsVerifyCodeReq) Reset()
func (*SendSmsVerifyCodeReq) String ¶
func (x *SendSmsVerifyCodeReq) String() string
func (*SendSmsVerifyCodeReq) Validate ¶
func (m *SendSmsVerifyCodeReq) Validate() error
Validate checks the field values on SendSmsVerifyCodeReq 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 (*SendSmsVerifyCodeReq) ValidateAll ¶
func (m *SendSmsVerifyCodeReq) ValidateAll() error
ValidateAll checks the field values on SendSmsVerifyCodeReq 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 SendSmsVerifyCodeReqMultiError, or nil if none found.
type SendSmsVerifyCodeReqMultiError ¶
type SendSmsVerifyCodeReqMultiError []error
SendSmsVerifyCodeReqMultiError is an error wrapping multiple validation errors returned by SendSmsVerifyCodeReq.ValidateAll() if the designated constraints aren't met.
func (SendSmsVerifyCodeReqMultiError) AllErrors ¶
func (m SendSmsVerifyCodeReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SendSmsVerifyCodeReqMultiError) Error ¶
func (m SendSmsVerifyCodeReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SendSmsVerifyCodeReqValidationError ¶
type SendSmsVerifyCodeReqValidationError struct {
// contains filtered or unexported fields
}
SendSmsVerifyCodeReqValidationError is the validation error returned by SendSmsVerifyCodeReq.Validate if the designated constraints aren't met.
func (SendSmsVerifyCodeReqValidationError) Cause ¶
func (e SendSmsVerifyCodeReqValidationError) Cause() error
Cause function returns cause value.
func (SendSmsVerifyCodeReqValidationError) Error ¶
func (e SendSmsVerifyCodeReqValidationError) Error() string
Error satisfies the builtin error interface
func (SendSmsVerifyCodeReqValidationError) ErrorName ¶
func (e SendSmsVerifyCodeReqValidationError) ErrorName() string
ErrorName returns error name.
func (SendSmsVerifyCodeReqValidationError) Field ¶
func (e SendSmsVerifyCodeReqValidationError) Field() string
Field function returns field value.
func (SendSmsVerifyCodeReqValidationError) Key ¶
func (e SendSmsVerifyCodeReqValidationError) Key() bool
Key function returns key value.
func (SendSmsVerifyCodeReqValidationError) Reason ¶
func (e SendSmsVerifyCodeReqValidationError) Reason() string
Reason function returns reason value.
type UnimplementedNotificationServiceServer ¶
type UnimplementedNotificationServiceServer struct {
}
UnimplementedNotificationServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedNotificationServiceServer) SendEmail ¶
func (UnimplementedNotificationServiceServer) SendEmail(context.Context, *SendEmailReq) (*SendEmailReply, error)
func (UnimplementedNotificationServiceServer) SendSms ¶
func (UnimplementedNotificationServiceServer) SendSms(context.Context, *SendSmsReq) (*SendSmsReply, error)
func (UnimplementedNotificationServiceServer) SendSmsVerifyCode ¶
func (UnimplementedNotificationServiceServer) SendSmsVerifyCode(context.Context, *SendSmsVerifyCodeReq) (*SendSmsVerifyCodeReply, error)
type UnsafeNotificationServiceServer ¶
type UnsafeNotificationServiceServer interface {
// contains filtered or unexported methods
}
UnsafeNotificationServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NotificationServiceServer will result in compilation errors.