Documentation
¶
Index ¶
- func New() database.Repository
- type IMGroup
- type IMRoom
- type InMemoryRepository
- func (r *InMemoryRepository) AddGroup(_ context.Context, group *entity.Group) (string, error)
- func (r *InMemoryRepository) AddGroupBan(ctx context.Context, groupID string, attendeeID int64, comments string) error
- func (r *InMemoryRepository) AddGroupMembership(ctx context.Context, gm *entity.GroupMember) error
- func (r *InMemoryRepository) AddRoom(ctx context.Context, room *entity.Room) (string, error)
- func (r *InMemoryRepository) AddRoomMembership(ctx context.Context, rm *entity.RoomMember) error
- func (r *InMemoryRepository) Close(_ context.Context)
- func (r *InMemoryRepository) DeleteGroupByID(_ context.Context, id string) error
- func (r *InMemoryRepository) DeleteGroupMembership(ctx context.Context, attendeeID int64) error
- func (r *InMemoryRepository) DeleteRoomByID(ctx context.Context, id string) error
- func (r *InMemoryRepository) DeleteRoomMembership(ctx context.Context, attendeeID int64) error
- func (r *InMemoryRepository) FindGroups(_ context.Context, name string, minOccupancy uint, maxOccupancy int, ...) ([]string, error)
- func (r *InMemoryRepository) FindRooms(ctx context.Context, name string, minOccupancy uint, maxOccupancy int, ...) ([]string, error)
- func (r *InMemoryRepository) GetGroupByID(_ context.Context, id string) (*entity.Group, error)
- func (r *InMemoryRepository) GetGroupMembersByGroupID(_ context.Context, groupID string) ([]*entity.GroupMember, error)
- func (r *InMemoryRepository) GetGroupMembershipByAttendeeID(_ context.Context, attendeeID int64) (*entity.GroupMember, error)
- func (r *InMemoryRepository) GetGroups(_ context.Context) ([]*entity.Group, error)
- func (r *InMemoryRepository) GetHistoryByID(_ context.Context, id uint) (*entity.History, error)
- func (r *InMemoryRepository) GetRoomByID(ctx context.Context, id string) (*entity.Room, error)
- func (r *InMemoryRepository) GetRoomMembersByRoomID(ctx context.Context, roomID string) ([]*entity.RoomMember, error)
- func (r *InMemoryRepository) GetRoomMembershipByAttendeeID(_ context.Context, attendeeID int64) (*entity.RoomMember, error)
- func (r *InMemoryRepository) GetRooms(ctx context.Context) ([]*entity.Room, error)
- func (r *InMemoryRepository) HasGroupBan(_ context.Context, groupID string, attendeeID int64) (bool, error)
- func (r *InMemoryRepository) Migrate(_ context.Context) error
- func (r *InMemoryRepository) NewEmptyGroupMembership(_ context.Context, groupID string, attendeeID int64, nickname string) *entity.GroupMember
- func (r *InMemoryRepository) NewEmptyRoomMembership(_ context.Context, roomID string, attendeeID int64) *entity.RoomMember
- func (r *InMemoryRepository) Open(_ context.Context) error
- func (r *InMemoryRepository) RecordHistory(_ context.Context, h *entity.History) error
- func (r *InMemoryRepository) RemoveGroupBan(ctx context.Context, groupID string, attendeeID int64) error
- func (r *InMemoryRepository) UpdateGroup(_ context.Context, group *entity.Group) error
- func (r *InMemoryRepository) UpdateGroupMembership(ctx context.Context, gm *entity.GroupMember) error
- func (r *InMemoryRepository) UpdateRoom(ctx context.Context, room *entity.Room) error
- func (r *InMemoryRepository) UpdateRoomMembership(ctx context.Context, rm *entity.RoomMember) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New() database.Repository
Types ¶
type IMRoom ¶
type IMRoom struct { Room entity.Room // intentionally not a pointer so assignment makes a copy Members []entity.RoomMember // intentionally not pointers so assignment makes a copy }
type InMemoryRepository ¶
func (*InMemoryRepository) AddGroupBan ¶
func (*InMemoryRepository) AddGroupMembership ¶
func (r *InMemoryRepository) AddGroupMembership(ctx context.Context, gm *entity.GroupMember) error
func (*InMemoryRepository) AddRoomMembership ¶
func (r *InMemoryRepository) AddRoomMembership(ctx context.Context, rm *entity.RoomMember) error
func (*InMemoryRepository) Close ¶
func (r *InMemoryRepository) Close(_ context.Context)
func (*InMemoryRepository) DeleteGroupByID ¶
func (r *InMemoryRepository) DeleteGroupByID(_ context.Context, id string) error
func (*InMemoryRepository) DeleteGroupMembership ¶
func (r *InMemoryRepository) DeleteGroupMembership(ctx context.Context, attendeeID int64) error
func (*InMemoryRepository) DeleteRoomByID ¶
func (r *InMemoryRepository) DeleteRoomByID(ctx context.Context, id string) error
func (*InMemoryRepository) DeleteRoomMembership ¶
func (r *InMemoryRepository) DeleteRoomMembership(ctx context.Context, attendeeID int64) error
func (*InMemoryRepository) FindGroups ¶
func (*InMemoryRepository) GetGroupByID ¶
func (*InMemoryRepository) GetGroupMembersByGroupID ¶
func (r *InMemoryRepository) GetGroupMembersByGroupID(_ context.Context, groupID string) ([]*entity.GroupMember, error)
func (*InMemoryRepository) GetGroupMembershipByAttendeeID ¶
func (r *InMemoryRepository) GetGroupMembershipByAttendeeID(_ context.Context, attendeeID int64) (*entity.GroupMember, error)
func (*InMemoryRepository) GetHistoryByID ¶
GetHistoryByID is only offered for testing, and only on the in memory db.
func (*InMemoryRepository) GetRoomByID ¶
func (*InMemoryRepository) GetRoomMembersByRoomID ¶
func (r *InMemoryRepository) GetRoomMembersByRoomID(ctx context.Context, roomID string) ([]*entity.RoomMember, error)
func (*InMemoryRepository) GetRoomMembershipByAttendeeID ¶
func (r *InMemoryRepository) GetRoomMembershipByAttendeeID(_ context.Context, attendeeID int64) (*entity.RoomMember, error)
func (*InMemoryRepository) HasGroupBan ¶
func (*InMemoryRepository) NewEmptyGroupMembership ¶
func (r *InMemoryRepository) NewEmptyGroupMembership(_ context.Context, groupID string, attendeeID int64, nickname string) *entity.GroupMember
func (*InMemoryRepository) NewEmptyRoomMembership ¶
func (r *InMemoryRepository) NewEmptyRoomMembership(_ context.Context, roomID string, attendeeID int64) *entity.RoomMember
func (*InMemoryRepository) RecordHistory ¶
func (*InMemoryRepository) RemoveGroupBan ¶
func (*InMemoryRepository) UpdateGroup ¶
func (*InMemoryRepository) UpdateGroupMembership ¶
func (r *InMemoryRepository) UpdateGroupMembership(ctx context.Context, gm *entity.GroupMember) error
func (*InMemoryRepository) UpdateRoom ¶
func (*InMemoryRepository) UpdateRoomMembership ¶
func (r *InMemoryRepository) UpdateRoomMembership(ctx context.Context, rm *entity.RoomMember) error
Click to show internal directories.
Click to hide internal directories.