Documentation ¶
Index ¶
- type BuildingRepoCommand
- type BuildingRepoQuery
- type BuildingRepository
- type FriendRepository
- type LocationRepo
- type MemberRepository
- type MemberRepositoryCommand
- type MemberRepositoryQuery
- type MySQLLocationRepository
- func (r *MySQLLocationRepository) CreateMemberBuilding(ctx context.Context, memberId, buildingId string) error
- func (r *MySQLLocationRepository) DeleteBuilding(ctx context.Context, memberId, buildingId string) error
- func (r *MySQLLocationRepository) GetAllBuildings(ctx context.Context) ([]ent.BuildingQuery, error)
- func (r *MySQLLocationRepository) GetBuildingsByMemberId(ctx context.Context, memberId string) ([]ent.BuildingQuery, error)
- func (r *MySQLLocationRepository) GetMembersByRoomId(ctx context.Context, roomId string) ([]ent.Member, error)
- func (r *MySQLLocationRepository) GetRoomsByBuildingId(ctx context.Context, buildingId string) ([]ent.RoomQuery, error)
- func (r *MySQLLocationRepository) GetRoomsByMemberId(ctx context.Context, memberId string) ([]ent.RoomQuery, error)
- type PostgresLocationRepository
- func (r *PostgresLocationRepository) CreateBuilding(ctx context.Context, name, ownerID string) error
- func (r *PostgresLocationRepository) CreateFriend(ctx context.Context, member1Id, member2Id string) error
- func (r *PostgresLocationRepository) CreateMemberBuilding(ctx context.Context, memberName, userID, buildingId string) error
- func (r *PostgresLocationRepository) DeleteBuilding(ctx context.Context, memberId, buildingId string) error
- func (r *PostgresLocationRepository) EditMemberBuilding(ctx context.Context, memberID, buildingID string) error
- func (r *PostgresLocationRepository) EditMemberName(ctx context.Context, memberID string, memberName string) error
- func (r *PostgresLocationRepository) GetAllBuildings(ctx context.Context) ([]ent.BuildingQuery, error)
- func (r *PostgresLocationRepository) GetBuildingByID(ctx context.Context, buildingID string) (ent.BuildingQuery, error)
- func (r *PostgresLocationRepository) GetFriendsByUserId(ctx context.Context, userId string) ([]ent.MemberQuery, error)
- func (r *PostgresLocationRepository) GetInvitationByUserID(ctx context.Context, userID string) ([]ent.BuildingMemberQuery, error)
- func (r *PostgresLocationRepository) GetListBuildingByUserID(ctx context.Context, userID string) ([]ent.BuildingMemberQuery, error)
- func (r *PostgresLocationRepository) GetListMemberByBuildingID(ctx context.Context, buildingID string) ([]ent.MemberQuery, error)
- func (r *PostgresLocationRepository) GetListMyOwnedBuilding(ctx context.Context, userID string) ([]ent.BuildingQuery, error)
- func (r *PostgresLocationRepository) GetMemberBuildingExist(ctx context.Context, userID, buildingID string) (bool, error)
- func (r *PostgresLocationRepository) GetMemberByID(ctx context.Context, memberID string) (ent.MemberQuery, error)
- func (r *PostgresLocationRepository) GetMemberByName(ctx context.Context, memberName string) (ent.MemberQuery, error)
- func (r *PostgresLocationRepository) GetMembersByRoomId(ctx context.Context, roomId string) ([]ent.Member, error)
- func (r *PostgresLocationRepository) GetNumberOfBuildingOwned(ctx context.Context, ownerID string) (int64, error)
- func (r *PostgresLocationRepository) GetRoomsByBuildingId(ctx context.Context, buildingId string) ([]ent.RoomQuery, error)
- func (r *PostgresLocationRepository) GetRoomsByMemberId(ctx context.Context, memberId string) ([]ent.RoomQuery, error)
- type RoomRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildingRepoCommand ¶
type BuildingRepoCommand interface { CreateBuilding( ctx context.Context, name, owner_id string, ) error CreateMemberBuilding( ctx context.Context, memberName, userID, buildingId string, ) error EditMemberBuilding( ctx context.Context, memberID, buildingID string, ) error DeleteBuilding( ctx context.Context, buildingId, memberId string, ) error }
type BuildingRepoQuery ¶
type BuildingRepoQuery interface { GetBuildingByID( ctx context.Context, buildingID string, ) (ent.BuildingQuery, error) GetAllBuildings( ctx context.Context, ) ([]ent.BuildingQuery, error) GetMemberBuildingExist( ctx context.Context, userID, buildingID string, ) (bool, error) GetInvitationByUserID( ctx context.Context, userID string, ) ([]ent.BuildingMemberQuery, error) GetListMyOwnedBuilding( ctx context.Context, userID string, ) ([]ent.BuildingQuery, error) GetListBuildingByUserID( ctx context.Context, userID string, ) ([]ent.BuildingMemberQuery, error) GetListMemberByBuildingID( ctx context.Context, buildingID string, ) ([]ent.MemberQuery, error) GetNumberOfBuildingOwned( ctx context.Context, ownerID string, ) (int64, error) }
type BuildingRepository ¶
type BuildingRepository interface { BuildingRepoCommand BuildingRepoQuery }
type FriendRepository ¶
type LocationRepo ¶
type LocationRepo interface { BuildingRepository MemberRepository RoomRepository FriendRepository }
type MemberRepository ¶
type MemberRepository interface { MemberRepositoryCommand MemberRepositoryQuery }
type MemberRepositoryCommand ¶
type MemberRepositoryQuery ¶
type MySQLLocationRepository ¶
type MySQLLocationRepository struct { Mysql *mysql.Queries // contains filtered or unexported fields }
func NewMySQLLocationRepository ¶
func NewMySQLLocationRepository( sqlRepo *database.SqlRepository, ) *MySQLLocationRepository
func (*MySQLLocationRepository) CreateMemberBuilding ¶
func (r *MySQLLocationRepository) CreateMemberBuilding( ctx context.Context, memberId, buildingId string, ) error
func (*MySQLLocationRepository) DeleteBuilding ¶
func (r *MySQLLocationRepository) DeleteBuilding( ctx context.Context, memberId, buildingId string, ) error
func (*MySQLLocationRepository) GetAllBuildings ¶
func (r *MySQLLocationRepository) GetAllBuildings( ctx context.Context, ) ([]ent.BuildingQuery, error)
func (*MySQLLocationRepository) GetBuildingsByMemberId ¶
func (r *MySQLLocationRepository) GetBuildingsByMemberId( ctx context.Context, memberId string, ) ([]ent.BuildingQuery, error)
func (*MySQLLocationRepository) GetMembersByRoomId ¶
func (*MySQLLocationRepository) GetRoomsByBuildingId ¶
func (*MySQLLocationRepository) GetRoomsByMemberId ¶
type PostgresLocationRepository ¶
type PostgresLocationRepository struct { Postgres *locationpostgres.Queries // contains filtered or unexported fields }
func NewPostgresLocationRepository ¶
func NewPostgresLocationRepository(postgresRepo *database.SqlRepository) *PostgresLocationRepository
func (*PostgresLocationRepository) CreateBuilding ¶
func (r *PostgresLocationRepository) CreateBuilding( ctx context.Context, name, ownerID string, ) error
func (*PostgresLocationRepository) CreateFriend ¶
func (r *PostgresLocationRepository) CreateFriend( ctx context.Context, member1Id, member2Id string, ) error
func (*PostgresLocationRepository) CreateMemberBuilding ¶
func (r *PostgresLocationRepository) CreateMemberBuilding( ctx context.Context, memberName, userID, buildingId string, ) error
func (*PostgresLocationRepository) DeleteBuilding ¶
func (r *PostgresLocationRepository) DeleteBuilding( ctx context.Context, memberId, buildingId string, ) error
func (*PostgresLocationRepository) EditMemberBuilding ¶
func (r *PostgresLocationRepository) EditMemberBuilding( ctx context.Context, memberID, buildingID string, ) error
func (*PostgresLocationRepository) EditMemberName ¶
func (*PostgresLocationRepository) GetAllBuildings ¶
func (r *PostgresLocationRepository) GetAllBuildings( ctx context.Context, ) ([]ent.BuildingQuery, error)
func (*PostgresLocationRepository) GetBuildingByID ¶
func (r *PostgresLocationRepository) GetBuildingByID( ctx context.Context, buildingID string, ) (ent.BuildingQuery, error)
func (*PostgresLocationRepository) GetFriendsByUserId ¶
func (r *PostgresLocationRepository) GetFriendsByUserId( ctx context.Context, userId string, ) ([]ent.MemberQuery, error)
func (*PostgresLocationRepository) GetInvitationByUserID ¶
func (r *PostgresLocationRepository) GetInvitationByUserID( ctx context.Context, userID string, ) ([]ent.BuildingMemberQuery, error)
func (*PostgresLocationRepository) GetListBuildingByUserID ¶
func (r *PostgresLocationRepository) GetListBuildingByUserID( ctx context.Context, userID string, ) ([]ent.BuildingMemberQuery, error)
func (*PostgresLocationRepository) GetListMemberByBuildingID ¶
func (r *PostgresLocationRepository) GetListMemberByBuildingID( ctx context.Context, buildingID string, ) ([]ent.MemberQuery, error)
func (*PostgresLocationRepository) GetListMyOwnedBuilding ¶
func (r *PostgresLocationRepository) GetListMyOwnedBuilding( ctx context.Context, userID string, ) ([]ent.BuildingQuery, error)
func (*PostgresLocationRepository) GetMemberBuildingExist ¶
func (*PostgresLocationRepository) GetMemberByID ¶
func (r *PostgresLocationRepository) GetMemberByID( ctx context.Context, memberID string, ) (ent.MemberQuery, error)
func (*PostgresLocationRepository) GetMemberByName ¶
func (r *PostgresLocationRepository) GetMemberByName( ctx context.Context, memberName string, ) (ent.MemberQuery, error)
func (*PostgresLocationRepository) GetMembersByRoomId ¶
func (*PostgresLocationRepository) GetNumberOfBuildingOwned ¶
func (*PostgresLocationRepository) GetRoomsByBuildingId ¶
func (*PostgresLocationRepository) GetRoomsByMemberId ¶
type RoomRepository ¶
Click to show internal directories.
Click to hide internal directories.