repository

package
v0.0.0-...-5002bb7 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

internal/location-service/database/repository/country_repository.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountryRepository

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

func NewCountryRepository

func NewCountryRepository(db *sql.DB) *CountryRepository

func (*CountryRepository) Create

func (r *CountryRepository) Create(ctx context.Context, country models.Country) error

func (*CountryRepository) Delete

func (r *CountryRepository) Delete(ctx context.Context, code string) error

func (*CountryRepository) FindAll

func (r *CountryRepository) FindAll(ctx context.Context) ([]models.Country, error)

func (*CountryRepository) FindByCode

func (r *CountryRepository) FindByCode(ctx context.Context, code string) (*models.Country, error)

func (*CountryRepository) FindById

func (r *CountryRepository) FindById(ctx context.Context, id string) (*models.Country, error)

func (*CountryRepository) Update

func (r *CountryRepository) Update(ctx context.Context, country models.Country) error

type CountryRepositoryInterface

type CountryRepositoryInterface interface {
	Create(ctx context.Context, country models.Country) error
	FindById(ctx context.Context, id string) (*models.Country, error)
	FindByCode(ctx context.Context, code string) (*models.Country, error)
	FindAll(ctx context.Context) ([]models.Country, error)
	Update(ctx context.Context, country models.Country) error
	Delete(ctx context.Context, code string) error
}

Jump to

Keyboard shortcuts

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