gorm

package
v0.0.0-...-df736e3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GormConn

func GormConn() (*gorm.DB, error)

Types

type EventGormRepository

type EventGormRepository struct {
	DB *gorm.DB
}

func NewEventRepository

func NewEventRepository(db *gorm.DB) *EventGormRepository

NewDatabase : intializes and returns mysql db

func (*EventGormRepository) CreateEvent

func (r *EventGormRepository) CreateEvent(ctx context.Context, event *domain.Event) (*domain.Event, error)

func (*EventGormRepository) DeleteEvent

func (r *EventGormRepository) DeleteEvent(ctx context.Context, id int64) error

func (*EventGormRepository) GetAllEvents

func (r *EventGormRepository) GetAllEvents(ctx context.Context) ([]*domain.Event, error)

func (*EventGormRepository) GetEventByID

func (r *EventGormRepository) GetEventByID(ctx context.Context, id int64) (*domain.Event, error)

func (*EventGormRepository) UpdateEvent

func (r *EventGormRepository) UpdateEvent(ctx context.Context, event *domain.Event, id int64) error

Jump to

Keyboard shortcuts

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