template_repo

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TemplateRepository

type TemplateRepository struct {
	// contains filtered or unexported fields
}

TemplateRepository handles template database operations

func NewTemplateRepository

func NewTemplateRepository(db *ent.Client) *TemplateRepository

NewTemplateRepository creates a new repository

func (*TemplateRepository) GetAll

func (self *TemplateRepository) GetAll(ctx context.Context) ([]*ent.Template, error)

func (*TemplateRepository) GetByID

func (self *TemplateRepository) GetByID(ctx context.Context, id uuid.UUID) (*ent.Template, error)

func (*TemplateRepository) UpsertPredefinedTemplates

func (self *TemplateRepository) UpsertPredefinedTemplates(ctx context.Context) (result error)

type TemplateRepositoryInterface

type TemplateRepositoryInterface interface {
	UpsertPredefinedTemplates(ctx context.Context) (result error)
	GetByID(ctx context.Context, id uuid.UUID) (*ent.Template, error)
	GetAll(ctx context.Context) ([]*ent.Template, error)
}

TemplateRepositoryInterface ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL