Documentation ¶
Index ¶
- Variables
- type Attachment
- func (core *Attachment) ConfirmUpload(attachmentID model.ID, userID model.ID) error
- func (core *Attachment) Create(partial model.AttachmentPartial, userID model.ID) (*model.AttachmentURL, error)
- func (core *Attachment) Get(attachmentID model.ID, userID model.ID) (*model.AttachmentURL, error)
- func (core *Attachment) GetAttachments(userID model.ID) ([]model.Attachment, error)
- func (core *Attachment) RefreshUploadURL(attachmentID model.ID, userID model.ID) (*model.AttachmentURL, error)
- func (core *Attachment) Uploaded(userID model.ID, minioName string) (bool, error)
- type Cores
- type EmailList
- func (core *EmailList) AddEmails(name string, userID model.ID, emails model.EmailListEmails) error
- func (core *EmailList) Create(userID model.ID, partial model.EmailListPartial) error
- func (core *EmailList) Delete(name string, userID model.ID, deletedBy model.ID) error
- func (core *EmailList) Get(name string, userID model.ID) (*model.EmailList, error)
- func (core *EmailList) GetAll(userID model.ID) ([]model.EmailList, error)
- func (core *EmailList) RemoveEmail(name string, userID model.ID, email model.ID) error
- func (core *EmailList) RemoveEmails(name string, userID model.ID, emails model.EmailListEmails) error
- func (core *EmailList) UpdateInfo(name string, userID model.ID, info model.EmailListInfo) error
- type ModelInvalidError
- type Queue
- func (core *Queue) Create(partial model.QueuePartial, userID model.ID) error
- func (core *Queue) Delete(name string, userID model.ID) error
- func (core *Queue) Exist(name string) (bool, error)
- func (core *Queue) Get(name string) (*model.Queue, error)
- func (core *Queue) GetAll() ([]model.Queue, error)
- func (core *Queue) SendEmail(queue string, partial model.EmailPartial, userID model.ID) error
- type Template
- func (core *Template) Create(partial model.TemplatePartial, userID model.ID) error
- func (core *Template) Delete(name string, userID model.ID) error
- func (core *Template) Exist(name string) (bool, error)
- func (core *Template) Get(name string) (*model.Template, error)
- func (core *Template) GetAll() ([]model.Template, error)
- func (core *Template) GetByUser(userID model.ID) ([]model.Template, error)
- func (core *Template) GetFields(name string) ([]string, error)
- func (core *Template) Update(name string, partial model.TemplatePartial) error
- type User
- func (core *User) Create(partial model.UserPartial, adminID model.ID) error
- func (core *User) Delete(userID model.ID, deleteByID model.ID) error
- func (core *User) ExistByNameOrEmail(name, email string) (bool, error)
- func (core *User) GetAll() ([]model.User, error)
- func (core *User) GetByID(userID model.ID) (*model.User, error)
- func (core *User) GetByNameOrEmail(name, email string) (*model.User, error)
- func (core *User) GetSession(sessionID model.ID) (*model.UserSession, error)
- func (core *User) IsAdmin(userID model.ID) (bool, error)
- func (core *User) NewAdmin(userID model.ID) error
- func (core *User) NewSession(partial model.UserSessionPartial) (*model.UserSession, error)
- func (core *User) Protected(userID model.ID) error
- func (core *User) RemoveAdmin(userID model.ID) error
- func (core *User) ReplaceSession(sessionID model.ID) (*model.UserSession, error)
- func (core *User) Update(userID model.ID, partial model.UserPartial) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidName = errors.New("was sent a invalid name") ErrUserAlreadyExist = errors.New("user already exist") ErrUserDoesNotExist = errors.New("user does not exist") ErrUserWrongPassword = errors.New("was sent a wrong password") ErrUserSessionDoesNotExist = errors.New("user session does not exist") ErrUserSessionDeleted = errors.New("user session deleted") ErrUserIsNotAdmin = errors.New("user is not admin") ErrUserIsProtected = errors.New("user is protected") ErrQueueAlreadyExist = errors.New("queue already exist") ErrQueueDoesNotExist = errors.New("queue does not exist") ErrBodyValidate = errors.New("unable to parse body") ErrTemplateNameAlreadyExist = errors.New("template name already exist") ErrMaxSizeTemplate = errors.New("template has a max size of 1MB") ErrMissingFieldTemplates = errors.New("missing fields from template") ErrTemplateDoesNotExist = errors.New("template does not exist") ErrAttachmentDoesNotExist = errors.New("attachment does not exist") ErrAttachmentDoesNotExistOnMinio = errors.New("attachment does not exist on minio") ErrMaxSizeAttachment = errors.New("attachment has a max size") ErrUploadAlreadyConfirmed = errors.New("upload already confirmed") ErrEmailListAlreadyExist = errors.New("email list already exist") ErrEmailListDoesNotExist = errors.New("email list does not exist") )
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct {
// contains filtered or unexported fields
}
func (*Attachment) ConfirmUpload ¶
func (*Attachment) Create ¶
func (core *Attachment) Create( partial model.AttachmentPartial, userID model.ID, ) (*model.AttachmentURL, error)
func (*Attachment) Get ¶
func (core *Attachment) Get( attachmentID model.ID, userID model.ID, ) (*model.AttachmentURL, error)
func (*Attachment) GetAttachments ¶
func (core *Attachment) GetAttachments(userID model.ID) ([]model.Attachment, error)
func (*Attachment) RefreshUploadURL ¶
func (core *Attachment) RefreshUploadURL( attachmentID model.ID, userID model.ID, ) (*model.AttachmentURL, error)
type EmailList ¶
type EmailList struct {
// contains filtered or unexported fields
}
func (*EmailList) RemoveEmail ¶
func (*EmailList) RemoveEmails ¶
func (*EmailList) UpdateInfo ¶
type ModelInvalidError ¶
type ModelInvalidError struct {
// contains filtered or unexported fields
}
func (ModelInvalidError) Error ¶
func (err ModelInvalidError) Error() string
func (ModelInvalidError) Translate ¶
func (err ModelInvalidError) Translate(language ut.Translator) string
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) NewSession ¶
func (core *User) NewSession(partial model.UserSessionPartial) (*model.UserSession, error)
func (*User) ReplaceSession ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.