Documentation ¶
Index ¶
- Constants
- Variables
- type HashSeed
- type MailManager
- func (it *MailManager) LocaleLangSet(v string)
- func (it *MailManager) TemplateFlush(args ...interface{}) error
- func (it *MailManager) TemplateLoad(args ...interface{}) error
- func (it *MailManager) TemplateRender(name string, lang string, data interface{}) (*MailTemplateLang, error)
- func (it *MailManager) TemplateSet(set *MailTemplateEntry) error
- type MailManagerConfig
- type MailTemplateEntry
- func (*MailTemplateEntry) Descriptor() ([]byte, []int)deprecated
- func (x *MailTemplateEntry) GetDescription() string
- func (x *MailTemplateEntry) GetItems() []*MailTemplateLang
- func (x *MailTemplateEntry) GetName() string
- func (it *MailTemplateEntry) Item(lang string) *MailTemplateLang
- func (*MailTemplateEntry) ProtoMessage()
- func (x *MailTemplateEntry) ProtoReflect() protoreflect.Message
- func (x *MailTemplateEntry) Reset()
- func (x *MailTemplateEntry) String() string
- func (it *MailTemplateEntry) Valid() error
- type MailTemplateLang
- func (*MailTemplateLang) Descriptor() ([]byte, []int)deprecated
- func (it *MailTemplateLang) Equal(v *MailTemplateLang) bool
- func (x *MailTemplateLang) GetBody() string
- func (x *MailTemplateLang) GetBodyType() MsgContentType
- func (x *MailTemplateLang) GetLang() string
- func (x *MailTemplateLang) GetTitle() string
- func (x *MailTemplateLang) GetVersion() uint64
- func (*MailTemplateLang) ProtoMessage()
- func (x *MailTemplateLang) ProtoReflect() protoreflect.Message
- func (x *MailTemplateLang) Reset()
- func (x *MailTemplateLang) String() string
- func (it *MailTemplateLang) Valid() error
- type MsgContentType
- func (MsgContentType) Descriptor() protoreflect.EnumDescriptor
- func (x MsgContentType) Enum() *MsgContentType
- func (MsgContentType) EnumDescriptor() ([]byte, []int)deprecated
- func (x MsgContentType) Number() protoreflect.EnumNumber
- func (x MsgContentType) String() string
- func (MsgContentType) Type() protoreflect.EnumType
- type MsgItem
- func (*MsgItem) Descriptor() ([]byte, []int)deprecated
- func (x *MsgItem) GetAction() uint32
- func (x *MsgItem) GetBody() string
- func (x *MsgItem) GetCreated() uint32
- func (x *MsgItem) GetFromEmail() string
- func (x *MsgItem) GetFromUser() string
- func (x *MsgItem) GetId() string
- func (x *MsgItem) GetLog() string
- func (x *MsgItem) GetPosted() uint32
- func (x *MsgItem) GetPriority() uint32
- func (x *MsgItem) GetRetry() uint32
- func (x *MsgItem) GetTitle() string
- func (x *MsgItem) GetToEmail() string
- func (x *MsgItem) GetToUser() string
- func (x *MsgItem) GetType() MsgContentType
- func (x *MsgItem) GetUpdated() uint32
- func (*MsgItem) ProtoMessage()
- func (x *MsgItem) ProtoReflect() protoreflect.Message
- func (x *MsgItem) Reset()
- func (it *MsgItem) SentId() string
- func (x *MsgItem) String() string
- func (it *MsgItem) Valid() error
Constants ¶
View Source
const ( MsgActionPostOK uint32 = 1 << 1 MsgActionPostError uint32 = 1 << 2 MsgActionPostTimeout uint32 = 1 << 3 )
Variables ¶
View Source
var ( MsgIdRE = regexp.MustCompile("^[a-f0-9]{16,32}$") MailTemplateNameRE = regexp.MustCompile("^[a-z]{1,1}[a-z0-9/]{2,32}$") )
View Source
var ( MsgContentType_name = map[int32]string{ 0: "TextPlain", 1: "TextHtml", } MsgContentType_value = map[string]int32{ "TextPlain": 0, "TextHtml": 1, } )
Enum value maps for MsgContentType.
View Source
var File_hmsg_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type MailManager ¶
type MailManager struct {
// contains filtered or unexported fields
}
func NewMailManager ¶
func NewMailManager() *MailManager
func (*MailManager) LocaleLangSet ¶
func (it *MailManager) LocaleLangSet(v string)
func (*MailManager) TemplateFlush ¶
func (it *MailManager) TemplateFlush(args ...interface{}) error
func (*MailManager) TemplateLoad ¶
func (it *MailManager) TemplateLoad(args ...interface{}) error
func (*MailManager) TemplateRender ¶
func (it *MailManager) TemplateRender(name string, lang string, data interface{}) (*MailTemplateLang, error)
func (*MailManager) TemplateSet ¶
func (it *MailManager) TemplateSet(set *MailTemplateEntry) error
type MailManagerConfig ¶
type MailManagerConfig struct {
Templates []*MailTemplateEntry `json:"templates" toml:"templates"`
}
type MailTemplateEntry ¶
type MailTemplateEntry struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty" toml:"description,omitempty"` Items []*MailTemplateLang `protobuf:"bytes,9,rep,name=items,proto3" json:"items,omitempty" toml:"items,omitempty"` // contains filtered or unexported fields }
func (*MailTemplateEntry) Descriptor
deprecated
func (*MailTemplateEntry) Descriptor() ([]byte, []int)
Deprecated: Use MailTemplateEntry.ProtoReflect.Descriptor instead.
func (*MailTemplateEntry) GetDescription ¶
func (x *MailTemplateEntry) GetDescription() string
func (*MailTemplateEntry) GetItems ¶
func (x *MailTemplateEntry) GetItems() []*MailTemplateLang
func (*MailTemplateEntry) GetName ¶
func (x *MailTemplateEntry) GetName() string
func (*MailTemplateEntry) Item ¶
func (it *MailTemplateEntry) Item(lang string) *MailTemplateLang
func (*MailTemplateEntry) ProtoMessage ¶
func (*MailTemplateEntry) ProtoMessage()
func (*MailTemplateEntry) ProtoReflect ¶
func (x *MailTemplateEntry) ProtoReflect() protoreflect.Message
func (*MailTemplateEntry) Reset ¶
func (x *MailTemplateEntry) Reset()
func (*MailTemplateEntry) String ¶
func (x *MailTemplateEntry) String() string
func (*MailTemplateEntry) Valid ¶
func (it *MailTemplateEntry) Valid() error
type MailTemplateLang ¶
type MailTemplateLang struct { Lang string `protobuf:"bytes,1,opt,name=lang,proto3" json:"lang,omitempty" toml:"lang,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty" toml:"title,omitempty"` Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty" toml:"body,omitempty"` BodyType MsgContentType `` /* 147-byte string literal not displayed */ Version uint64 `protobuf:"varint,13,opt,name=version,proto3" json:"version,omitempty" toml:"version,omitempty"` // contains filtered or unexported fields }
func (*MailTemplateLang) Descriptor
deprecated
func (*MailTemplateLang) Descriptor() ([]byte, []int)
Deprecated: Use MailTemplateLang.ProtoReflect.Descriptor instead.
func (*MailTemplateLang) Equal ¶
func (it *MailTemplateLang) Equal(v *MailTemplateLang) bool
func (*MailTemplateLang) GetBody ¶
func (x *MailTemplateLang) GetBody() string
func (*MailTemplateLang) GetBodyType ¶
func (x *MailTemplateLang) GetBodyType() MsgContentType
func (*MailTemplateLang) GetLang ¶
func (x *MailTemplateLang) GetLang() string
func (*MailTemplateLang) GetTitle ¶
func (x *MailTemplateLang) GetTitle() string
func (*MailTemplateLang) GetVersion ¶
func (x *MailTemplateLang) GetVersion() uint64
func (*MailTemplateLang) ProtoMessage ¶
func (*MailTemplateLang) ProtoMessage()
func (*MailTemplateLang) ProtoReflect ¶
func (x *MailTemplateLang) ProtoReflect() protoreflect.Message
func (*MailTemplateLang) Reset ¶
func (x *MailTemplateLang) Reset()
func (*MailTemplateLang) String ¶
func (x *MailTemplateLang) String() string
func (*MailTemplateLang) Valid ¶
func (it *MailTemplateLang) Valid() error
type MsgContentType ¶
type MsgContentType int32
const ( MsgContentType_TextPlain MsgContentType = 0 MsgContentType_TextHtml MsgContentType = 1 )
func (MsgContentType) Descriptor ¶
func (MsgContentType) Descriptor() protoreflect.EnumDescriptor
func (MsgContentType) Enum ¶
func (x MsgContentType) Enum() *MsgContentType
func (MsgContentType) EnumDescriptor
deprecated
func (MsgContentType) EnumDescriptor() ([]byte, []int)
Deprecated: Use MsgContentType.Descriptor instead.
func (MsgContentType) Number ¶
func (x MsgContentType) Number() protoreflect.EnumNumber
func (MsgContentType) String ¶
func (x MsgContentType) String() string
func (MsgContentType) Type ¶
func (MsgContentType) Type() protoreflect.EnumType
type MsgItem ¶
type MsgItem struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" toml:"id,omitempty"` Action uint32 `protobuf:"varint,2,opt,name=action,proto3" json:"action,omitempty" toml:"action,omitempty"` ToUser string `protobuf:"bytes,3,opt,name=to_user,json=toUser,proto3" json:"to_user,omitempty" toml:"to_user,omitempty"` ToEmail string `protobuf:"bytes,4,opt,name=to_email,json=toEmail,proto3" json:"to_email,omitempty" toml:"to_email,omitempty"` FromUser string `protobuf:"bytes,5,opt,name=from_user,json=fromUser,proto3" json:"from_user,omitempty" toml:"from_user,omitempty"` FromEmail string `protobuf:"bytes,6,opt,name=from_email,json=fromEmail,proto3" json:"from_email,omitempty" toml:"from_email,omitempty"` Priority uint32 `protobuf:"varint,7,opt,name=priority,proto3" json:"priority,omitempty" toml:"priority,omitempty"` Title string `protobuf:"bytes,8,opt,name=title,proto3" json:"title,omitempty" toml:"title,omitempty"` Body string `protobuf:"bytes,9,opt,name=body,proto3" json:"body,omitempty" toml:"body,omitempty"` Retry uint32 `protobuf:"varint,10,opt,name=retry,proto3" json:"retry,omitempty" toml:"retry,omitempty"` Type MsgContentType `protobuf:"varint,11,opt,name=type,proto3,enum=hooto.hmsg.v1.MsgContentType" json:"type,omitempty" toml:"type,omitempty"` Log string `protobuf:"bytes,12,opt,name=log,proto3" json:"log,omitempty" toml:"log,omitempty"` Posted uint32 `protobuf:"varint,13,opt,name=posted,proto3" json:"posted,omitempty" toml:"posted,omitempty"` Created uint32 `protobuf:"varint,14,opt,name=created,proto3" json:"created,omitempty" toml:"created,omitempty"` Updated uint32 `protobuf:"varint,15,opt,name=updated,proto3" json:"updated,omitempty" toml:"updated,omitempty"` // contains filtered or unexported fields }
func NewMsgItem ¶
func NewMsgItem(args ...interface{}) *MsgItem
func (*MsgItem) Descriptor
deprecated
func (*MsgItem) GetCreated ¶
func (*MsgItem) GetFromEmail ¶
func (*MsgItem) GetFromUser ¶
func (*MsgItem) GetPriority ¶
func (*MsgItem) GetToEmail ¶
func (*MsgItem) GetType ¶
func (x *MsgItem) GetType() MsgContentType
func (*MsgItem) GetUpdated ¶
func (*MsgItem) ProtoMessage ¶
func (*MsgItem) ProtoMessage()
func (*MsgItem) ProtoReflect ¶
func (x *MsgItem) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.