infrastructure

package
v0.0.0-...-770f88d Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConnectionString

func GetConnectionString() string

func OpenConnection

func OpenConnection() (*sql.DB, error)

Types

type InMemRepository

type InMemRepository struct {
}

func NewInMemRepository

func NewInMemRepository() *InMemRepository

func (*InMemRepository) CreatePet

func (repository *InMemRepository) CreatePet(pet domain.Pet) error

func (*InMemRepository) GetPets

func (repository *InMemRepository) GetPets() (*[]domain.Pet, error)

type PostgrePetRepositoy

type PostgrePetRepositoy struct {
	Db *sql.DB
}

func NewPostgrePetRepositoy

func NewPostgrePetRepositoy(db *sql.DB) *PostgrePetRepositoy

func (*PostgrePetRepositoy) CreatePet

func (repository *PostgrePetRepositoy) CreatePet(pet *domain.Pet) error

func (*PostgrePetRepositoy) GetPets

func (repository *PostgrePetRepositoy) GetPets() (*[]domain.Pet, error)

Jump to

Keyboard shortcuts

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