Documentation ¶
Index ¶
- Variables
- func ActorByBuildingIsEqual(buildingID int64) func(s *ActorSpecificationByBuilding) bool
- func AlikeAddressSpecIsEqual(addressPrefix string, limit, offset int) func(s *BuildingSpecificationByAlikeAddress) bool
- func BuildingByAddressIsEqual(address string) func(s *BuildingSpecificationByAddress) bool
- func BuildingByIDIsEqual(id int64) func(s *BuildingSpecificationByID) bool
- func NearestSpecIsEqual(distanceMeters int, latitude, longitude float64, limit, offset int) func(s *BuildingSpecificationNearest) bool
- func NewUserRepo(dbPool *pgxpool.Pool) *userStorage
- func UserByIDIsEqual(telegramID int64) func(s *UserSpecificationByTelegramID) bool
- type Actor
- type ActorRepository
- type ActorRepository_mock
- func (_m *ActorRepository_mock) Add(_a0 context.Context, _a1 Actor) (*Actor, error)
- func (_m *ActorRepository_mock) EXPECT() *ActorRepository_mock_Expecter
- func (_m *ActorRepository_mock) Query(_a0 context.Context, _a1 Specification) ([]Actor, error)
- func (_m *ActorRepository_mock) Remove(_a0 context.Context, _a1 Actor) error
- func (_m *ActorRepository_mock) Update(_a0 context.Context, _a1 Actor) (*Actor, error)
- type ActorRepository_mock_Add_Call
- func (_c *ActorRepository_mock_Add_Call) Return(_a0 *Actor, _a1 error) *ActorRepository_mock_Add_Call
- func (_c *ActorRepository_mock_Add_Call) Run(run func(_a0 context.Context, _a1 Actor)) *ActorRepository_mock_Add_Call
- func (_c *ActorRepository_mock_Add_Call) RunAndReturn(run func(context.Context, Actor) (*Actor, error)) *ActorRepository_mock_Add_Call
- type ActorRepository_mock_Expecter
- func (_e *ActorRepository_mock_Expecter) Add(_a0 interface{}, _a1 interface{}) *ActorRepository_mock_Add_Call
- func (_e *ActorRepository_mock_Expecter) Query(_a0 interface{}, _a1 interface{}) *ActorRepository_mock_Query_Call
- func (_e *ActorRepository_mock_Expecter) Remove(_a0 interface{}, _a1 interface{}) *ActorRepository_mock_Remove_Call
- func (_e *ActorRepository_mock_Expecter) Update(_a0 interface{}, _a1 interface{}) *ActorRepository_mock_Update_Call
- type ActorRepository_mock_Query_Call
- func (_c *ActorRepository_mock_Query_Call) Return(_a0 []Actor, _a1 error) *ActorRepository_mock_Query_Call
- func (_c *ActorRepository_mock_Query_Call) Run(run func(_a0 context.Context, _a1 Specification)) *ActorRepository_mock_Query_Call
- func (_c *ActorRepository_mock_Query_Call) RunAndReturn(run func(context.Context, Specification) ([]Actor, error)) *ActorRepository_mock_Query_Call
- type ActorRepository_mock_Remove_Call
- func (_c *ActorRepository_mock_Remove_Call) Return(_a0 error) *ActorRepository_mock_Remove_Call
- func (_c *ActorRepository_mock_Remove_Call) Run(run func(_a0 context.Context, _a1 Actor)) *ActorRepository_mock_Remove_Call
- func (_c *ActorRepository_mock_Remove_Call) RunAndReturn(run func(context.Context, Actor) error) *ActorRepository_mock_Remove_Call
- type ActorRepository_mock_Update_Call
- func (_c *ActorRepository_mock_Update_Call) Return(_a0 *Actor, _a1 error) *ActorRepository_mock_Update_Call
- func (_c *ActorRepository_mock_Update_Call) Run(run func(_a0 context.Context, _a1 Actor)) *ActorRepository_mock_Update_Call
- func (_c *ActorRepository_mock_Update_Call) RunAndReturn(run func(context.Context, Actor) (*Actor, error)) *ActorRepository_mock_Update_Call
- type ActorSpecificationAll
- type ActorSpecificationByBuilding
- type ActorSpecificationByName
- type Address
- type Building
- type BuildingRepository
- type BuildingRepository_mock
- func (_m *BuildingRepository_mock) Add(_a0 context.Context, _a1 Building) (*Building, error)
- func (_m *BuildingRepository_mock) EXPECT() *BuildingRepository_mock_Expecter
- func (_m *BuildingRepository_mock) Query(_a0 context.Context, _a1 Specification) ([]Building, error)
- func (_m *BuildingRepository_mock) Remove(_a0 context.Context, _a1 Building) error
- func (_m *BuildingRepository_mock) Update(_a0 context.Context, _a1 Building) (*Building, error)
- type BuildingRepository_mock_Add_Call
- func (_c *BuildingRepository_mock_Add_Call) Return(_a0 *Building, _a1 error) *BuildingRepository_mock_Add_Call
- func (_c *BuildingRepository_mock_Add_Call) Run(run func(_a0 context.Context, _a1 Building)) *BuildingRepository_mock_Add_Call
- func (_c *BuildingRepository_mock_Add_Call) RunAndReturn(run func(context.Context, Building) (*Building, error)) *BuildingRepository_mock_Add_Call
- type BuildingRepository_mock_Expecter
- func (_e *BuildingRepository_mock_Expecter) Add(_a0 interface{}, _a1 interface{}) *BuildingRepository_mock_Add_Call
- func (_e *BuildingRepository_mock_Expecter) Query(_a0 interface{}, _a1 interface{}) *BuildingRepository_mock_Query_Call
- func (_e *BuildingRepository_mock_Expecter) Remove(_a0 interface{}, _a1 interface{}) *BuildingRepository_mock_Remove_Call
- func (_e *BuildingRepository_mock_Expecter) Update(_a0 interface{}, _a1 interface{}) *BuildingRepository_mock_Update_Call
- type BuildingRepository_mock_Query_Call
- func (_c *BuildingRepository_mock_Query_Call) Return(_a0 []Building, _a1 error) *BuildingRepository_mock_Query_Call
- func (_c *BuildingRepository_mock_Query_Call) Run(run func(_a0 context.Context, _a1 Specification)) *BuildingRepository_mock_Query_Call
- func (_c *BuildingRepository_mock_Query_Call) RunAndReturn(run func(context.Context, Specification) ([]Building, error)) *BuildingRepository_mock_Query_Call
- type BuildingRepository_mock_Remove_Call
- func (_c *BuildingRepository_mock_Remove_Call) Return(_a0 error) *BuildingRepository_mock_Remove_Call
- func (_c *BuildingRepository_mock_Remove_Call) Run(run func(_a0 context.Context, _a1 Building)) *BuildingRepository_mock_Remove_Call
- func (_c *BuildingRepository_mock_Remove_Call) RunAndReturn(run func(context.Context, Building) error) *BuildingRepository_mock_Remove_Call
- type BuildingRepository_mock_Update_Call
- func (_c *BuildingRepository_mock_Update_Call) Return(_a0 *Building, _a1 error) *BuildingRepository_mock_Update_Call
- func (_c *BuildingRepository_mock_Update_Call) Run(run func(_a0 context.Context, _a1 Building)) *BuildingRepository_mock_Update_Call
- func (_c *BuildingRepository_mock_Update_Call) RunAndReturn(run func(context.Context, Building) (*Building, error)) *BuildingRepository_mock_Update_Call
- type BuildingSpecificationAll
- type BuildingSpecificationByAddress
- type BuildingSpecificationByAlikeAddress
- type BuildingSpecificationByID
- type BuildingSpecificationNearest
- type BuildingStorage
- func (b *BuildingStorage) Add(ctx context.Context, building Building) (*Building, error)
- func (b *BuildingStorage) Query(ctx context.Context, spec Specification) ([]Building, error)
- func (b *BuildingStorage) Remove(ctx context.Context, building Building) error
- func (b *BuildingStorage) Update(ctx context.Context, building Building) (*Building, error)
- type Neighbourhood
- type NeighbourhoodRepository
- type NeighbourhoodRepository_mock
- func (_m *NeighbourhoodRepository_mock) Add(_a0 context.Context, _a1 Neighbourhood) (*Neighbourhood, error)
- func (_m *NeighbourhoodRepository_mock) EXPECT() *NeighbourhoodRepository_mock_Expecter
- func (_m *NeighbourhoodRepository_mock) Query(_a0 context.Context, _a1 Specification) ([]Neighbourhood, error)
- func (_m *NeighbourhoodRepository_mock) Remove(_a0 context.Context, _a1 Neighbourhood) error
- func (_m *NeighbourhoodRepository_mock) Update(_a0 context.Context, _a1 Neighbourhood) (*Neighbourhood, error)
- type NeighbourhoodRepository_mock_Add_Call
- func (_c *NeighbourhoodRepository_mock_Add_Call) Return(_a0 *Neighbourhood, _a1 error) *NeighbourhoodRepository_mock_Add_Call
- func (_c *NeighbourhoodRepository_mock_Add_Call) Run(run func(_a0 context.Context, _a1 Neighbourhood)) *NeighbourhoodRepository_mock_Add_Call
- func (_c *NeighbourhoodRepository_mock_Add_Call) RunAndReturn(run func(context.Context, Neighbourhood) (*Neighbourhood, error)) *NeighbourhoodRepository_mock_Add_Call
- type NeighbourhoodRepository_mock_Expecter
- func (_e *NeighbourhoodRepository_mock_Expecter) Add(_a0 interface{}, _a1 interface{}) *NeighbourhoodRepository_mock_Add_Call
- func (_e *NeighbourhoodRepository_mock_Expecter) Query(_a0 interface{}, _a1 interface{}) *NeighbourhoodRepository_mock_Query_Call
- func (_e *NeighbourhoodRepository_mock_Expecter) Remove(_a0 interface{}, _a1 interface{}) *NeighbourhoodRepository_mock_Remove_Call
- func (_e *NeighbourhoodRepository_mock_Expecter) Update(_a0 interface{}, _a1 interface{}) *NeighbourhoodRepository_mock_Update_Call
- type NeighbourhoodRepository_mock_Query_Call
- func (_c *NeighbourhoodRepository_mock_Query_Call) Return(_a0 []Neighbourhood, _a1 error) *NeighbourhoodRepository_mock_Query_Call
- func (_c *NeighbourhoodRepository_mock_Query_Call) Run(run func(_a0 context.Context, _a1 Specification)) *NeighbourhoodRepository_mock_Query_Call
- func (_c *NeighbourhoodRepository_mock_Query_Call) RunAndReturn(run func(context.Context, Specification) ([]Neighbourhood, error)) *NeighbourhoodRepository_mock_Query_Call
- type NeighbourhoodRepository_mock_Remove_Call
- func (_c *NeighbourhoodRepository_mock_Remove_Call) Return(_a0 error) *NeighbourhoodRepository_mock_Remove_Call
- func (_c *NeighbourhoodRepository_mock_Remove_Call) Run(run func(_a0 context.Context, _a1 Neighbourhood)) *NeighbourhoodRepository_mock_Remove_Call
- func (_c *NeighbourhoodRepository_mock_Remove_Call) RunAndReturn(run func(context.Context, Neighbourhood) error) *NeighbourhoodRepository_mock_Remove_Call
- type NeighbourhoodRepository_mock_Update_Call
- func (_c *NeighbourhoodRepository_mock_Update_Call) Return(_a0 *Neighbourhood, _a1 error) *NeighbourhoodRepository_mock_Update_Call
- func (_c *NeighbourhoodRepository_mock_Update_Call) Run(run func(_a0 context.Context, _a1 Neighbourhood)) *NeighbourhoodRepository_mock_Update_Call
- func (_c *NeighbourhoodRepository_mock_Update_Call) RunAndReturn(run func(context.Context, Neighbourhood) (*Neighbourhood, error)) *NeighbourhoodRepository_mock_Update_Call
- type NeighbourhoodSpecificationAll
- type NeighbourhoodSpecificationByName
- type Specification
- func NewActorSpecificationAll(limit, offset int) Specification
- func NewActorSpecificationByName(a Actor) Specification
- func NewBuildingSpecificationAll(limit, offset int) Specification
- func NewBuildingSpecificationByAddress(address string) Specification
- func NewBuildingSpecificationByAlikeAddress(prefix string, limit, offset int) Specification
- func NewBuildingSpecificationNearest(distanceMeters int, latitude, longitude float64, limit, offset int) Specification
- func NewNeighbourhoodSpecificationAll(limit, offset int) Specification
- func NewNeighbourhoodSpecificationByName(n Neighbourhood) Specification
- type Timestamps
- type UseTableNames
- type UseType
- type User
- type UserRepository
- type UserRepository_mock
- func (_m *UserRepository_mock) Add(_a0 context.Context, _a1 User) (*User, error)
- func (_m *UserRepository_mock) AddOrUpdate(_a0 context.Context, _a1 User) (*User, error)
- func (_m *UserRepository_mock) EXPECT() *UserRepository_mock_Expecter
- func (_m *UserRepository_mock) Query(_a0 context.Context, _a1 Specification) ([]User, error)
- func (_m *UserRepository_mock) Remove(_a0 context.Context, _a1 User) error
- func (_m *UserRepository_mock) Update(_a0 context.Context, _a1 User) (*User, error)
- type UserRepository_mock_AddOrUpdate_Call
- func (_c *UserRepository_mock_AddOrUpdate_Call) Return(_a0 *User, _a1 error) *UserRepository_mock_AddOrUpdate_Call
- func (_c *UserRepository_mock_AddOrUpdate_Call) Run(run func(_a0 context.Context, _a1 User)) *UserRepository_mock_AddOrUpdate_Call
- func (_c *UserRepository_mock_AddOrUpdate_Call) RunAndReturn(run func(context.Context, User) (*User, error)) *UserRepository_mock_AddOrUpdate_Call
- type UserRepository_mock_Add_Call
- func (_c *UserRepository_mock_Add_Call) Return(_a0 *User, _a1 error) *UserRepository_mock_Add_Call
- func (_c *UserRepository_mock_Add_Call) Run(run func(_a0 context.Context, _a1 User)) *UserRepository_mock_Add_Call
- func (_c *UserRepository_mock_Add_Call) RunAndReturn(run func(context.Context, User) (*User, error)) *UserRepository_mock_Add_Call
- type UserRepository_mock_Expecter
- func (_e *UserRepository_mock_Expecter) Add(_a0 interface{}, _a1 interface{}) *UserRepository_mock_Add_Call
- func (_e *UserRepository_mock_Expecter) AddOrUpdate(_a0 interface{}, _a1 interface{}) *UserRepository_mock_AddOrUpdate_Call
- func (_e *UserRepository_mock_Expecter) Query(_a0 interface{}, _a1 interface{}) *UserRepository_mock_Query_Call
- func (_e *UserRepository_mock_Expecter) Remove(_a0 interface{}, _a1 interface{}) *UserRepository_mock_Remove_Call
- func (_e *UserRepository_mock_Expecter) Update(_a0 interface{}, _a1 interface{}) *UserRepository_mock_Update_Call
- type UserRepository_mock_Query_Call
- func (_c *UserRepository_mock_Query_Call) Return(_a0 []User, _a1 error) *UserRepository_mock_Query_Call
- func (_c *UserRepository_mock_Query_Call) Run(run func(_a0 context.Context, _a1 Specification)) *UserRepository_mock_Query_Call
- func (_c *UserRepository_mock_Query_Call) RunAndReturn(run func(context.Context, Specification) ([]User, error)) *UserRepository_mock_Query_Call
- type UserRepository_mock_Remove_Call
- func (_c *UserRepository_mock_Remove_Call) Return(_a0 error) *UserRepository_mock_Remove_Call
- func (_c *UserRepository_mock_Remove_Call) Run(run func(_a0 context.Context, _a1 User)) *UserRepository_mock_Remove_Call
- func (_c *UserRepository_mock_Remove_Call) RunAndReturn(run func(context.Context, User) error) *UserRepository_mock_Remove_Call
- type UserRepository_mock_Update_Call
- func (_c *UserRepository_mock_Update_Call) Return(_a0 *User, _a1 error) *UserRepository_mock_Update_Call
- func (_c *UserRepository_mock_Update_Call) Run(run func(_a0 context.Context, _a1 User)) *UserRepository_mock_Update_Call
- func (_c *UserRepository_mock_Update_Call) RunAndReturn(run func(context.Context, User) (*User, error)) *UserRepository_mock_Update_Call
- type UserSpecificationByTelegramID
Constants ¶
This section is empty.
Variables ¶
var ( ErrDuplicate = errors.New("a record already exists") ErrNoDependency = errors.New("record dependencies don't exist") ErrNotExist = errors.New("a row does not exist") ErrInsertFailed = errors.New("insert failed") ErrUpdateFailed = errors.New("update failed") ErrDeleteFailed = errors.New("delete failed") ErrNotImplemented = errors.New("not implemented") )
Functions ¶
func ActorByBuildingIsEqual ¶
func ActorByBuildingIsEqual(buildingID int64) func(s *ActorSpecificationByBuilding) bool
func AlikeAddressSpecIsEqual ¶
func AlikeAddressSpecIsEqual(addressPrefix string, limit, offset int) func(s *BuildingSpecificationByAlikeAddress) bool
func BuildingByAddressIsEqual ¶
func BuildingByAddressIsEqual(address string) func(s *BuildingSpecificationByAddress) bool
func BuildingByIDIsEqual ¶ added in v1.0.0
func BuildingByIDIsEqual(id int64) func(s *BuildingSpecificationByID) bool
func NearestSpecIsEqual ¶
func NearestSpecIsEqual( distanceMeters int, latitude, longitude float64, limit, offset int, ) func(s *BuildingSpecificationNearest) bool
func NewUserRepo ¶ added in v1.0.0
func UserByIDIsEqual ¶ added in v1.0.0
func UserByIDIsEqual(telegramID int64) func(s *UserSpecificationByTelegramID) bool
Types ¶
type ActorRepository ¶
type ActorRepository interface { Add(context.Context, Actor) (*Actor, error) Remove(context.Context, Actor) error Update(context.Context, Actor) (*Actor, error) Query(context.Context, Specification) ([]Actor, error) }
func NewActorRepo ¶
func NewActorRepo(dbPool *pgxpool.Pool) ActorRepository
type ActorRepository_mock ¶
ActorRepository_mock is an autogenerated mock type for the ActorRepository type
func NewActorRepository_mock ¶
func NewActorRepository_mock(t interface { mock.TestingT Cleanup(func()) }) *ActorRepository_mock
NewActorRepository_mock creates a new instance of ActorRepository_mock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*ActorRepository_mock) EXPECT ¶
func (_m *ActorRepository_mock) EXPECT() *ActorRepository_mock_Expecter
func (*ActorRepository_mock) Query ¶
func (_m *ActorRepository_mock) Query(_a0 context.Context, _a1 Specification) ([]Actor, error)
Query provides a mock function with given fields: _a0, _a1
type ActorRepository_mock_Add_Call ¶
ActorRepository_mock_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
func (*ActorRepository_mock_Add_Call) Return ¶
func (_c *ActorRepository_mock_Add_Call) Return(_a0 *Actor, _a1 error) *ActorRepository_mock_Add_Call
func (*ActorRepository_mock_Add_Call) Run ¶
func (_c *ActorRepository_mock_Add_Call) Run(run func(_a0 context.Context, _a1 Actor)) *ActorRepository_mock_Add_Call
func (*ActorRepository_mock_Add_Call) RunAndReturn ¶
func (_c *ActorRepository_mock_Add_Call) RunAndReturn(run func(context.Context, Actor) (*Actor, error)) *ActorRepository_mock_Add_Call
type ActorRepository_mock_Expecter ¶
type ActorRepository_mock_Expecter struct {
// contains filtered or unexported fields
}
func (*ActorRepository_mock_Expecter) Add ¶
func (_e *ActorRepository_mock_Expecter) Add(_a0 interface{}, _a1 interface{}) *ActorRepository_mock_Add_Call
Add is a helper method to define mock.On call
- _a0 context.Context
- _a1 Actor
func (*ActorRepository_mock_Expecter) Query ¶
func (_e *ActorRepository_mock_Expecter) Query(_a0 interface{}, _a1 interface{}) *ActorRepository_mock_Query_Call
Query is a helper method to define mock.On call
- _a0 context.Context
- _a1 Specification
func (*ActorRepository_mock_Expecter) Remove ¶
func (_e *ActorRepository_mock_Expecter) Remove(_a0 interface{}, _a1 interface{}) *ActorRepository_mock_Remove_Call
Remove is a helper method to define mock.On call
- _a0 context.Context
- _a1 Actor
func (*ActorRepository_mock_Expecter) Update ¶
func (_e *ActorRepository_mock_Expecter) Update(_a0 interface{}, _a1 interface{}) *ActorRepository_mock_Update_Call
Update is a helper method to define mock.On call
- _a0 context.Context
- _a1 Actor
type ActorRepository_mock_Query_Call ¶
ActorRepository_mock_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'
func (*ActorRepository_mock_Query_Call) Return ¶
func (_c *ActorRepository_mock_Query_Call) Return(_a0 []Actor, _a1 error) *ActorRepository_mock_Query_Call
func (*ActorRepository_mock_Query_Call) Run ¶
func (_c *ActorRepository_mock_Query_Call) Run(run func(_a0 context.Context, _a1 Specification)) *ActorRepository_mock_Query_Call
func (*ActorRepository_mock_Query_Call) RunAndReturn ¶
func (_c *ActorRepository_mock_Query_Call) RunAndReturn(run func(context.Context, Specification) ([]Actor, error)) *ActorRepository_mock_Query_Call
type ActorRepository_mock_Remove_Call ¶
ActorRepository_mock_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
func (*ActorRepository_mock_Remove_Call) Return ¶
func (_c *ActorRepository_mock_Remove_Call) Return(_a0 error) *ActorRepository_mock_Remove_Call
func (*ActorRepository_mock_Remove_Call) Run ¶
func (_c *ActorRepository_mock_Remove_Call) Run(run func(_a0 context.Context, _a1 Actor)) *ActorRepository_mock_Remove_Call
func (*ActorRepository_mock_Remove_Call) RunAndReturn ¶
func (_c *ActorRepository_mock_Remove_Call) RunAndReturn(run func(context.Context, Actor) error) *ActorRepository_mock_Remove_Call
type ActorRepository_mock_Update_Call ¶
ActorRepository_mock_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
func (*ActorRepository_mock_Update_Call) Return ¶
func (_c *ActorRepository_mock_Update_Call) Return(_a0 *Actor, _a1 error) *ActorRepository_mock_Update_Call
func (*ActorRepository_mock_Update_Call) Run ¶
func (_c *ActorRepository_mock_Update_Call) Run(run func(_a0 context.Context, _a1 Actor)) *ActorRepository_mock_Update_Call
func (*ActorRepository_mock_Update_Call) RunAndReturn ¶
func (_c *ActorRepository_mock_Update_Call) RunAndReturn(run func(context.Context, Actor) (*Actor, error)) *ActorRepository_mock_Update_Call
type ActorSpecificationAll ¶
type ActorSpecificationAll struct {
// contains filtered or unexported fields
}
type ActorSpecificationByBuilding ¶
type ActorSpecificationByBuilding struct {
// contains filtered or unexported fields
}
func NewAuthorSpecificationByBuilding ¶
func NewAuthorSpecificationByBuilding(buildingID int64) *ActorSpecificationByBuilding
type ActorSpecificationByName ¶
type ActorSpecificationByName struct {
// contains filtered or unexported fields
}
type Address ¶
type Address struct { ID int64 StreetAddress string NeighbourhoodID *int64 Timestamps }
type Building ¶
type Building struct { ID int64 Code *string NameFi *string NameEn *string NameRu *string Address Address ConstructionStartYear *int CompletionYear *int ComplexFi *string ComplexEn *string ComplexRu *string HistoryFi *string HistoryEn *string HistoryRu *string ReasoningFi *string ReasoningEn *string ReasoningRu *string ProtectionStatusFi *string ProtectionStatusEn *string ProtectionStatusRu *string InfoSourceFi *string InfoSourceEn *string InfoSourceRu *string SurroundingsFi *string SurroundingsEn *string SurroundingsRu *string FoundationFi *string FoundationEn *string FoundationRu *string FrameFi *string FrameEn *string FrameRu *string FloorDescriptionFi *string FloorDescriptionEn *string FloorDescriptionRu *string FacadesFi *string FacadesEn *string FacadesRu *string SpecialFeaturesFi *string SpecialFeaturesEn *string SpecialFeaturesRu *string Latitude_ETRSGK25 *float32 Longitude_ETRSGK25 *float32 Latitude_WGS84 *float64 Longitude_WGS84 *float64 AuthorIDs []int64 InitialUses []UseType CurrentUses []UseType Timestamps }
type BuildingRepository ¶
type BuildingRepository_mock ¶
BuildingRepository_mock is an autogenerated mock type for the BuildingRepository type
func NewBuildingRepository_mock ¶
func NewBuildingRepository_mock(t interface { mock.TestingT Cleanup(func()) }) *BuildingRepository_mock
NewBuildingRepository_mock creates a new instance of BuildingRepository_mock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*BuildingRepository_mock) EXPECT ¶
func (_m *BuildingRepository_mock) EXPECT() *BuildingRepository_mock_Expecter
func (*BuildingRepository_mock) Query ¶
func (_m *BuildingRepository_mock) Query(_a0 context.Context, _a1 Specification) ([]Building, error)
Query provides a mock function with given fields: _a0, _a1
type BuildingRepository_mock_Add_Call ¶
BuildingRepository_mock_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
func (*BuildingRepository_mock_Add_Call) Return ¶
func (_c *BuildingRepository_mock_Add_Call) Return(_a0 *Building, _a1 error) *BuildingRepository_mock_Add_Call
func (*BuildingRepository_mock_Add_Call) Run ¶
func (_c *BuildingRepository_mock_Add_Call) Run(run func(_a0 context.Context, _a1 Building)) *BuildingRepository_mock_Add_Call
func (*BuildingRepository_mock_Add_Call) RunAndReturn ¶
func (_c *BuildingRepository_mock_Add_Call) RunAndReturn(run func(context.Context, Building) (*Building, error)) *BuildingRepository_mock_Add_Call
type BuildingRepository_mock_Expecter ¶
type BuildingRepository_mock_Expecter struct {
// contains filtered or unexported fields
}
func (*BuildingRepository_mock_Expecter) Add ¶
func (_e *BuildingRepository_mock_Expecter) Add(_a0 interface{}, _a1 interface{}) *BuildingRepository_mock_Add_Call
Add is a helper method to define mock.On call
- _a0 context.Context
- _a1 Building
func (*BuildingRepository_mock_Expecter) Query ¶
func (_e *BuildingRepository_mock_Expecter) Query(_a0 interface{}, _a1 interface{}) *BuildingRepository_mock_Query_Call
Query is a helper method to define mock.On call
- _a0 context.Context
- _a1 Specification
func (*BuildingRepository_mock_Expecter) Remove ¶
func (_e *BuildingRepository_mock_Expecter) Remove(_a0 interface{}, _a1 interface{}) *BuildingRepository_mock_Remove_Call
Remove is a helper method to define mock.On call
- _a0 context.Context
- _a1 Building
func (*BuildingRepository_mock_Expecter) Update ¶
func (_e *BuildingRepository_mock_Expecter) Update(_a0 interface{}, _a1 interface{}) *BuildingRepository_mock_Update_Call
Update is a helper method to define mock.On call
- _a0 context.Context
- _a1 Building
type BuildingRepository_mock_Query_Call ¶
BuildingRepository_mock_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'
func (*BuildingRepository_mock_Query_Call) Return ¶
func (_c *BuildingRepository_mock_Query_Call) Return(_a0 []Building, _a1 error) *BuildingRepository_mock_Query_Call
func (*BuildingRepository_mock_Query_Call) Run ¶
func (_c *BuildingRepository_mock_Query_Call) Run(run func(_a0 context.Context, _a1 Specification)) *BuildingRepository_mock_Query_Call
func (*BuildingRepository_mock_Query_Call) RunAndReturn ¶
func (_c *BuildingRepository_mock_Query_Call) RunAndReturn(run func(context.Context, Specification) ([]Building, error)) *BuildingRepository_mock_Query_Call
type BuildingRepository_mock_Remove_Call ¶
BuildingRepository_mock_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
func (*BuildingRepository_mock_Remove_Call) Return ¶
func (_c *BuildingRepository_mock_Remove_Call) Return(_a0 error) *BuildingRepository_mock_Remove_Call
func (*BuildingRepository_mock_Remove_Call) Run ¶
func (_c *BuildingRepository_mock_Remove_Call) Run(run func(_a0 context.Context, _a1 Building)) *BuildingRepository_mock_Remove_Call
func (*BuildingRepository_mock_Remove_Call) RunAndReturn ¶
func (_c *BuildingRepository_mock_Remove_Call) RunAndReturn(run func(context.Context, Building) error) *BuildingRepository_mock_Remove_Call
type BuildingRepository_mock_Update_Call ¶
BuildingRepository_mock_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
func (*BuildingRepository_mock_Update_Call) Return ¶
func (_c *BuildingRepository_mock_Update_Call) Return(_a0 *Building, _a1 error) *BuildingRepository_mock_Update_Call
func (*BuildingRepository_mock_Update_Call) Run ¶
func (_c *BuildingRepository_mock_Update_Call) Run(run func(_a0 context.Context, _a1 Building)) *BuildingRepository_mock_Update_Call
func (*BuildingRepository_mock_Update_Call) RunAndReturn ¶
func (_c *BuildingRepository_mock_Update_Call) RunAndReturn(run func(context.Context, Building) (*Building, error)) *BuildingRepository_mock_Update_Call
type BuildingSpecificationAll ¶
type BuildingSpecificationAll struct {
// contains filtered or unexported fields
}
type BuildingSpecificationByAddress ¶
type BuildingSpecificationByAddress struct {
// contains filtered or unexported fields
}
type BuildingSpecificationByAlikeAddress ¶
type BuildingSpecificationByAlikeAddress struct {
// contains filtered or unexported fields
}
type BuildingSpecificationByID ¶ added in v1.0.0
type BuildingSpecificationByID struct {
// contains filtered or unexported fields
}
func NewBuildingSpecificationByID ¶ added in v1.0.0
func NewBuildingSpecificationByID(id int64) *BuildingSpecificationByID
type BuildingSpecificationNearest ¶
type BuildingSpecificationNearest struct {
// contains filtered or unexported fields
}
type BuildingStorage ¶
type BuildingStorage struct {
// contains filtered or unexported fields
}
func NewBuildingRepo ¶
func NewBuildingRepo(dbPool *pgxpool.Pool) *BuildingStorage
func (*BuildingStorage) Query ¶
func (b *BuildingStorage) Query( ctx context.Context, spec Specification, ) ([]Building, error)
type Neighbourhood ¶
type Neighbourhood struct { ID int64 Name string Municipality *string Timestamps }
type NeighbourhoodRepository ¶
type NeighbourhoodRepository interface { Add(context.Context, Neighbourhood) (*Neighbourhood, error) Remove(context.Context, Neighbourhood) error Update(context.Context, Neighbourhood) (*Neighbourhood, error) Query(context.Context, Specification) ([]Neighbourhood, error) }
func NewNeighbourhoodRepo ¶
func NewNeighbourhoodRepo(dbPool *pgxpool.Pool) NeighbourhoodRepository
type NeighbourhoodRepository_mock ¶
NeighbourhoodRepository_mock is an autogenerated mock type for the NeighbourhoodRepository type
func NewNeighbourhoodRepository_mock ¶
func NewNeighbourhoodRepository_mock(t interface { mock.TestingT Cleanup(func()) }) *NeighbourhoodRepository_mock
NewNeighbourhoodRepository_mock creates a new instance of NeighbourhoodRepository_mock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*NeighbourhoodRepository_mock) Add ¶
func (_m *NeighbourhoodRepository_mock) Add(_a0 context.Context, _a1 Neighbourhood) (*Neighbourhood, error)
Add provides a mock function with given fields: _a0, _a1
func (*NeighbourhoodRepository_mock) EXPECT ¶
func (_m *NeighbourhoodRepository_mock) EXPECT() *NeighbourhoodRepository_mock_Expecter
func (*NeighbourhoodRepository_mock) Query ¶
func (_m *NeighbourhoodRepository_mock) Query(_a0 context.Context, _a1 Specification) ([]Neighbourhood, error)
Query provides a mock function with given fields: _a0, _a1
func (*NeighbourhoodRepository_mock) Remove ¶
func (_m *NeighbourhoodRepository_mock) Remove(_a0 context.Context, _a1 Neighbourhood) error
Remove provides a mock function with given fields: _a0, _a1
func (*NeighbourhoodRepository_mock) Update ¶
func (_m *NeighbourhoodRepository_mock) Update(_a0 context.Context, _a1 Neighbourhood) (*Neighbourhood, error)
Update provides a mock function with given fields: _a0, _a1
type NeighbourhoodRepository_mock_Add_Call ¶
NeighbourhoodRepository_mock_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
func (*NeighbourhoodRepository_mock_Add_Call) Return ¶
func (_c *NeighbourhoodRepository_mock_Add_Call) Return(_a0 *Neighbourhood, _a1 error) *NeighbourhoodRepository_mock_Add_Call
func (*NeighbourhoodRepository_mock_Add_Call) Run ¶
func (_c *NeighbourhoodRepository_mock_Add_Call) Run(run func(_a0 context.Context, _a1 Neighbourhood)) *NeighbourhoodRepository_mock_Add_Call
func (*NeighbourhoodRepository_mock_Add_Call) RunAndReturn ¶
func (_c *NeighbourhoodRepository_mock_Add_Call) RunAndReturn(run func(context.Context, Neighbourhood) (*Neighbourhood, error)) *NeighbourhoodRepository_mock_Add_Call
type NeighbourhoodRepository_mock_Expecter ¶
type NeighbourhoodRepository_mock_Expecter struct {
// contains filtered or unexported fields
}
func (*NeighbourhoodRepository_mock_Expecter) Add ¶
func (_e *NeighbourhoodRepository_mock_Expecter) Add(_a0 interface{}, _a1 interface{}) *NeighbourhoodRepository_mock_Add_Call
Add is a helper method to define mock.On call
- _a0 context.Context
- _a1 Neighbourhood
func (*NeighbourhoodRepository_mock_Expecter) Query ¶
func (_e *NeighbourhoodRepository_mock_Expecter) Query(_a0 interface{}, _a1 interface{}) *NeighbourhoodRepository_mock_Query_Call
Query is a helper method to define mock.On call
- _a0 context.Context
- _a1 Specification
func (*NeighbourhoodRepository_mock_Expecter) Remove ¶
func (_e *NeighbourhoodRepository_mock_Expecter) Remove(_a0 interface{}, _a1 interface{}) *NeighbourhoodRepository_mock_Remove_Call
Remove is a helper method to define mock.On call
- _a0 context.Context
- _a1 Neighbourhood
func (*NeighbourhoodRepository_mock_Expecter) Update ¶
func (_e *NeighbourhoodRepository_mock_Expecter) Update(_a0 interface{}, _a1 interface{}) *NeighbourhoodRepository_mock_Update_Call
Update is a helper method to define mock.On call
- _a0 context.Context
- _a1 Neighbourhood
type NeighbourhoodRepository_mock_Query_Call ¶
NeighbourhoodRepository_mock_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'
func (*NeighbourhoodRepository_mock_Query_Call) Return ¶
func (_c *NeighbourhoodRepository_mock_Query_Call) Return(_a0 []Neighbourhood, _a1 error) *NeighbourhoodRepository_mock_Query_Call
func (*NeighbourhoodRepository_mock_Query_Call) Run ¶
func (_c *NeighbourhoodRepository_mock_Query_Call) Run(run func(_a0 context.Context, _a1 Specification)) *NeighbourhoodRepository_mock_Query_Call
func (*NeighbourhoodRepository_mock_Query_Call) RunAndReturn ¶
func (_c *NeighbourhoodRepository_mock_Query_Call) RunAndReturn(run func(context.Context, Specification) ([]Neighbourhood, error)) *NeighbourhoodRepository_mock_Query_Call
type NeighbourhoodRepository_mock_Remove_Call ¶
NeighbourhoodRepository_mock_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
func (*NeighbourhoodRepository_mock_Remove_Call) Return ¶
func (_c *NeighbourhoodRepository_mock_Remove_Call) Return(_a0 error) *NeighbourhoodRepository_mock_Remove_Call
func (*NeighbourhoodRepository_mock_Remove_Call) Run ¶
func (_c *NeighbourhoodRepository_mock_Remove_Call) Run(run func(_a0 context.Context, _a1 Neighbourhood)) *NeighbourhoodRepository_mock_Remove_Call
func (*NeighbourhoodRepository_mock_Remove_Call) RunAndReturn ¶
func (_c *NeighbourhoodRepository_mock_Remove_Call) RunAndReturn(run func(context.Context, Neighbourhood) error) *NeighbourhoodRepository_mock_Remove_Call
type NeighbourhoodRepository_mock_Update_Call ¶
NeighbourhoodRepository_mock_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
func (*NeighbourhoodRepository_mock_Update_Call) Return ¶
func (_c *NeighbourhoodRepository_mock_Update_Call) Return(_a0 *Neighbourhood, _a1 error) *NeighbourhoodRepository_mock_Update_Call
func (*NeighbourhoodRepository_mock_Update_Call) Run ¶
func (_c *NeighbourhoodRepository_mock_Update_Call) Run(run func(_a0 context.Context, _a1 Neighbourhood)) *NeighbourhoodRepository_mock_Update_Call
func (*NeighbourhoodRepository_mock_Update_Call) RunAndReturn ¶
func (_c *NeighbourhoodRepository_mock_Update_Call) RunAndReturn(run func(context.Context, Neighbourhood) (*Neighbourhood, error)) *NeighbourhoodRepository_mock_Update_Call
type NeighbourhoodSpecificationAll ¶
type NeighbourhoodSpecificationAll struct {
// contains filtered or unexported fields
}
type NeighbourhoodSpecificationByName ¶
type NeighbourhoodSpecificationByName struct {
// contains filtered or unexported fields
}
type Specification ¶
func NewActorSpecificationAll ¶
func NewActorSpecificationAll(limit, offset int) Specification
func NewActorSpecificationByName ¶
func NewActorSpecificationByName(a Actor) Specification
func NewBuildingSpecificationAll ¶
func NewBuildingSpecificationAll(limit, offset int) Specification
func NewBuildingSpecificationByAddress ¶
func NewBuildingSpecificationByAddress(address string) Specification
func NewBuildingSpecificationByAlikeAddress ¶
func NewBuildingSpecificationByAlikeAddress( prefix string, limit, offset int, ) Specification
func NewBuildingSpecificationNearest ¶
func NewBuildingSpecificationNearest( distanceMeters int, latitude, longitude float64, limit, offset int, ) Specification
func NewNeighbourhoodSpecificationAll ¶
func NewNeighbourhoodSpecificationAll(limit, offset int) Specification
func NewNeighbourhoodSpecificationByName ¶
func NewNeighbourhoodSpecificationByName(n Neighbourhood) Specification
type Timestamps ¶
type UseTableNames ¶
type UseTableNames string
type UseType ¶
type UseType struct { ID int64 NameFi string NameEn string NameRu string Timestamps }
type User ¶ added in v1.0.0
type User struct { ID int64 TelegramID int64 PreferredLanguage string Timestamps }
type UserRepository ¶ added in v1.0.0
type UserRepository_mock ¶ added in v1.0.0
UserRepository_mock is an autogenerated mock type for the UserRepository type
func NewUserRepository_mock ¶ added in v1.0.0
func NewUserRepository_mock(t interface { mock.TestingT Cleanup(func()) }) *UserRepository_mock
NewUserRepository_mock creates a new instance of UserRepository_mock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*UserRepository_mock) Add ¶ added in v1.0.0
Add provides a mock function with given fields: _a0, _a1
func (*UserRepository_mock) AddOrUpdate ¶ added in v1.0.0
AddOrUpdate provides a mock function with given fields: _a0, _a1
func (*UserRepository_mock) EXPECT ¶ added in v1.0.0
func (_m *UserRepository_mock) EXPECT() *UserRepository_mock_Expecter
func (*UserRepository_mock) Query ¶ added in v1.0.0
func (_m *UserRepository_mock) Query(_a0 context.Context, _a1 Specification) ([]User, error)
Query provides a mock function with given fields: _a0, _a1
type UserRepository_mock_AddOrUpdate_Call ¶ added in v1.0.0
UserRepository_mock_AddOrUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddOrUpdate'
func (*UserRepository_mock_AddOrUpdate_Call) Return ¶ added in v1.0.0
func (_c *UserRepository_mock_AddOrUpdate_Call) Return(_a0 *User, _a1 error) *UserRepository_mock_AddOrUpdate_Call
func (*UserRepository_mock_AddOrUpdate_Call) Run ¶ added in v1.0.0
func (_c *UserRepository_mock_AddOrUpdate_Call) Run(run func(_a0 context.Context, _a1 User)) *UserRepository_mock_AddOrUpdate_Call
func (*UserRepository_mock_AddOrUpdate_Call) RunAndReturn ¶ added in v1.0.0
func (_c *UserRepository_mock_AddOrUpdate_Call) RunAndReturn(run func(context.Context, User) (*User, error)) *UserRepository_mock_AddOrUpdate_Call
type UserRepository_mock_Add_Call ¶ added in v1.0.0
UserRepository_mock_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
func (*UserRepository_mock_Add_Call) Return ¶ added in v1.0.0
func (_c *UserRepository_mock_Add_Call) Return(_a0 *User, _a1 error) *UserRepository_mock_Add_Call
func (*UserRepository_mock_Add_Call) Run ¶ added in v1.0.0
func (_c *UserRepository_mock_Add_Call) Run(run func(_a0 context.Context, _a1 User)) *UserRepository_mock_Add_Call
func (*UserRepository_mock_Add_Call) RunAndReturn ¶ added in v1.0.0
func (_c *UserRepository_mock_Add_Call) RunAndReturn(run func(context.Context, User) (*User, error)) *UserRepository_mock_Add_Call
type UserRepository_mock_Expecter ¶ added in v1.0.0
type UserRepository_mock_Expecter struct {
// contains filtered or unexported fields
}
func (*UserRepository_mock_Expecter) Add ¶ added in v1.0.0
func (_e *UserRepository_mock_Expecter) Add(_a0 interface{}, _a1 interface{}) *UserRepository_mock_Add_Call
Add is a helper method to define mock.On call
- _a0 context.Context
- _a1 User
func (*UserRepository_mock_Expecter) AddOrUpdate ¶ added in v1.0.0
func (_e *UserRepository_mock_Expecter) AddOrUpdate(_a0 interface{}, _a1 interface{}) *UserRepository_mock_AddOrUpdate_Call
AddOrUpdate is a helper method to define mock.On call
- _a0 context.Context
- _a1 User
func (*UserRepository_mock_Expecter) Query ¶ added in v1.0.0
func (_e *UserRepository_mock_Expecter) Query(_a0 interface{}, _a1 interface{}) *UserRepository_mock_Query_Call
Query is a helper method to define mock.On call
- _a0 context.Context
- _a1 Specification
func (*UserRepository_mock_Expecter) Remove ¶ added in v1.0.0
func (_e *UserRepository_mock_Expecter) Remove(_a0 interface{}, _a1 interface{}) *UserRepository_mock_Remove_Call
Remove is a helper method to define mock.On call
- _a0 context.Context
- _a1 User
func (*UserRepository_mock_Expecter) Update ¶ added in v1.0.0
func (_e *UserRepository_mock_Expecter) Update(_a0 interface{}, _a1 interface{}) *UserRepository_mock_Update_Call
Update is a helper method to define mock.On call
- _a0 context.Context
- _a1 User
type UserRepository_mock_Query_Call ¶ added in v1.0.0
UserRepository_mock_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'
func (*UserRepository_mock_Query_Call) Return ¶ added in v1.0.0
func (_c *UserRepository_mock_Query_Call) Return(_a0 []User, _a1 error) *UserRepository_mock_Query_Call
func (*UserRepository_mock_Query_Call) Run ¶ added in v1.0.0
func (_c *UserRepository_mock_Query_Call) Run(run func(_a0 context.Context, _a1 Specification)) *UserRepository_mock_Query_Call
func (*UserRepository_mock_Query_Call) RunAndReturn ¶ added in v1.0.0
func (_c *UserRepository_mock_Query_Call) RunAndReturn(run func(context.Context, Specification) ([]User, error)) *UserRepository_mock_Query_Call
type UserRepository_mock_Remove_Call ¶ added in v1.0.0
UserRepository_mock_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
func (*UserRepository_mock_Remove_Call) Return ¶ added in v1.0.0
func (_c *UserRepository_mock_Remove_Call) Return(_a0 error) *UserRepository_mock_Remove_Call
func (*UserRepository_mock_Remove_Call) Run ¶ added in v1.0.0
func (_c *UserRepository_mock_Remove_Call) Run(run func(_a0 context.Context, _a1 User)) *UserRepository_mock_Remove_Call
func (*UserRepository_mock_Remove_Call) RunAndReturn ¶ added in v1.0.0
func (_c *UserRepository_mock_Remove_Call) RunAndReturn(run func(context.Context, User) error) *UserRepository_mock_Remove_Call
type UserRepository_mock_Update_Call ¶ added in v1.0.0
UserRepository_mock_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
func (*UserRepository_mock_Update_Call) Return ¶ added in v1.0.0
func (_c *UserRepository_mock_Update_Call) Return(_a0 *User, _a1 error) *UserRepository_mock_Update_Call
func (*UserRepository_mock_Update_Call) Run ¶ added in v1.0.0
func (_c *UserRepository_mock_Update_Call) Run(run func(_a0 context.Context, _a1 User)) *UserRepository_mock_Update_Call
func (*UserRepository_mock_Update_Call) RunAndReturn ¶ added in v1.0.0
func (_c *UserRepository_mock_Update_Call) RunAndReturn(run func(context.Context, User) (*User, error)) *UserRepository_mock_Update_Call
type UserSpecificationByTelegramID ¶ added in v1.0.0
type UserSpecificationByTelegramID struct {
// contains filtered or unexported fields
}
func NewUserSpecificationByID ¶ added in v1.0.0
func NewUserSpecificationByID(telegramID int64) *UserSpecificationByTelegramID