repository

package
v0.0.0-...-0b5441b Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 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 CacheRepository

type CacheRepository interface {
	Get(key string) ([]byte, error)
	Set(key string, entry []byte) error
	Delete(key string) error
}

func NewCacheRepository

func NewCacheRepository() CacheRepository

type CategoryRepository

type CategoryRepository interface {
	FindAll() ([]entity.Category, error)
	Insert(category entity.Category) error
	Update(category entity.Category) error
	Delete(category entity.Category) error
}

func NewCategoryRepository

func NewCategoryRepository(db *gorm.DB) CategoryRepository

type EventRepository

type EventRepository interface {
	FindById(id string) (entity.Event, error)
	FindAllPublic(page int) ([]entity.Event, error)
	FindWithFilter(params model.FilterParam) ([]entity.Event, error)
	FindByOrganizer(id string) ([]entity.Event, error)
	Update(event entity.Event) error
	UpdateTicketDecrement(event entity.Event) error
	UpdateTicketIncrement(event entity.Event) error
	Insert(event entity.Event) error
}

func NewEventRepository

func NewEventRepository(db *gorm.DB) EventRepository

type InvoiceRepository

type InvoiceRepository interface {
	FindById(id string) (entity.Invoice, error)
	FindByUserId(id string) ([]entity.Invoice, error)
	FindByEventId(id string) ([]entity.Invoice, error)
	Insert(invoice entity.Invoice) error
	Update(invoice entity.Invoice) error
}

func NewInvoiceRepository

func NewInvoiceRepository(DB *gorm.DB) InvoiceRepository

type TicketRepository

type TicketRepository interface {
	FindById(id string) (entity.Ticket, error)
	FindByUserId(id string) ([]entity.Ticket, error)
	FindByEventId(id string) ([]entity.Ticket, error)
	Insert(ticket entity.Ticket) error
	Update(ticket entity.Ticket) error
}

func NewTicketRepository

func NewTicketRepository(db *gorm.DB) TicketRepository

type UserRepository

type UserRepository interface {
	FindById(id string) (entity.User, error)
	FindByEmail(email string) (entity.User, error)
	FindAllOrganizer() ([]entity.User, error)
	Insert(user entity.User) error
	Update(user entity.User) error
	Delete(user entity.User) error
}

func NewUserRepository

func NewUserRepository(DB *gorm.DB) UserRepository

Jump to

Keyboard shortcuts

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