repository

package
v0.0.0-...-39dbc78 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryPreguntaRepository

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

func NewInMemoryPreguntaRepository

func NewInMemoryPreguntaRepository() *InMemoryPreguntaRepository

func (*InMemoryPreguntaRepository) FindByID

func (repo *InMemoryPreguntaRepository) FindByID(id int) (*domain.Pregunta, error)

func (*InMemoryPreguntaRepository) Save

func (repo *InMemoryPreguntaRepository) Save(pregunta *domain.Pregunta) error

type SQLitePreguntaRepository

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

func NewSQLitePreguntaRepository

func NewSQLitePreguntaRepository(dataSourceName string) (*SQLitePreguntaRepository, error)

func (*SQLitePreguntaRepository) FindAll

func (r *SQLitePreguntaRepository) FindAll() ([]*domain.Pregunta, error)

func (*SQLitePreguntaRepository) FindByID

func (r *SQLitePreguntaRepository) FindByID(id int) (*domain.Pregunta, error)

Implement the FindByID method to fulfill the PreguntaRepository interface

func (*SQLitePreguntaRepository) Save

func (r *SQLitePreguntaRepository) Save(pregunta *domain.Pregunta) (int, error)

Jump to

Keyboard shortcuts

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