Documentation
¶
Index ¶
- Variables
- func NewConnection(config Config) (*sql.DB, error)
- type BarangayStore
- func (store BarangayStore) Find(id int) (models.Barangay, error)
- func (store BarangayStore) FindByCode(code string) (models.Barangay, error)
- func (store BarangayStore) FindByName(name string) (models.Barangay, error)
- func (store BarangayStore) List(opts stores.SearchOpts) (stores.Collection[models.Barangay], error)
- func (store BarangayStore) ListByCityCode(code string, opts stores.SearchOpts) (stores.Collection[models.Barangay], error)
- func (store BarangayStore) ListByMunicipalityCode(code string, opts stores.SearchOpts) (stores.Collection[models.Barangay], error)
- func (store BarangayStore) ListBySpecialGovernmentUnitCode(code string, opts stores.SearchOpts) (stores.Collection[models.Barangay], error)
- func (store BarangayStore) ListBySubMunicipalityCode(code string, opts stores.SearchOpts) (stores.Collection[models.Barangay], error)
- func (store BarangayStore) Save(ctx context.Context, barangay models.Barangay) error
- type CityStore
- func (store CityStore) Find(id int) (models.City, error)
- func (store CityStore) FindByCode(code string) (models.City, error)
- func (store CityStore) FindByName(name string) (models.City, error)
- func (store CityStore) List(opts stores.SearchOpts) (stores.Collection[models.City], error)
- func (store CityStore) ListByDistrictCode(code string, opts stores.SearchOpts) (stores.Collection[models.City], error)
- func (store CityStore) ListByProvinceCode(code string, opts stores.SearchOpts) (stores.Collection[models.City], error)
- func (store CityStore) Save(ctx context.Context, city models.City) error
- type Config
- type DistrictStore
- func (store DistrictStore) Find(id int) (models.District, error)
- func (store DistrictStore) FindByCode(code string) (models.District, error)
- func (store DistrictStore) FindByName(name string) (models.District, error)
- func (store DistrictStore) List(opts stores.SearchOpts) (stores.Collection[models.District], error)
- func (store DistrictStore) ListByRegionCode(code string, opts stores.SearchOpts) (stores.Collection[models.District], error)
- func (store DistrictStore) Save(ctx context.Context, district models.District) error
- type MunicipalityStore
- func (store MunicipalityStore) Find(id int) (models.Municipality, error)
- func (store MunicipalityStore) FindByCode(code string) (models.Municipality, error)
- func (store MunicipalityStore) FindByName(name string) (models.Municipality, error)
- func (store MunicipalityStore) List(opts stores.SearchOpts) (stores.Collection[models.Municipality], error)
- func (store MunicipalityStore) ListByDistrictCode(code string, opts stores.SearchOpts) (stores.Collection[models.Municipality], error)
- func (store MunicipalityStore) ListByProvinceCode(code string, opts stores.SearchOpts) (stores.Collection[models.Municipality], error)
- func (store MunicipalityStore) Save(ctx context.Context, municipality models.Municipality) error
- type ProvinceStore
- func (store ProvinceStore) Find(id int) (models.Province, error)
- func (store ProvinceStore) FindByCode(ctx context.Context, code string) (models.Province, error)
- func (store ProvinceStore) FindByName(ctx context.Context, name string) (models.Province, error)
- func (store ProvinceStore) List(opts stores.SearchOpts) (stores.Collection[models.Province], error)
- func (store ProvinceStore) ListByRegionCode(code string, opts stores.SearchOpts) (stores.Collection[models.Province], error)
- func (store ProvinceStore) Save(ctx context.Context, province models.Province) error
- type RegionStore
- func (store RegionStore) Find(id int) (models.Region, error)
- func (store RegionStore) FindByCode(code string) (models.Region, error)
- func (store RegionStore) FindByName(name string) (models.Region, error)
- func (store RegionStore) List(opts stores.SearchOpts) (stores.Collection[models.Region], error)
- func (store RegionStore) Save(ctx context.Context, region models.Region) error
- type SpecialGovernmentUnit
- func (store SpecialGovernmentUnit) Find(id int) (models.SpecialGovernmentUnit, error)
- func (store SpecialGovernmentUnit) FindByCode(code string) (models.SpecialGovernmentUnit, error)
- func (store SpecialGovernmentUnit) FindByName(name string) (models.SpecialGovernmentUnit, error)
- func (store SpecialGovernmentUnit) List(opts stores.SearchOpts) (stores.Collection[models.SpecialGovernmentUnit], error)
- func (store SpecialGovernmentUnit) ListByProvinceCode(code string, opts stores.SearchOpts) (stores.Collection[models.SpecialGovernmentUnit], error)
- func (store SpecialGovernmentUnit) Save(ctx context.Context, sgu models.SpecialGovernmentUnit) error
- type SubMunicipalityStore
- func (store SubMunicipalityStore) Find(id int) (models.SubMunicipality, error)
- func (store SubMunicipalityStore) FindByCode(code string) (models.SubMunicipality, error)
- func (store SubMunicipalityStore) FindByName(name string) (models.SubMunicipality, error)
- func (store SubMunicipalityStore) List(opts stores.SearchOpts) (stores.Collection[models.SubMunicipality], error)
- func (store SubMunicipalityStore) ListByCityCode(code string, opts stores.SearchOpts) (stores.Collection[models.SubMunicipality], error)
- func (store SubMunicipalityStore) Save(ctx context.Context, subMunicipality models.SubMunicipality) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidCursor = errors.New("invalid cursor")
)
Functions ¶
Types ¶
type BarangayStore ¶
type BarangayStore struct {
// contains filtered or unexported fields
}
func NewBarangayStore ¶
func NewBarangayStore(db *sql.DB) *BarangayStore
func (BarangayStore) FindByCode ¶
func (store BarangayStore) FindByCode(code string) (models.Barangay, error)
func (BarangayStore) FindByName ¶
func (store BarangayStore) FindByName(name string) (models.Barangay, error)
func (BarangayStore) List ¶
func (store BarangayStore) List(opts stores.SearchOpts) (stores.Collection[models.Barangay], error)
func (BarangayStore) ListByCityCode ¶
func (store BarangayStore) ListByCityCode(code string, opts stores.SearchOpts) (stores.Collection[models.Barangay], error)
func (BarangayStore) ListByMunicipalityCode ¶
func (store BarangayStore) ListByMunicipalityCode(code string, opts stores.SearchOpts) (stores.Collection[models.Barangay], error)
func (BarangayStore) ListBySpecialGovernmentUnitCode ¶
func (store BarangayStore) ListBySpecialGovernmentUnitCode(code string, opts stores.SearchOpts) (stores.Collection[models.Barangay], error)
func (BarangayStore) ListBySubMunicipalityCode ¶
func (store BarangayStore) ListBySubMunicipalityCode(code string, opts stores.SearchOpts) (stores.Collection[models.Barangay], error)
type CityStore ¶
type CityStore struct {
// contains filtered or unexported fields
}
func NewCityStore ¶
func (CityStore) List ¶
func (store CityStore) List(opts stores.SearchOpts) (stores.Collection[models.City], error)
func (CityStore) ListByDistrictCode ¶
func (store CityStore) ListByDistrictCode(code string, opts stores.SearchOpts) (stores.Collection[models.City], error)
func (CityStore) ListByProvinceCode ¶
func (store CityStore) ListByProvinceCode(code string, opts stores.SearchOpts) (stores.Collection[models.City], error)
type DistrictStore ¶
type DistrictStore struct {
// contains filtered or unexported fields
}
func NewDistrictStore ¶
func NewDistrictStore(connection *sql.DB) *DistrictStore
func (DistrictStore) FindByCode ¶
func (store DistrictStore) FindByCode(code string) (models.District, error)
func (DistrictStore) FindByName ¶
func (store DistrictStore) FindByName(name string) (models.District, error)
func (DistrictStore) List ¶
func (store DistrictStore) List(opts stores.SearchOpts) (stores.Collection[models.District], error)
func (DistrictStore) ListByRegionCode ¶
func (store DistrictStore) ListByRegionCode(code string, opts stores.SearchOpts) (stores.Collection[models.District], error)
type MunicipalityStore ¶
type MunicipalityStore struct {
// contains filtered or unexported fields
}
func NewMunicipalityStore ¶
func NewMunicipalityStore(connection *sql.DB) *MunicipalityStore
func (MunicipalityStore) Find ¶
func (store MunicipalityStore) Find(id int) (models.Municipality, error)
func (MunicipalityStore) FindByCode ¶
func (store MunicipalityStore) FindByCode(code string) (models.Municipality, error)
func (MunicipalityStore) FindByName ¶
func (store MunicipalityStore) FindByName(name string) (models.Municipality, error)
func (MunicipalityStore) List ¶
func (store MunicipalityStore) List(opts stores.SearchOpts) (stores.Collection[models.Municipality], error)
func (MunicipalityStore) ListByDistrictCode ¶
func (store MunicipalityStore) ListByDistrictCode(code string, opts stores.SearchOpts) (stores.Collection[models.Municipality], error)
func (MunicipalityStore) ListByProvinceCode ¶
func (store MunicipalityStore) ListByProvinceCode(code string, opts stores.SearchOpts) (stores.Collection[models.Municipality], error)
func (MunicipalityStore) Save ¶
func (store MunicipalityStore) Save(ctx context.Context, municipality models.Municipality) error
type ProvinceStore ¶
type ProvinceStore struct {
// contains filtered or unexported fields
}
func NewProvinceStore ¶
func NewProvinceStore(connection *sql.DB) *ProvinceStore
func (ProvinceStore) FindByCode ¶
func (ProvinceStore) FindByName ¶
func (ProvinceStore) List ¶
func (store ProvinceStore) List(opts stores.SearchOpts) (stores.Collection[models.Province], error)
func (ProvinceStore) ListByRegionCode ¶
func (store ProvinceStore) ListByRegionCode(code string, opts stores.SearchOpts) (stores.Collection[models.Province], error)
type RegionStore ¶
type RegionStore struct {
// contains filtered or unexported fields
}
func NewRegionStore ¶
func NewRegionStore(connection *sql.DB) *RegionStore
func (RegionStore) FindByCode ¶
func (store RegionStore) FindByCode(code string) (models.Region, error)
func (RegionStore) FindByName ¶
func (store RegionStore) FindByName(name string) (models.Region, error)
func (RegionStore) List ¶
func (store RegionStore) List(opts stores.SearchOpts) (stores.Collection[models.Region], error)
type SpecialGovernmentUnit ¶
type SpecialGovernmentUnit struct {
// contains filtered or unexported fields
}
func NewSpecialGovernmentUnit ¶
func NewSpecialGovernmentUnit(db *sql.DB) *SpecialGovernmentUnit
func (SpecialGovernmentUnit) Find ¶
func (store SpecialGovernmentUnit) Find(id int) (models.SpecialGovernmentUnit, error)
func (SpecialGovernmentUnit) FindByCode ¶
func (store SpecialGovernmentUnit) FindByCode(code string) (models.SpecialGovernmentUnit, error)
func (SpecialGovernmentUnit) FindByName ¶
func (store SpecialGovernmentUnit) FindByName(name string) (models.SpecialGovernmentUnit, error)
func (SpecialGovernmentUnit) List ¶
func (store SpecialGovernmentUnit) List(opts stores.SearchOpts) (stores.Collection[models.SpecialGovernmentUnit], error)
func (SpecialGovernmentUnit) ListByProvinceCode ¶
func (store SpecialGovernmentUnit) ListByProvinceCode(code string, opts stores.SearchOpts) (stores.Collection[models.SpecialGovernmentUnit], error)
func (SpecialGovernmentUnit) Save ¶
func (store SpecialGovernmentUnit) Save(ctx context.Context, sgu models.SpecialGovernmentUnit) error
type SubMunicipalityStore ¶
type SubMunicipalityStore struct {
// contains filtered or unexported fields
}
func NewSubMunicipalityStore ¶
func NewSubMunicipalityStore(db *sql.DB) *SubMunicipalityStore
func (SubMunicipalityStore) Find ¶
func (store SubMunicipalityStore) Find(id int) (models.SubMunicipality, error)
func (SubMunicipalityStore) FindByCode ¶
func (store SubMunicipalityStore) FindByCode(code string) (models.SubMunicipality, error)
func (SubMunicipalityStore) FindByName ¶
func (store SubMunicipalityStore) FindByName(name string) (models.SubMunicipality, error)
func (SubMunicipalityStore) List ¶
func (store SubMunicipalityStore) List(opts stores.SearchOpts) (stores.Collection[models.SubMunicipality], error)
func (SubMunicipalityStore) ListByCityCode ¶
func (store SubMunicipalityStore) ListByCityCode(code string, opts stores.SearchOpts) (stores.Collection[models.SubMunicipality], error)
func (SubMunicipalityStore) Save ¶
func (store SubMunicipalityStore) Save(ctx context.Context, subMunicipality models.SubMunicipality) error
Click to show internal directories.
Click to hide internal directories.