rdb

package
v0.0.0-...-a562f3a Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GormRepo

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

func NewGormRepo

func NewGormRepo(db *gorm.DB) *GormRepo

func (*GormRepo) CreateFilmLog

func (r *GormRepo) CreateFilmLog(ctx context.Context, filmLog *domain.FilmLog) error

CreateFilmLog creates a film log

func (*GormRepo) CreatePhoto

func (r *GormRepo) CreatePhoto(ctx context.Context, photo *domain.Photo) error

CreatePhoto creates a photo

func (*GormRepo) CreateUser

func (r *GormRepo) CreateUser(ctx context.Context, user *domain.User) error

CreateUser creates a new user

func (*GormRepo) DeleteFilmLog

func (r *GormRepo) DeleteFilmLog(ctx context.Context, filmLogID uint) error

DeleteFilmLog deletes a film log

func (*GormRepo) DeletePhoto

func (r *GormRepo) DeletePhoto(ctx context.Context, photoID uint) error

DeletePhoto deletes a photo

func (*GormRepo) DeleteUser

func (r *GormRepo) DeleteUser(ctx context.Context, id uint) error

DeleteUser deletes a user

func (*GormRepo) GetFilmLog

func (r *GormRepo) GetFilmLog(ctx context.Context, filmLogID uint) (*domain.FilmLog, error)

GetFilmLog gets a film log by ID

func (*GormRepo) GetPhoto

func (r *GormRepo) GetPhoto(ctx context.Context, photoID uint) (*domain.Photo, error)

GetPhoto gets a photo by ID

func (*GormRepo) GetUser

func (r *GormRepo) GetUser(ctx context.Context, id uint) (*domain.User, error)

GetUser gets a user

func (*GormRepo) ListFilmLogs

func (r *GormRepo) ListFilmLogs(ctx context.Context) ([]*domain.FilmLog, error)

ListFilmLogs lists all film logs

func (*GormRepo) ListPhotos

func (r *GormRepo) ListPhotos(ctx context.Context, filmLogID uint) ([]*domain.Photo, error)

ListPhotos lists all photos for a film log

func (*GormRepo) UpdateFilmLog

func (r *GormRepo) UpdateFilmLog(ctx context.Context, filmLog *domain.FilmLog) error

UpdateFilmLog updates a film log

func (*GormRepo) UpdatePhoto

func (r *GormRepo) UpdatePhoto(ctx context.Context, photo *domain.Photo) error

UpdatePhoto updates a photo

func (*GormRepo) UpdateUser

func (r *GormRepo) UpdateUser(ctx context.Context, user *domain.User) error

UpdateUser updates a user

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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