Documentation ¶
Index ¶
- func NewMongoClient(uri string) (*mongodb.Client, error)
- type Attachment
- func (database *Attachment) Create(attachment model.Attachment) error
- func (database *Attachment) Exist(id model.ID, userID model.ID) (bool, error)
- func (database *Attachment) ExistByName(id model.ID, minioName string) (bool, error)
- func (database *Attachment) Get(id model.ID, userID model.ID) (*model.Attachment, error)
- func (database *Attachment) GetAttachments(userID model.ID) ([]model.Attachment, error)
- func (database *Attachment) GetByMinioName(minioName string) (*model.Attachment, error)
- func (database *Attachment) Update(attachment model.Attachment) error
- type Databases
- type EmailList
- func (database *EmailList) Create(emailList model.EmailList) error
- func (database *EmailList) Exist(listID model.ID) (bool, error)
- func (database *EmailList) ExistByName(name string, userID model.ID) (bool, error)
- func (database *EmailList) GetAll() ([]model.EmailList, error)
- func (database *EmailList) GetAllUser(userID model.ID) ([]model.EmailList, error)
- func (database *EmailList) GetByName(name string, userID model.ID) (*model.EmailList, error)
- func (database *EmailList) Update(list model.EmailList) error
- func (database *EmailList) UpdateInfo(listID model.ID, info model.EmailListInfo) error
- type Queue
- func (database *Queue) Create(queue model.Queue) error
- func (database *Queue) Exist(name string) (bool, error)
- func (database *Queue) Get(name string) (*model.Queue, error)
- func (database *Queue) GetAll() ([]model.Queue, error)
- func (database *Queue) SaveEmail(email model.Email) error
- func (database *Queue) Update(queue model.Queue) error
- type Template
- func (database *Template) Create(template model.Template) error
- func (database *Template) Exist(name string) (bool, error)
- func (database *Template) Get(name string) (*model.Template, error)
- func (database *Template) GetAll() ([]model.Template, error)
- func (database *Template) GetByUser(userID model.ID) ([]model.Template, error)
- func (database *Template) Update(template model.Template) error
- type User
- func (database *User) Create(user model.User) error
- func (database *User) ExistByID(userID model.ID) (bool, error)
- func (database *User) ExistByNameOrEmail(name, email string) (bool, error)
- func (database *User) ExistSession(sessionID model.ID) (bool, error)
- func (database *User) GetAll() ([]model.User, error)
- func (database *User) GetByID(userID model.ID) (*model.User, error)
- func (database *User) GetByNameOrEmail(name, email string) (*model.User, error)
- func (database *User) GetSession(sessionID model.ID) (*model.UserSession, error)
- func (database *User) SaveSession(session model.UserSession) error
- func (database *User) Update(user model.User) error
- func (database *User) UpdateSession(session model.UserSession) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attachment ¶
type Attachment struct {
// contains filtered or unexported fields
}
func (*Attachment) Create ¶
func (database *Attachment) Create(attachment model.Attachment) error
func (*Attachment) ExistByName ¶
func (*Attachment) Get ¶
func (database *Attachment) Get(id model.ID, userID model.ID) (*model.Attachment, error)
func (*Attachment) GetAttachments ¶
func (database *Attachment) GetAttachments(userID model.ID) ([]model.Attachment, error)
func (*Attachment) GetByMinioName ¶
func (database *Attachment) GetByMinioName(minioName string) (*model.Attachment, error)
func (*Attachment) Update ¶
func (database *Attachment) Update(attachment model.Attachment) error
type Databases ¶
type Databases struct { *User *Queue *Template *Attachment *EmailList }
func NewDatabases ¶
type EmailList ¶
type EmailList struct {
// contains filtered or unexported fields
}
func (*EmailList) ExistByName ¶
func (*EmailList) GetAllUser ¶
func (*EmailList) UpdateInfo ¶
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) ExistByNameOrEmail ¶
func (*User) GetByNameOrEmail ¶
func (*User) GetSession ¶
func (*User) SaveSession ¶
func (database *User) SaveSession(session model.UserSession) error
func (*User) UpdateSession ¶
func (database *User) UpdateSession(session model.UserSession) error
Click to show internal directories.
Click to hide internal directories.