Documentation ¶
Overview ¶
internal/location-service/database/repository/country_repository.go
Index ¶
- type CountryRepository
- func (r *CountryRepository) Create(ctx context.Context, country models.Country) error
- func (r *CountryRepository) Delete(ctx context.Context, code string) error
- func (r *CountryRepository) FindAll(ctx context.Context) ([]models.Country, error)
- func (r *CountryRepository) FindByCode(ctx context.Context, code string) (*models.Country, error)
- func (r *CountryRepository) FindById(ctx context.Context, id string) (*models.Country, error)
- func (r *CountryRepository) Update(ctx context.Context, country models.Country) error
- type CountryRepositoryInterface
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) Delete ¶
func (r *CountryRepository) Delete(ctx context.Context, code string) error
func (*CountryRepository) FindByCode ¶
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 }
Click to show internal directories.
Click to hide internal directories.