persistence

package
v0.0.0-...-bc2656d Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryMovieRepository

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

@Repository @Adapter

func NewInMemoryMovieRepository

func NewInMemoryMovieRepository() *InMemoryMovieRepository

func (*InMemoryMovieRepository) Save

func (InMemoryMovieRepository) Search

func (i InMemoryMovieRepository) Search(_ context.Context, movieId movie.Id) (*movie.Movie, error)

func (InMemoryMovieRepository) SearchByCriteria

func (i InMemoryMovieRepository) SearchByCriteria(_ context.Context, criteria domain.Criteria) (
	[]*movie.Movie, error)

type PostgresMovieRepository

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

@Repository @Adapter

func NewPostgresMovieRepository

func NewPostgresMovieRepository(db *sql.DB) *PostgresMovieRepository

func (*PostgresMovieRepository) Save

func (*PostgresMovieRepository) Search

func (p *PostgresMovieRepository) Search(ctx context.Context, movieId movie.Id) (*movie.Movie, error)

func (*PostgresMovieRepository) SearchByCriteria

func (p *PostgresMovieRepository) SearchByCriteria(ctx context.Context, criteria domain.Criteria) ([]*movie.Movie, error)

Jump to

Keyboard shortcuts

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