postgres

package
v0.0.0-...-b75c45f Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func New

func New(storagePath string) (*Storage, error)

func (*Storage) CreateActor

func (s *Storage) CreateActor(actor *entity.NewActor) (int, error)

func (*Storage) CreateMovie

func (s *Storage) CreateMovie(movie *entity.NewMovie) (int, error)

func (*Storage) DeleteActor

func (s *Storage) DeleteActor(id int) error

func (*Storage) DeleteMovie

func (s *Storage) DeleteMovie(id int) error

func (*Storage) GetActorById

func (s *Storage) GetActorById(id int) (*entity.Actor, error)

func (*Storage) GetActors

func (s *Storage) GetActors(limit, offset int) ([]entity.Actor, error)

func (*Storage) GetMovieById

func (s *Storage) GetMovieById(id int) (*entity.Movie, error)

func (*Storage) GetMovies

func (s *Storage) GetMovies(limit, offset int, orderBy string, asc bool) ([]entity.Movie, error)

func (*Storage) GetUserRole

func (s *Storage) GetUserRole(username string, password string) (string, error)

func (*Storage) SearchMovies

func (s *Storage) SearchMovies(title, actorName string, limit, offset int) ([]entity.Movie, error)

func (*Storage) UpdateActor

func (s *Storage) UpdateActor(id int, actor *entity.Actor) error

func (*Storage) UpdateMovie

func (s *Storage) UpdateMovie(id int, movie *entity.Movie) error

Jump to

Keyboard shortcuts

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