Documentation
¶
Index ¶
- func AddMember(ctx context.Context, dbtx db.DBTX, roomID string, userID string) error
- func AddMemberByUsername(ctx context.Context, dbtx db.DBTX, roomID string, username string, ...) error
- func DeleteByCode(ctx context.Context, dbtx db.DBTX, roomCode string) error
- func GetEncryptedRoomTokens(ctx context.Context, dbtx db.DBTX, code string) (accessToken []byte, accessTokenExpiry time.Time, refreshToken []byte, ...)
- func GetGuestName(ctx context.Context, dbtx db.DBTX, roomID string, guestID string) (string, error)
- func GetHostID(ctx context.Context, dbtx db.DBTX, code string) (string, error)
- func MarkTracksAsPlayedSince(ctx context.Context, dbtx db.DBTX, roomID string, since time.Time) error
- func ParametersFromRequest(r *http.Request) (code string, guest_id string, password string)
- func RemoveMember(ctx context.Context, dbtx db.DBTX, roomID string, userID string) error
- func SetIsOpen(ctx context.Context, dbtx db.DBTX, roomID string, isOpen bool) error
- func SetModerator(ctx context.Context, dbtx db.DBTX, roomID string, userID string, ...) error
- func SetQueueTrackGuest(ctx context.Context, dbtx db.DBTX, roomCode string, trackID string, ...) error
- func SetQueueTrackUser(ctx context.Context, dbtx db.DBTX, roomCode string, trackID string, ...) error
- func UpdatePassword(ctx context.Context, dbtx db.DBTX, roomID string, newPassword string) error
- func UpdateSpotifyToken(ctx context.Context, dbtx db.DBTX, code string, oauthToken *oauth2.Token) error
- func UserIsMember(ctx context.Context, dbtx db.DBTX, roomID string, userID string) (bool, error)
- func ValidatePassword(ctx context.Context, dbtx db.DBTX, code string, password string) (bool, error)
- type Guest
- type InsertGuestRequest
- type InsertRoomParams
- type Member
- type QueuedTrack
- type Room
- func GetByCode(ctx context.Context, dbtx db.DBTX, code string) (Room, error)
- func GetUserHostedRooms(ctx context.Context, dbtx db.DBTX, userID string, isOpen bool) ([]Room, error)
- func GetUserJoinedRooms(ctx context.Context, dbtx db.DBTX, userID string, isOpen bool) ([]Room, error)
- func Insert(ctx context.Context, dbtx db.DBTX, insertParams InsertRoomParams) (Room, error)
- type RoomResponse
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMemberByUsername ¶
func GetEncryptedRoomTokens ¶
func GetGuestName ¶
func MarkTracksAsPlayedSince ¶
func ParametersFromRequest ¶
ParametersFromRequest returns the room code from the URL parameter and the guest name / room password from the Basic auth header
func RemoveMember ¶
func SetModerator ¶
func SetQueueTrackGuest ¶
func SetQueueTrackUser ¶
func UpdatePassword ¶
func UpdateSpotifyToken ¶
func UserIsMember ¶
Types ¶
type Guest ¶
type Guest struct { ID string `json:"id"` Name string `json:"name"` QueuedTracks int `json:"queued_tracks"` }
func GetAllRoomGuests ¶
func InsertGuest ¶
type InsertGuestRequest ¶
type InsertGuestRequest struct {
Name string
}
type InsertRoomParams ¶
type Member ¶
type QueuedTrack ¶
func GetQueueTrackAddedBy ¶
type Room ¶
type Room struct { ID string `json:"id"` Code string `json:"code"` Name string `json:"name"` Host user.User `json:"host"` Created time.Time `json:"created"` }
func GetUserHostedRooms ¶
func GetUserJoinedRooms ¶
type RoomResponse ¶
Click to show internal directories.
Click to hide internal directories.