email

package
v0.0.0-...-4d27263 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmailService_SendEmail_FullMethodName           = "/email.EmailService/SendEmail"
	EmailService_UpdateEmailTemplate_FullMethodName = "/email.EmailService/UpdateEmailTemplate"
)
View Source
const OperationEmailServiceSendEmail = "/email.EmailService/SendEmail"
View Source
const OperationEmailServiceUpdateEmailTemplate = "/email.EmailService/UpdateEmailTemplate"

Variables

View Source
var (
	EnumEmailAction_name = map[int32]string{
		0:  "EMAIL_ACTION_NULL",
		1:  "EMAIL_ACTION_KYC_FAILED",
		2:  "EMAIL_ACTION_KYC_SUCCESSFUL",
		3:  "EMAIL_ACTION_ALERT_UP",
		4:  "EMAIL_ACTION_AUTOMATED_BOT_CLOSURE",
		5:  "EMAIL_ACTION_BENV_GOOGLE_2FA",
		6:  "EMAIL_ACTION_BOT_CREATION_SUCCESSFUL",
		7:  "EMAIL_ACTION_BOT_TRADE_ORDER_FAILED",
		8:  "EMAIL_ACTION_DEPOSIT_SUCCESSFUL",
		9:  "EMAIL_ACTION_GOOGLE_AUTHENTICATION_DISABLED",
		10: "EMAIL_ACTION_MANUAL_BOT_CLOSURE",
		11: "EMAIL_ACTION_MARKETING",
		12: "EMAIL_ACTION_REGISTER",
		13: "EMAIL_ACTION_RESET_PASSWORD",
		14: "EMAIL_ACTION_RESET_PASSWORD_CODE",
		15: "EMAIL_ACTION_SUBSCRIPTION_FAILED",
		16: "EMAIL_ACTION_SUBSCRIPTION_SUCCESSFULLY",
		17: "EMAIL_ACTION_UNBENV_GOOGLE_2FA",
		18: "EMAIL_ACTION_WALLET_BALANCE_ALERT",
		19: "EMAIL_ACTION_WELCOME",
		20: "EMAIL_ACTION_WITHDRAW_SUCCESSFUL",
		21: "EMAIL_ACTION_WITHDRAWAL_REQUESTED",
		22: "EMAIL_ACTION_ALERT_DOWN",
		23: "EMAIL_ACTION_MANUAL_RENEW_SUBSCRIPTION_FAILED",
		24: "EMAIL_ACTION_TELEGRAM_REGISTER",
	}
	EnumEmailAction_value = map[string]int32{
		"EMAIL_ACTION_NULL":                             0,
		"EMAIL_ACTION_KYC_FAILED":                       1,
		"EMAIL_ACTION_KYC_SUCCESSFUL":                   2,
		"EMAIL_ACTION_ALERT_UP":                         3,
		"EMAIL_ACTION_AUTOMATED_BOT_CLOSURE":            4,
		"EMAIL_ACTION_BENV_GOOGLE_2FA":                  5,
		"EMAIL_ACTION_BOT_CREATION_SUCCESSFUL":          6,
		"EMAIL_ACTION_BOT_TRADE_ORDER_FAILED":           7,
		"EMAIL_ACTION_DEPOSIT_SUCCESSFUL":               8,
		"EMAIL_ACTION_GOOGLE_AUTHENTICATION_DISABLED":   9,
		"EMAIL_ACTION_MANUAL_BOT_CLOSURE":               10,
		"EMAIL_ACTION_MARKETING":                        11,
		"EMAIL_ACTION_REGISTER":                         12,
		"EMAIL_ACTION_RESET_PASSWORD":                   13,
		"EMAIL_ACTION_RESET_PASSWORD_CODE":              14,
		"EMAIL_ACTION_SUBSCRIPTION_FAILED":              15,
		"EMAIL_ACTION_SUBSCRIPTION_SUCCESSFULLY":        16,
		"EMAIL_ACTION_UNBENV_GOOGLE_2FA":                17,
		"EMAIL_ACTION_WALLET_BALANCE_ALERT":             18,
		"EMAIL_ACTION_WELCOME":                          19,
		"EMAIL_ACTION_WITHDRAW_SUCCESSFUL":              20,
		"EMAIL_ACTION_WITHDRAWAL_REQUESTED":             21,
		"EMAIL_ACTION_ALERT_DOWN":                       22,
		"EMAIL_ACTION_MANUAL_RENEW_SUBSCRIPTION_FAILED": 23,
		"EMAIL_ACTION_TELEGRAM_REGISTER":                24,
	}
)

Enum value maps for EnumEmailAction.

View Source
var EmailService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "email.EmailService",
	HandlerType: (*EmailServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendEmail",
			Handler:    _EmailService_SendEmail_Handler,
		},
		{
			MethodName: "UpdateEmailTemplate",
			Handler:    _EmailService_UpdateEmailTemplate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "email/server.proto",
}

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

View Source
var File_email_server_proto protoreflect.FileDescriptor

Functions

func RegisterEmailServiceHTTPServer

func RegisterEmailServiceHTTPServer(s *http.Server, srv EmailServiceHTTPServer)

func RegisterEmailServiceServer

func RegisterEmailServiceServer(s grpc.ServiceRegistrar, srv EmailServiceServer)

Types

type BaseResponse

type BaseResponse struct {
	Code   int64  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg    string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	MsgKey string `protobuf:"bytes,3,opt,name=msg_key,json=msgKey,proto3" json:"msg_key,omitempty"`
	// contains filtered or unexported fields
}

func (*BaseResponse) Descriptor deprecated

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

Deprecated: Use BaseResponse.ProtoReflect.Descriptor instead.

func (*BaseResponse) GetCode

func (x *BaseResponse) GetCode() int64

func (*BaseResponse) GetMsg

func (x *BaseResponse) GetMsg() string

func (*BaseResponse) GetMsgKey

func (x *BaseResponse) GetMsgKey() string

func (*BaseResponse) ProtoMessage

func (*BaseResponse) ProtoMessage()

func (*BaseResponse) ProtoReflect

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

func (*BaseResponse) Reset

func (x *BaseResponse) Reset()

func (*BaseResponse) String

func (x *BaseResponse) String() string

type EmailServiceClient

type EmailServiceClient interface {
	SendEmail(ctx context.Context, in *SendEmailRequest, opts ...grpc.CallOption) (*BaseResponse, error)
	UpdateEmailTemplate(ctx context.Context, in *UpdateEmailTemplateRequest, opts ...grpc.CallOption) (*BaseResponse, error)
}

EmailServiceClient is the client API for EmailService 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 EmailServiceHTTPClient

type EmailServiceHTTPClient interface {
	SendEmail(ctx context.Context, req *SendEmailRequest, opts ...http.CallOption) (rsp *BaseResponse, err error)
	UpdateEmailTemplate(ctx context.Context, req *UpdateEmailTemplateRequest, opts ...http.CallOption) (rsp *BaseResponse, err error)
}

func NewEmailServiceHTTPClient

func NewEmailServiceHTTPClient(client *http.Client) EmailServiceHTTPClient

type EmailServiceHTTPClientImpl

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

func (*EmailServiceHTTPClientImpl) SendEmail

func (*EmailServiceHTTPClientImpl) UpdateEmailTemplate

type EmailServiceHTTPServer

type EmailServiceHTTPServer interface {
	SendEmail(context.Context, *SendEmailRequest) (*BaseResponse, error)
	UpdateEmailTemplate(context.Context, *UpdateEmailTemplateRequest) (*BaseResponse, error)
}

type EmailServiceServer

type EmailServiceServer interface {
	SendEmail(context.Context, *SendEmailRequest) (*BaseResponse, error)
	UpdateEmailTemplate(context.Context, *UpdateEmailTemplateRequest) (*BaseResponse, error)
	// contains filtered or unexported methods
}

EmailServiceServer is the server API for EmailService service. All implementations must embed UnimplementedEmailServiceServer for forward compatibility

type EmailTemplateData

type EmailTemplateData struct {
	TemplateCode string `protobuf:"bytes,1,opt,name=template_code,json=templateCode,proto3" json:"template_code,omitempty"`
	Content      string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*EmailTemplateData) Descriptor deprecated

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

Deprecated: Use EmailTemplateData.ProtoReflect.Descriptor instead.

func (*EmailTemplateData) GetContent

func (x *EmailTemplateData) GetContent() string

func (*EmailTemplateData) GetTemplateCode

func (x *EmailTemplateData) GetTemplateCode() string

func (*EmailTemplateData) ProtoMessage

func (*EmailTemplateData) ProtoMessage()

func (*EmailTemplateData) ProtoReflect

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

func (*EmailTemplateData) Reset

func (x *EmailTemplateData) Reset()

func (*EmailTemplateData) String

func (x *EmailTemplateData) String() string

type EnumEmailAction

type EnumEmailAction int32
const (
	EnumEmailAction_EMAIL_ACTION_NULL                             EnumEmailAction = 0
	EnumEmailAction_EMAIL_ACTION_KYC_FAILED                       EnumEmailAction = 1
	EnumEmailAction_EMAIL_ACTION_KYC_SUCCESSFUL                   EnumEmailAction = 2
	EnumEmailAction_EMAIL_ACTION_ALERT_UP                         EnumEmailAction = 3
	EnumEmailAction_EMAIL_ACTION_AUTOMATED_BOT_CLOSURE            EnumEmailAction = 4
	EnumEmailAction_EMAIL_ACTION_BENV_GOOGLE_2FA                  EnumEmailAction = 5
	EnumEmailAction_EMAIL_ACTION_BOT_CREATION_SUCCESSFUL          EnumEmailAction = 6
	EnumEmailAction_EMAIL_ACTION_BOT_TRADE_ORDER_FAILED           EnumEmailAction = 7
	EnumEmailAction_EMAIL_ACTION_DEPOSIT_SUCCESSFUL               EnumEmailAction = 8
	EnumEmailAction_EMAIL_ACTION_GOOGLE_AUTHENTICATION_DISABLED   EnumEmailAction = 9
	EnumEmailAction_EMAIL_ACTION_MANUAL_BOT_CLOSURE               EnumEmailAction = 10
	EnumEmailAction_EMAIL_ACTION_MARKETING                        EnumEmailAction = 11
	EnumEmailAction_EMAIL_ACTION_REGISTER                         EnumEmailAction = 12
	EnumEmailAction_EMAIL_ACTION_RESET_PASSWORD                   EnumEmailAction = 13
	EnumEmailAction_EMAIL_ACTION_RESET_PASSWORD_CODE              EnumEmailAction = 14
	EnumEmailAction_EMAIL_ACTION_SUBSCRIPTION_FAILED              EnumEmailAction = 15
	EnumEmailAction_EMAIL_ACTION_SUBSCRIPTION_SUCCESSFULLY        EnumEmailAction = 16
	EnumEmailAction_EMAIL_ACTION_UNBENV_GOOGLE_2FA                EnumEmailAction = 17
	EnumEmailAction_EMAIL_ACTION_WALLET_BALANCE_ALERT             EnumEmailAction = 18
	EnumEmailAction_EMAIL_ACTION_WELCOME                          EnumEmailAction = 19
	EnumEmailAction_EMAIL_ACTION_WITHDRAW_SUCCESSFUL              EnumEmailAction = 20
	EnumEmailAction_EMAIL_ACTION_WITHDRAWAL_REQUESTED             EnumEmailAction = 21
	EnumEmailAction_EMAIL_ACTION_ALERT_DOWN                       EnumEmailAction = 22
	EnumEmailAction_EMAIL_ACTION_MANUAL_RENEW_SUBSCRIPTION_FAILED EnumEmailAction = 23
	EnumEmailAction_EMAIL_ACTION_TELEGRAM_REGISTER                EnumEmailAction = 24
)

func (EnumEmailAction) Descriptor

func (EnumEmailAction) Enum

func (x EnumEmailAction) Enum() *EnumEmailAction

func (EnumEmailAction) EnumDescriptor deprecated

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

Deprecated: Use EnumEmailAction.Descriptor instead.

func (EnumEmailAction) Number

func (EnumEmailAction) String

func (x EnumEmailAction) String() string

func (EnumEmailAction) Type

type SendEmailData

type SendEmailData struct {
	To     string          `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"`
	Action EnumEmailAction `protobuf:"varint,2,opt,name=action,proto3,enum=email.EnumEmailAction" json:"action,omitempty"`
	Data   string          `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // it same as the JSON marshal
	UserId string          `protobuf:"bytes,4,opt,name=userId,proto3" json:"userId,omitempty"`
	Locale string          `protobuf:"bytes,5,opt,name=locale,proto3" json:"locale,omitempty"`
	// contains filtered or unexported fields
}

func (*SendEmailData) Descriptor deprecated

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

Deprecated: Use SendEmailData.ProtoReflect.Descriptor instead.

func (*SendEmailData) GetAction

func (x *SendEmailData) GetAction() EnumEmailAction

func (*SendEmailData) GetData

func (x *SendEmailData) GetData() string

func (*SendEmailData) GetLocale

func (x *SendEmailData) GetLocale() string

func (*SendEmailData) GetTo

func (x *SendEmailData) GetTo() string

func (*SendEmailData) GetUserId

func (x *SendEmailData) GetUserId() string

func (*SendEmailData) ProtoMessage

func (*SendEmailData) ProtoMessage()

func (*SendEmailData) ProtoReflect

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

func (*SendEmailData) Reset

func (x *SendEmailData) Reset()

func (*SendEmailData) String

func (x *SendEmailData) String() string

type SendEmailRequest

type SendEmailRequest struct {
	Data []*SendEmailData `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

The system email will config in the code data is the JSON marshal to string (same as JSON stringify in Javascript)

func (*SendEmailRequest) Descriptor deprecated

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

Deprecated: Use SendEmailRequest.ProtoReflect.Descriptor instead.

func (*SendEmailRequest) GetData

func (x *SendEmailRequest) GetData() []*SendEmailData

func (*SendEmailRequest) ProtoMessage

func (*SendEmailRequest) ProtoMessage()

func (*SendEmailRequest) ProtoReflect

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

func (*SendEmailRequest) Reset

func (x *SendEmailRequest) Reset()

func (*SendEmailRequest) String

func (x *SendEmailRequest) String() string

type UnimplementedEmailServiceServer

type UnimplementedEmailServiceServer struct {
}

UnimplementedEmailServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedEmailServiceServer) SendEmail

func (UnimplementedEmailServiceServer) UpdateEmailTemplate

type UnsafeEmailServiceServer

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

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

type UpdateEmailTemplateRequest

type UpdateEmailTemplateRequest struct {
	Data []*EmailTemplateData `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateEmailTemplateRequest) Descriptor deprecated

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

Deprecated: Use UpdateEmailTemplateRequest.ProtoReflect.Descriptor instead.

func (*UpdateEmailTemplateRequest) GetData

func (*UpdateEmailTemplateRequest) ProtoMessage

func (*UpdateEmailTemplateRequest) ProtoMessage()

func (*UpdateEmailTemplateRequest) ProtoReflect

func (*UpdateEmailTemplateRequest) Reset

func (x *UpdateEmailTemplateRequest) Reset()

func (*UpdateEmailTemplateRequest) String

func (x *UpdateEmailTemplateRequest) String() string

type UpdateUserEmailLangData

type UpdateUserEmailLangData struct {
	Email   string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Country string `protobuf:"bytes,2,opt,name=country,proto3" json:"country,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateUserEmailLangData) Descriptor deprecated

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

Deprecated: Use UpdateUserEmailLangData.ProtoReflect.Descriptor instead.

func (*UpdateUserEmailLangData) GetCountry

func (x *UpdateUserEmailLangData) GetCountry() string

func (*UpdateUserEmailLangData) GetEmail

func (x *UpdateUserEmailLangData) GetEmail() string

func (*UpdateUserEmailLangData) ProtoMessage

func (*UpdateUserEmailLangData) ProtoMessage()

func (*UpdateUserEmailLangData) ProtoReflect

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

func (*UpdateUserEmailLangData) Reset

func (x *UpdateUserEmailLangData) Reset()

func (*UpdateUserEmailLangData) String

func (x *UpdateUserEmailLangData) String() string

Jump to

Keyboard shortcuts

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