Documentation ¶
Index ¶
- func Create() dbrepo.Repository
- type MysqlRepository
- func (r *MysqlRepository) Close()
- func (r *MysqlRepository) CreateTemplate(ctx context.Context, tpl *entity.Template) error
- func (r *MysqlRepository) DeleteTemplate(ctx context.Context, uuid string, permanent bool) error
- func (r *MysqlRepository) GetTemplateByCid(ctx context.Context, cid string, lang string) (*entity.Template, error)
- func (r *MysqlRepository) GetTemplateById(ctx context.Context, id string) (*entity.Template, error)
- func (r *MysqlRepository) GetTemplates(ctx context.Context) ([]*entity.Template, error)
- func (r *MysqlRepository) Migrate() error
- func (r *MysqlRepository) Open() error
- func (r *MysqlRepository) UpdateTemplate(ctx context.Context, uuid string, data *entity.Template) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create() dbrepo.Repository
Types ¶
type MysqlRepository ¶
type MysqlRepository struct {
// contains filtered or unexported fields
}
func (*MysqlRepository) Close ¶
func (r *MysqlRepository) Close()
func (*MysqlRepository) CreateTemplate ¶
func (*MysqlRepository) DeleteTemplate ¶
Note: The DeleteTemplate function does not really delete a database entry. Rather it sets the 'deleted_at' timestamp, which results it not being found on the get/update queries. This could be useful for some sort of "Archive" in the Dashboard for the Admins to restore deleted templates or as some sort of Backup.
func (*MysqlRepository) GetTemplateByCid ¶
func (*MysqlRepository) GetTemplateById ¶
func (*MysqlRepository) GetTemplates ¶
func (*MysqlRepository) Migrate ¶
func (r *MysqlRepository) Migrate() error
func (*MysqlRepository) Open ¶
func (r *MysqlRepository) Open() error
func (*MysqlRepository) UpdateTemplate ¶
Click to show internal directories.
Click to hide internal directories.