Skip to content

Commit

Permalink
simplify key types (#667)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulwe authored Mar 25, 2024
1 parent a2f6423 commit a512748
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions livekit/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,17 @@ type RoomID string
type RoomName string
type ConnectionID string
type NodeID string
type ParticipantKey string
type RoomKey struct {
ProjectID string
RoomName RoomName
}
type ParticipantKey struct {
RoomKey
Identity ParticipantIdentity
}

type stringTypes interface {
ParticipantID | RoomID | TrackID | ParticipantIdentity | ParticipantName | RoomName | ConnectionID | NodeID | ParticipantKey
ParticipantID | RoomID | TrackID | ParticipantIdentity | ParticipantName | RoomName | ConnectionID | NodeID
}

func IDsAsStrings[T stringTypes](ids []T) []string {
Expand Down

0 comments on commit a512748

Please sign in to comment.