Documentation ¶
Index ¶
- func Create() dbrepo.Repository
- type InmemoryRepository
- func (r *InmemoryRepository) Close()
- func (r *InmemoryRepository) CreateTemplate(ctx context.Context, tpl *entity.Template) error
- func (r *InmemoryRepository) DeleteTemplate(ctx context.Context, uuid string, permanent bool) error
- func (r *InmemoryRepository) GetTemplateByCid(ctx context.Context, cid string, lang string) (*entity.Template, error)
- func (r *InmemoryRepository) GetTemplateById(ctx context.Context, id string) (*entity.Template, error)
- func (r *InmemoryRepository) GetTemplates(ctx context.Context) ([]*entity.Template, error)
- func (r *InmemoryRepository) Migrate() error
- func (r *InmemoryRepository) Open() error
- func (r *InmemoryRepository) 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 InmemoryRepository ¶
type InmemoryRepository struct {
// contains filtered or unexported fields
}
func (*InmemoryRepository) Close ¶
func (r *InmemoryRepository) Close()
func (*InmemoryRepository) CreateTemplate ¶
func (*InmemoryRepository) 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 (*InmemoryRepository) GetTemplateByCid ¶
func (*InmemoryRepository) GetTemplateById ¶
func (*InmemoryRepository) GetTemplates ¶
func (*InmemoryRepository) Migrate ¶
func (r *InmemoryRepository) Migrate() error
func (*InmemoryRepository) Open ¶
func (r *InmemoryRepository) Open() error
func (*InmemoryRepository) UpdateTemplate ¶
Click to show internal directories.
Click to hide internal directories.