Documentation ¶
Index ¶
- Constants
- type Area
- func (self Area) GetAreaIndex() string
- func (self Area) GetCharset() string
- func (self Area) GetName() string
- func (self *Area) GetNewMessageCount() int
- func (self *Area) GetOrder() int64
- func (self *Area) GetSummary() string
- func (self *Area) SetAreaIndex(areaIndex string)
- func (self *Area) SetCharset(newCharset string)
- func (self *Area) SetName(name string)
- func (self *Area) SetNewMessageCount(newMessageCount int)
- func (self *Area) SetOrder(order int64)
- func (self *Area) SetSummary(summary string)
- type AreaList
- type Config
- type ConfigMapper
- type ConfigValue
- type Draft
- func (self Draft) GetArea() string
- func (self Draft) GetBody() string
- func (self Draft) GetFrom() string
- func (self Draft) GetId() string
- func (self Draft) GetReply() string
- func (self Draft) GetSubject() string
- func (self Draft) GetTo() string
- func (self Draft) GetToAddr() string
- func (self Draft) GetUUID() string
- func (self Draft) IsDone() bool
- func (self Draft) IsEchoMail() bool
- func (self Draft) IsReply() bool
- func (self *Draft) SetArea(area string)
- func (self *Draft) SetBody(body string)
- func (self *Draft) SetId(id string)
- func (self *Draft) SetReply(reply string)
- func (self *Draft) SetState(state int)
- func (self *Draft) SetSubject(subj string)
- func (self *Draft) SetTo(to string)
- func (self *Draft) SetToAddr(addr string)
- func (self *Draft) SetUUID(uuid string)
- type DraftMapper
- func (self DraftMapper) GetDraftByUUID(uuid string) (*Draft, error)
- func (self DraftMapper) GetDraftMessages(state int) ([]Draft, error)
- func (self DraftMapper) RegisterNewDraft(draft Draft) error
- func (self DraftMapper) RemoveByUUID(uuid string) error
- func (self DraftMapper) UpdateDraft(newDraft Draft) error
- type EchoAreaMapper
- func (self *EchoAreaMapper) GetAreaByAreaIndex(areaIndex string) (*Area, error)
- func (self *EchoAreaMapper) GetAreaByName(areaName string) (*Area, error)
- func (self *EchoAreaMapper) GetAreas() ([]Area, error)
- func (self *EchoAreaMapper) Register(a *Area) error
- func (self *EchoAreaMapper) RemoveAreaByName(echoName string) error
- func (self *EchoAreaMapper) Update(area *Area) error
- type EchoMapper
- func (self *EchoMapper) GetAreaList() ([]string, error)
- func (self *EchoMapper) GetMessageByHash(echoTag string, msgHash string) (*msg.Message, error)
- func (self *EchoMapper) GetMessageHeaders(echoTag string) ([]msg.Message, error)
- func (self *EchoMapper) GetMessageNewCount() (int, error)
- func (self *EchoMapper) IsMessageExistsByHash(echoTag string, msgHash string) (bool, error)
- func (self *EchoMapper) MarkAllReadByAreaName(echoTag string) error
- func (self *EchoMapper) RemoveMessageByHash(echoTag string, msgHash string) error
- func (self *EchoMapper) RemoveMessagesByAreaName(echoTag string) error
- func (self *EchoMapper) UpdateAreaMessageCounters(areas []Area) ([]Area, error)
- func (self *EchoMapper) ViewMessageByHash(echoTag string, msgHash string) error
- func (self *EchoMapper) Write(msg msg.Message) error
- type File
- func (self *File) GetAbsolutePath() string
- func (self File) GetArea() string
- func (self File) GetDesc() string
- func (self File) GetFile() string
- func (self File) GetOrigName() string
- func (self File) GetTime() time.Time
- func (self File) GetUnixTime() int64
- func (self File) GetViewCount() int
- func (self File) IsNew() bool
- func (self *File) SetAbsolutePath(path string)
- func (self *File) SetArea(area string)
- func (self *File) SetDesc(desc string)
- func (self *File) SetFile(file string)
- func (self *File) SetOrigName(orig_name string)
- func (self *File) SetUnixTime(unixTime int64)
- func (self *File) SetViewCount(viewCount int)
- type FileArea
- func (self FileArea) GetCharset() string
- func (self *FileArea) GetCount() int
- func (self FileArea) GetMode() string
- func (self FileArea) GetName() string
- func (self *FileArea) GetNewCount() int
- func (self *FileArea) GetOrder() int
- func (self FileArea) GetSummary() string
- func (self *FileArea) SetCharset(charset string)
- func (self *FileArea) SetCount(count int)
- func (self *FileArea) SetMode(mode string)
- func (self *FileArea) SetName(name string)
- func (self *FileArea) SetNewCount(count int)
- func (self *FileArea) SetSummary(summary string)
- type FileAreaMapper
- func (self *FileAreaMapper) CreateFileArea(a *FileArea) error
- func (self *FileAreaMapper) GetAreaByName(areaName string) (*FileArea, error)
- func (self *FileAreaMapper) GetAreas() ([]FileArea, error)
- func (self FileAreaMapper) GetMessageNewCount() (int, error)
- func (self *FileAreaMapper) UpdateFileAreasWithFileCount(fileAreas []FileArea) ([]FileArea, error)
- func (self *FileAreaMapper) UpdateNewFileAreasWithFileCount(fileAreas []FileArea) ([]FileArea, error)
- type FileMapper
- func (self *FileMapper) CheckFileExists(tic File) (bool, error)
- func (self FileMapper) GetFileAbsolutePath(areaName string, name string) string
- func (self *FileMapper) GetFileBoxAbsolutePath(areaName string) string
- func (self *FileMapper) GetFileByIndexName(echoTag string, indexName string) (*File, error)
- func (self *FileMapper) GetFileHeaders(echoTag string) ([]File, error)
- func (self *FileMapper) GetFileNewCount() (int, error)
- func (self *FileMapper) RegisterFile(tic File) error
- func (self *FileMapper) RemoveAreaByName(areaName string) error
- func (self *FileMapper) RemoveFileByName(indexName string) error
- func (self *FileMapper) RemoveFilesByAreaName(areaName string) error
- func (self *FileMapper) ViewFileByIndexName(fileArea string, indexName string) error
- type Mapper
- type MapperManager
- func (self MapperManager) GetConfigMapper() *ConfigMapper
- func (self MapperManager) GetDraftMapper() *DraftMapper
- func (self MapperManager) GetEchoAreaMapper() *EchoAreaMapper
- func (self MapperManager) GetEchoMapper() *EchoMapper
- func (self MapperManager) GetFileAreaMapper() *FileAreaMapper
- func (self MapperManager) GetFileMapper() *FileMapper
- func (self MapperManager) GetNetmailMapper() *NetmailMapper
- func (self MapperManager) GetStatMailerMapper() *StatMailerMapper
- func (self MapperManager) GetTwitMapper() *TwitMapper
- type NetmailMapper
- func (self *NetmailMapper) GetMessageByHash(msgHash string) (*NetmailMsg, error)
- func (self *NetmailMapper) GetMessageHeaders() ([]*NetmailMsg, error)
- func (self *NetmailMapper) GetMessageNewCount() (int, error)
- func (self *NetmailMapper) RemoveMessageByHash(msgHash string) error
- func (self *NetmailMapper) ViewMessageByHash(msgHash string) error
- func (self *NetmailMapper) Write(msg *NetmailMsg) error
- type NetmailMsg
- func (self *NetmailMsg) GetContent() string
- func (self *NetmailMsg) GetFrom() string
- func (self *NetmailMsg) GetPacket() []byte
- func (self *NetmailMsg) SetContent(body string) *NetmailMsg
- func (self *NetmailMsg) SetDestAddr(addr string)
- func (self *NetmailMsg) SetFrom(from string)
- func (self *NetmailMsg) SetHash(hash string) *NetmailMsg
- func (self *NetmailMsg) SetID(id string)
- func (self *NetmailMsg) SetMsgID(msgID string)
- func (self *NetmailMsg) SetOrigAddr(addr string)
- func (self *NetmailMsg) SetPacket(packet []byte)
- func (self *NetmailMsg) SetSubject(subject string)
- func (self *NetmailMsg) SetTime(ptm time.Time)
- func (self *NetmailMsg) SetTo(to string)
- func (self *NetmailMsg) SetUnixTime(unixTime int64)
- func (self *NetmailMsg) SetViewCount(count int) *NetmailMsg
- type StatMailer
- type StatMailerMapper
- type Twit
- type TwitMapper
Constants ¶
View Source
const ( DraftStateActive = 0 DraftStateDone = 1 )
View Source
const MAPPER_MANAGER_ID = "MapperManager"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Area ¶
type Area struct { Summary string /* Echo summary */ MessageCount int /* Echo message count */ // contains filtered or unexported fields }
func (Area) GetAreaIndex ¶
func (Area) GetCharset ¶
func (*Area) GetNewMessageCount ¶
func (*Area) GetSummary ¶
func (*Area) SetAreaIndex ¶
func (*Area) SetCharset ¶
func (*Area) SetNewMessageCount ¶
func (*Area) SetSummary ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (Config) GetParams ¶
func (self Config) GetParams() []ConfigValue
type ConfigMapper ¶
type ConfigMapper struct {
Mapper
}
func NewConfigMapper ¶
func NewConfigMapper(r *registry.Container) *ConfigMapper
func (ConfigMapper) GetConfigFromDatabase ¶
func (self ConfigMapper) GetConfigFromDatabase() (*Config, error)
func (*ConfigMapper) SetConfigToDatabase ¶
func (self *ConfigMapper) SetConfigToDatabase(config *Config)
type ConfigValue ¶
type ConfigValue struct {
// contains filtered or unexported fields
}
func (*ConfigValue) GetValue ¶
func (self *ConfigValue) GetValue() string
type Draft ¶
type Draft struct {
// contains filtered or unexported fields
}
func (Draft) GetSubject ¶
func (Draft) IsEchoMail ¶
func (*Draft) SetSubject ¶
type DraftMapper ¶
type DraftMapper struct {
Mapper
}
func NewDraftMapper ¶
func NewDraftMapper(r *registry.Container) *DraftMapper
func (DraftMapper) GetDraftByUUID ¶
func (self DraftMapper) GetDraftByUUID(uuid string) (*Draft, error)
func (DraftMapper) GetDraftMessages ¶
func (self DraftMapper) GetDraftMessages(state int) ([]Draft, error)
func (DraftMapper) RegisterNewDraft ¶
func (self DraftMapper) RegisterNewDraft(draft Draft) error
func (DraftMapper) RemoveByUUID ¶
func (self DraftMapper) RemoveByUUID(uuid string) error
func (DraftMapper) UpdateDraft ¶
func (self DraftMapper) UpdateDraft(newDraft Draft) error
type EchoAreaMapper ¶
type EchoAreaMapper struct {
Mapper
}
func NewEchoAreaMapper ¶
func NewEchoAreaMapper(r *registry.Container) *EchoAreaMapper
func (*EchoAreaMapper) GetAreaByAreaIndex ¶
func (self *EchoAreaMapper) GetAreaByAreaIndex(areaIndex string) (*Area, error)
func (*EchoAreaMapper) GetAreaByName ¶
func (self *EchoAreaMapper) GetAreaByName(areaName string) (*Area, error)
func (*EchoAreaMapper) GetAreas ¶
func (self *EchoAreaMapper) GetAreas() ([]Area, error)
func (*EchoAreaMapper) Register ¶
func (self *EchoAreaMapper) Register(a *Area) error
func (*EchoAreaMapper) RemoveAreaByName ¶
func (self *EchoAreaMapper) RemoveAreaByName(echoName string) error
func (*EchoAreaMapper) Update ¶
func (self *EchoAreaMapper) Update(area *Area) error
type EchoMapper ¶
type EchoMapper struct {
Mapper
}
func NewEchoMapper ¶
func NewEchoMapper(r *registry.Container) *EchoMapper
func (*EchoMapper) GetAreaList ¶
func (self *EchoMapper) GetAreaList() ([]string, error)
func (*EchoMapper) GetMessageByHash ¶
func (*EchoMapper) GetMessageHeaders ¶
func (self *EchoMapper) GetMessageHeaders(echoTag string) ([]msg.Message, error)
func (*EchoMapper) GetMessageNewCount ¶
func (self *EchoMapper) GetMessageNewCount() (int, error)
func (*EchoMapper) IsMessageExistsByHash ¶
func (self *EchoMapper) IsMessageExistsByHash(echoTag string, msgHash string) (bool, error)
func (*EchoMapper) MarkAllReadByAreaName ¶
func (self *EchoMapper) MarkAllReadByAreaName(echoTag string) error
func (*EchoMapper) RemoveMessageByHash ¶
func (self *EchoMapper) RemoveMessageByHash(echoTag string, msgHash string) error
func (*EchoMapper) RemoveMessagesByAreaName ¶
func (self *EchoMapper) RemoveMessagesByAreaName(echoTag string) error
func (*EchoMapper) UpdateAreaMessageCounters ¶
func (self *EchoMapper) UpdateAreaMessageCounters(areas []Area) ([]Area, error)
func (*EchoMapper) ViewMessageByHash ¶
func (self *EchoMapper) ViewMessageByHash(echoTag string, msgHash string) error
type File ¶
type File struct {
// contains filtered or unexported fields
}
func (*File) GetAbsolutePath ¶
func (File) GetOrigName ¶
func (File) GetUnixTime ¶
func (File) GetViewCount ¶
func (*File) SetAbsolutePath ¶
func (*File) SetOrigName ¶
func (*File) SetUnixTime ¶
func (*File) SetViewCount ¶
type FileArea ¶
type FileArea struct { Path string // contains filtered or unexported fields }
func NewFileArea ¶
func NewFileArea() *FileArea
func (FileArea) GetCharset ¶
func (*FileArea) GetNewCount ¶
func (FileArea) GetSummary ¶
func (*FileArea) SetCharset ¶
func (*FileArea) SetNewCount ¶
func (*FileArea) SetSummary ¶
type FileAreaMapper ¶
type FileAreaMapper struct {
Mapper
}
func NewFileAreaMapper ¶
func NewFileAreaMapper(r *registry.Container) *FileAreaMapper
func (*FileAreaMapper) CreateFileArea ¶
func (self *FileAreaMapper) CreateFileArea(a *FileArea) error
func (*FileAreaMapper) GetAreaByName ¶
func (self *FileAreaMapper) GetAreaByName(areaName string) (*FileArea, error)
func (*FileAreaMapper) GetAreas ¶
func (self *FileAreaMapper) GetAreas() ([]FileArea, error)
func (FileAreaMapper) GetMessageNewCount ¶
func (self FileAreaMapper) GetMessageNewCount() (int, error)
func (*FileAreaMapper) UpdateFileAreasWithFileCount ¶
func (self *FileAreaMapper) UpdateFileAreasWithFileCount(fileAreas []FileArea) ([]FileArea, error)
func (*FileAreaMapper) UpdateNewFileAreasWithFileCount ¶
func (self *FileAreaMapper) UpdateNewFileAreasWithFileCount(fileAreas []FileArea) ([]FileArea, error)
type FileMapper ¶
type FileMapper struct {
Mapper
}
func NewFileMapper ¶
func NewFileMapper(r *registry.Container) *FileMapper
func (*FileMapper) CheckFileExists ¶
func (self *FileMapper) CheckFileExists(tic File) (bool, error)
func (FileMapper) GetFileAbsolutePath ¶
func (self FileMapper) GetFileAbsolutePath(areaName string, name string) string
func (*FileMapper) GetFileBoxAbsolutePath ¶
func (self *FileMapper) GetFileBoxAbsolutePath(areaName string) string
func (*FileMapper) GetFileByIndexName ¶
func (self *FileMapper) GetFileByIndexName(echoTag string, indexName string) (*File, error)
func (*FileMapper) GetFileHeaders ¶
func (self *FileMapper) GetFileHeaders(echoTag string) ([]File, error)
func (*FileMapper) GetFileNewCount ¶
func (self *FileMapper) GetFileNewCount() (int, error)
func (*FileMapper) RegisterFile ¶
func (self *FileMapper) RegisterFile(tic File) error
func (*FileMapper) RemoveAreaByName ¶
func (self *FileMapper) RemoveAreaByName(areaName string) error
func (*FileMapper) RemoveFileByName ¶
func (self *FileMapper) RemoveFileByName(indexName string) error
func (*FileMapper) RemoveFilesByAreaName ¶
func (self *FileMapper) RemoveFilesByAreaName(areaName string) error
func (*FileMapper) ViewFileByIndexName ¶
func (self *FileMapper) ViewFileByIndexName(fileArea string, indexName string) error
type Mapper ¶
type Mapper struct {
// contains filtered or unexported fields
}
func (*Mapper) SetRegistry ¶
type MapperManager ¶
type MapperManager struct {
// contains filtered or unexported fields
}
func NewMapperManager ¶
func NewMapperManager(r *registry.Container) *MapperManager
func RestoreMapperManager ¶
func RestoreMapperManager(r *registry.Container) *MapperManager
func (MapperManager) GetConfigMapper ¶
func (self MapperManager) GetConfigMapper() *ConfigMapper
func (MapperManager) GetDraftMapper ¶
func (self MapperManager) GetDraftMapper() *DraftMapper
func (MapperManager) GetEchoAreaMapper ¶
func (self MapperManager) GetEchoAreaMapper() *EchoAreaMapper
func (MapperManager) GetEchoMapper ¶
func (self MapperManager) GetEchoMapper() *EchoMapper
/ GetEchoMapper provide echo mapper
func (MapperManager) GetFileAreaMapper ¶
func (self MapperManager) GetFileAreaMapper() *FileAreaMapper
func (MapperManager) GetFileMapper ¶
func (self MapperManager) GetFileMapper() *FileMapper
func (MapperManager) GetNetmailMapper ¶
func (self MapperManager) GetNetmailMapper() *NetmailMapper
func (MapperManager) GetStatMailerMapper ¶
func (self MapperManager) GetStatMailerMapper() *StatMailerMapper
func (MapperManager) GetTwitMapper ¶
func (self MapperManager) GetTwitMapper() *TwitMapper
type NetmailMapper ¶
type NetmailMapper struct {
Mapper
}
func NewNetmailMapper ¶
func NewNetmailMapper(r *registry.Container) *NetmailMapper
func (*NetmailMapper) GetMessageByHash ¶
func (self *NetmailMapper) GetMessageByHash(msgHash string) (*NetmailMsg, error)
func (*NetmailMapper) GetMessageHeaders ¶
func (self *NetmailMapper) GetMessageHeaders() ([]*NetmailMsg, error)
func (*NetmailMapper) GetMessageNewCount ¶
func (self *NetmailMapper) GetMessageNewCount() (int, error)
func (*NetmailMapper) RemoveMessageByHash ¶
func (self *NetmailMapper) RemoveMessageByHash(msgHash string) error
func (*NetmailMapper) ViewMessageByHash ¶
func (self *NetmailMapper) ViewMessageByHash(msgHash string) error
func (*NetmailMapper) Write ¶
func (self *NetmailMapper) Write(msg *NetmailMsg) error
type NetmailMsg ¶
type NetmailMsg struct { ID string MsgID string Hash string From string To string OrigAddr string DestAddr string Subject string Content string UnixTime int64 ViewCount int DateWritten time.Time // contains filtered or unexported fields }
func NewNetmailMsg ¶
func NewNetmailMsg() *NetmailMsg
func (*NetmailMsg) GetContent ¶
func (self *NetmailMsg) GetContent() string
func (*NetmailMsg) GetFrom ¶
func (self *NetmailMsg) GetFrom() string
func (*NetmailMsg) GetPacket ¶
func (self *NetmailMsg) GetPacket() []byte
func (*NetmailMsg) SetContent ¶
func (self *NetmailMsg) SetContent(body string) *NetmailMsg
func (*NetmailMsg) SetDestAddr ¶
func (self *NetmailMsg) SetDestAddr(addr string)
func (*NetmailMsg) SetFrom ¶
func (self *NetmailMsg) SetFrom(from string)
func (*NetmailMsg) SetHash ¶
func (self *NetmailMsg) SetHash(hash string) *NetmailMsg
func (*NetmailMsg) SetID ¶
func (self *NetmailMsg) SetID(id string)
func (*NetmailMsg) SetMsgID ¶
func (self *NetmailMsg) SetMsgID(msgID string)
func (*NetmailMsg) SetOrigAddr ¶
func (self *NetmailMsg) SetOrigAddr(addr string)
func (*NetmailMsg) SetPacket ¶
func (self *NetmailMsg) SetPacket(packet []byte)
func (*NetmailMsg) SetSubject ¶
func (self *NetmailMsg) SetSubject(subject string)
func (*NetmailMsg) SetTime ¶
func (self *NetmailMsg) SetTime(ptm time.Time)
func (*NetmailMsg) SetTo ¶
func (self *NetmailMsg) SetTo(to string)
func (*NetmailMsg) SetUnixTime ¶
func (self *NetmailMsg) SetUnixTime(unixTime int64)
func (*NetmailMsg) SetViewCount ¶
func (self *NetmailMsg) SetViewCount(count int) *NetmailMsg
type StatMailer ¶
type StatMailer struct { SessionID int64 /* Timestamp in nanoseconds */ SessionStart int64 /* Session start in milliseconds */ SessionStop int64 /* Session stop in milliseconds */ Status string /* Summary report */ }
func (StatMailer) GetDuration ¶
func (self StatMailer) GetDuration() uint64
type StatMailerMapper ¶
type StatMailerMapper struct {
Mapper
}
func NewStatMailerMapper ¶
func NewStatMailerMapper(r *registry.Container) *StatMailerMapper
func (*StatMailerMapper) GetMailerSummary ¶
func (self *StatMailerMapper) GetMailerSummary() ([]StatMailer, error)
func (*StatMailerMapper) UpdateSession ¶
func (self *StatMailerMapper) UpdateSession(mailerReport *StatMailer) error
type TwitMapper ¶
type TwitMapper struct {
Mapper
}
func NewTwitMapper ¶
func NewTwitMapper(r *registry.Container) *TwitMapper
func (TwitMapper) GetTwitNames ¶
func (self TwitMapper) GetTwitNames() ([]Twit, error)
func (TwitMapper) RegisterTwitByName ¶
func (self TwitMapper) RegisterTwitByName(twitName string) error
func (TwitMapper) RemoveById ¶
func (self TwitMapper) RemoveById(twitId string) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.