Documentation ¶
Index ¶
- Variables
- func TranslateEmulatorKey(key string) string
- func TranslateKeyboardKey(key string) string
- type AuthUseCase
- type GameMetadata
- type GamingRepo
- type GamingUseCase
- func (uc *GamingUseCase) AddICECandidate(ctx context.Context, roomId, userId int64, candidate string) error
- func (uc *GamingUseCase) DeleteSave(ctx context.Context, roomId, saveId, userId int64) error
- func (uc *GamingUseCase) GetEmulatorSpeed(ctx context.Context, roomId int64) (float64, error)
- func (uc *GamingUseCase) GetGraphicOptions(ctx context.Context, roomId int64) (*GraphicOptions, error)
- func (uc *GamingUseCase) GetServerICECandidate(ctx context.Context, roomId, userId int64) ([]string, error)
- func (uc *GamingUseCase) ListGames(ctx context.Context) ([]*GameMetadata, error)
- func (uc *GamingUseCase) ListSaves(ctx context.Context, roomId int64, page, pageSize int32) ([]*SaveMetadata, int32, error)
- func (uc *GamingUseCase) ListSupportedEmulators(ctx context.Context) ([]*SupportedEmulator, error)
- func (uc *GamingUseCase) LoadSave(ctx context.Context, roomId, saveId int64, userId int64) error
- func (uc *GamingUseCase) OpenGameConnection(ctx context.Context, roomId int64, userId int64, game string) (string, error)
- func (uc *GamingUseCase) RestartEmulator(ctx context.Context, roomId, userId int64, game string) error
- func (uc *GamingUseCase) SDPAnswer(ctx context.Context, roomId, userId int64, sdpAnswer string) error
- func (uc *GamingUseCase) SaveGame(ctx context.Context, roomId, userId int64) error
- func (uc *GamingUseCase) SetController(ctx context.Context, roomId, userId, playerId int64, controller int32) error
- func (uc *GamingUseCase) SetEmulatorSpeed(ctx context.Context, roomId, userId int64, rate float64) (float64, error)
- func (uc *GamingUseCase) SetGraphicOptions(ctx context.Context, roomId, userId int64, options *GraphicOptions) error
- type GraphicOptions
- type JoinedRoom
- type KeyboardBinding
- type LoginClaims
- func (l *LoginClaims) GetAudience() (jwt.ClaimStrings, error)
- func (l *LoginClaims) GetExpirationTime() (*jwt.NumericDate, error)
- func (l *LoginClaims) GetIssuedAt() (*jwt.NumericDate, error)
- func (l *LoginClaims) GetIssuer() (string, error)
- func (l *LoginClaims) GetNotBefore() (*jwt.NumericDate, error)
- func (l *LoginClaims) GetSubject() (string, error)
- type Macro
- type MacroAction
- type MacroRepo
- type MacroUseCase
- func (uc *MacroUseCase) CreateMacro(ctx context.Context, macro *Macro) error
- func (uc *MacroUseCase) DeleteMacro(ctx context.Context, id int64) error
- func (uc *MacroUseCase) GetMacro(ctx context.Context, id int64) (*Macro, error)
- func (uc *MacroUseCase) ListMacro(ctx context.Context, userId int64, page, pageSize int32) ([]*Macro, int32, error)
- type Member
- type Room
- type RoomRepo
- type RoomSession
- type RoomUseCase
- func (uc *RoomUseCase) CreateRoom(ctx context.Context, name string, private bool, userId int64, ...) (*Room, error)
- func (uc *RoomUseCase) DeleteMember(ctx context.Context, roomId, userId int64, operator int64) error
- func (uc *RoomUseCase) DeleteRoom(ctx context.Context, roomId, userId int64) error
- func (uc *RoomUseCase) GetRoom(ctx context.Context, roomId int64) (*Room, error)
- func (uc *RoomUseCase) GetRoomMember(ctx context.Context, roomId, userId int64) (*Member, error)
- func (uc *RoomUseCase) JoinRoom(ctx context.Context, roomId, userId int64, password string) error
- func (uc *RoomUseCase) ListJoinedRooms(ctx context.Context, userId int64, page, pageSize int) ([]*JoinedRoom, int, error)
- func (uc *RoomUseCase) ListMembers(ctx context.Context, roomId int64) ([]*Member, error)
- func (uc *RoomUseCase) ListRooms(ctx context.Context, page, pageSize int) ([]*Room, int, error)
- func (uc *RoomUseCase) UpdateMemberRole(ctx context.Context, roomId, userId int64, role roomAPI.RoomRole, ...) error
- func (uc *RoomUseCase) UpdateRoom(ctx context.Context, room *Room, userId int64) error
- type SaveMetadata
- type SupportedEmulator
- type User
- type UserKeyboardBinding
- type UserKeyboardBindingRepo
- type UserKeyboardBindingUseCase
- func (uc *UserKeyboardBindingUseCase) Create(ctx context.Context, ub *UserKeyboardBinding) error
- func (uc *UserKeyboardBindingUseCase) Delete(ctx context.Context, id, userId int64) error
- func (uc *UserKeyboardBindingUseCase) Get(ctx context.Context, id int64) (*UserKeyboardBinding, error)
- func (uc *UserKeyboardBindingUseCase) List(ctx context.Context, userId int64, page, pageSize int32) ([]*UserKeyboardBinding, int32, error)
- func (uc *UserKeyboardBindingUseCase) Update(ctx context.Context, ub *UserKeyboardBinding) error
- type UserRepo
- type UserUseCase
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewUserUseCase, NewAuthUseCase, NewRoomUseCase, NewGamingUseCase, NewUserKeyboardBindingUseCase, NewMacroUseCase, )
ProviderSet is biz providers.
Functions ¶
func TranslateEmulatorKey ¶
func TranslateKeyboardKey ¶
Types ¶
type AuthUseCase ¶
type AuthUseCase struct {
// contains filtered or unexported fields
}
func NewAuthUseCase ¶
type GameMetadata ¶
type GamingRepo ¶
type GamingRepo interface { ListGames(ctx context.Context) ([]*GameMetadata, error) DeleteMemberConnection(ctx context.Context, roomId, userId int64, endpoint string) error RestartEmulator(ctx context.Context, roomId int64, game string, endpoint string) error ListSaves(ctx context.Context, roomId int64, page, pageSize int32) ([]*SaveMetadata, int32, error) SaveGame(ctx context.Context, roomId int64, endpoint string) error LoadSave(ctx context.Context, roomId, saveId int64, endpoint string) error DeleteSave(ctx context.Context, saveId int64, endpoint string) error GetServerICECandidate(ctx context.Context, roomId, userId int64, endpoint string) ([]string, error) GetGraphicOptions(ctx context.Context, roomId int64, endpoint string) (*GraphicOptions, error) SetGraphicOptions(ctx context.Context, roomId int64, options *GraphicOptions, endpoint string) error SetEmulatorSpeed(ctx context.Context, roomId int64, rate float64, endpoint string) (float64, error) GetEmulatorSpeed(ctx context.Context, roomId int64, endpoint string) (float64, error) ListSupportedEmulators(ctx context.Context) ([]*SupportedEmulator, error) }
type GamingUseCase ¶
type GamingUseCase struct {
// contains filtered or unexported fields
}
func NewGamingUseCase ¶
func NewGamingUseCase(roomRepo RoomRepo, gamingRepo GamingRepo, logger log.Logger) *GamingUseCase
func (*GamingUseCase) AddICECandidate ¶
func (*GamingUseCase) DeleteSave ¶
func (uc *GamingUseCase) DeleteSave(ctx context.Context, roomId, saveId, userId int64) error
func (*GamingUseCase) GetEmulatorSpeed ¶
func (*GamingUseCase) GetGraphicOptions ¶
func (uc *GamingUseCase) GetGraphicOptions(ctx context.Context, roomId int64) (*GraphicOptions, error)
func (*GamingUseCase) GetServerICECandidate ¶
func (*GamingUseCase) ListGames ¶
func (uc *GamingUseCase) ListGames(ctx context.Context) ([]*GameMetadata, error)
func (*GamingUseCase) ListSaves ¶
func (uc *GamingUseCase) ListSaves(ctx context.Context, roomId int64, page, pageSize int32) ([]*SaveMetadata, int32, error)
func (*GamingUseCase) ListSupportedEmulators ¶
func (uc *GamingUseCase) ListSupportedEmulators(ctx context.Context) ([]*SupportedEmulator, error)
func (*GamingUseCase) OpenGameConnection ¶
func (*GamingUseCase) RestartEmulator ¶
func (*GamingUseCase) SaveGame ¶
func (uc *GamingUseCase) SaveGame(ctx context.Context, roomId, userId int64) error
func (*GamingUseCase) SetController ¶
func (*GamingUseCase) SetEmulatorSpeed ¶
func (*GamingUseCase) SetGraphicOptions ¶
func (uc *GamingUseCase) SetGraphicOptions(ctx context.Context, roomId, userId int64, options *GraphicOptions) error
type GraphicOptions ¶
type JoinedRoom ¶
type KeyboardBinding ¶
type LoginClaims ¶
func (*LoginClaims) GetAudience ¶
func (l *LoginClaims) GetAudience() (jwt.ClaimStrings, error)
func (*LoginClaims) GetExpirationTime ¶
func (l *LoginClaims) GetExpirationTime() (*jwt.NumericDate, error)
func (*LoginClaims) GetIssuedAt ¶
func (l *LoginClaims) GetIssuedAt() (*jwt.NumericDate, error)
func (*LoginClaims) GetIssuer ¶
func (l *LoginClaims) GetIssuer() (string, error)
func (*LoginClaims) GetNotBefore ¶
func (l *LoginClaims) GetNotBefore() (*jwt.NumericDate, error)
func (*LoginClaims) GetSubject ¶
func (l *LoginClaims) GetSubject() (string, error)
type Macro ¶
type Macro struct { Id int64 `json:"id" bson:"id"` UserId int64 `json:"userId" bson:"userId"` Name string `json:"name" bson:"name"` KeyboardKey string `json:"keyboardKey" bson:"keyboardKey"` Actions []MacroAction `json:"actions" bson:"actions"` }
type MacroAction ¶
type MacroUseCase ¶
type MacroUseCase struct {
// contains filtered or unexported fields
}
func NewMacroUseCase ¶
func NewMacroUseCase(repo MacroRepo, logger log.Logger) *MacroUseCase
func (*MacroUseCase) CreateMacro ¶
func (uc *MacroUseCase) CreateMacro(ctx context.Context, macro *Macro) error
func (*MacroUseCase) DeleteMacro ¶
func (uc *MacroUseCase) DeleteMacro(ctx context.Context, id int64) error
type Room ¶
type Room struct { Id int64 `json:"id"` Name string `json:"name"` Host int64 `json:"host"` HostName string `json:"hostName"` Private bool `json:"private"` MemberCount int32 `json:"memberCount"` MemberLimit int32 `json:"memberLimit"` Password string `json:"password"` CreateTime time.Time `json:"createTime"` EmulatorType string `json:"emulatorType"` }
type RoomRepo ¶
type RoomRepo interface { GetRoomSession(ctx context.Context, roomId int64) (*RoomSession, error) GetCreateRoomSession(ctx context.Context, roomId, userId int64, selectedGame string) (*RoomSession, error) CreateRoom(ctx context.Context, room *Room) error GetRoom(ctx context.Context, roomId int64) (*Room, error) ListJoinedRooms(ctx context.Context, userId int64, page, pageSize int) ([]*JoinedRoom, int, error) ListRooms(ctx context.Context, page, pageSize int) ([]*Room, int, error) ListMembers(ctx context.Context, roomId int64) ([]*Member, error) JoinRoom(ctx context.Context, roomId, userId int64, password string) error UpdateRoom(ctx context.Context, room *Room, userId int64) error DeleteRoom(ctx context.Context, roomId, userId int64) error GetRoomMember(ctx context.Context, roomId, userId int64) (*Member, error) UpdateMember(ctx context.Context, roomId, userId int64, role roomAPI.RoomRole) error DeleteMember(ctx context.Context, roomId, userId int64) error }
type RoomSession ¶
type RoomUseCase ¶
type RoomUseCase struct {
// contains filtered or unexported fields
}
func NewRoomUseCase ¶
func NewRoomUseCase(repo RoomRepo, ur UserRepo, gr GamingRepo, logger log.Logger) *RoomUseCase
func (*RoomUseCase) CreateRoom ¶
func (*RoomUseCase) DeleteMember ¶
func (*RoomUseCase) DeleteRoom ¶
func (uc *RoomUseCase) DeleteRoom(ctx context.Context, roomId, userId int64) error
func (*RoomUseCase) GetRoomMember ¶
func (*RoomUseCase) ListJoinedRooms ¶
func (uc *RoomUseCase) ListJoinedRooms(ctx context.Context, userId int64, page, pageSize int) ([]*JoinedRoom, int, error)
func (*RoomUseCase) ListMembers ¶
func (*RoomUseCase) UpdateMemberRole ¶
func (*RoomUseCase) UpdateRoom ¶
type SaveMetadata ¶
type SupportedEmulator ¶
type UserKeyboardBinding ¶
type UserKeyboardBinding struct { Id int64 Name string UserId int64 KeyboardBindings []*KeyboardBinding }
type UserKeyboardBindingRepo ¶
type UserKeyboardBindingRepo interface { CreateKeyboardBinding(ctx context.Context, ub *UserKeyboardBinding) error UpdateKeyboardBinding(ctx context.Context, ub *UserKeyboardBinding) error DeleteKeyboardBinding(ctx context.Context, id int64) error GetKeyboardBinding(ctx context.Context, id int64) (*UserKeyboardBinding, error) ListUserKeyboardBinding(ctx context.Context, userId int64, page, pageSize int32) ([]*UserKeyboardBinding, int32, error) }
type UserKeyboardBindingUseCase ¶
type UserKeyboardBindingUseCase struct {
// contains filtered or unexported fields
}
func NewUserKeyboardBindingUseCase ¶
func NewUserKeyboardBindingUseCase(repo UserKeyboardBindingRepo, logger log.Logger) *UserKeyboardBindingUseCase
func (*UserKeyboardBindingUseCase) Create ¶
func (uc *UserKeyboardBindingUseCase) Create(ctx context.Context, ub *UserKeyboardBinding) error
func (*UserKeyboardBindingUseCase) Delete ¶
func (uc *UserKeyboardBindingUseCase) Delete(ctx context.Context, id, userId int64) error
func (*UserKeyboardBindingUseCase) Get ¶
func (uc *UserKeyboardBindingUseCase) Get(ctx context.Context, id int64) (*UserKeyboardBinding, error)
func (*UserKeyboardBindingUseCase) List ¶
func (uc *UserKeyboardBindingUseCase) List(ctx context.Context, userId int64, page, pageSize int32) ([]*UserKeyboardBinding, int32, error)
func (*UserKeyboardBindingUseCase) Update ¶
func (uc *UserKeyboardBindingUseCase) Update(ctx context.Context, ub *UserKeyboardBinding) error
type UserUseCase ¶
type UserUseCase struct {
// contains filtered or unexported fields
}
func NewUserUseCase ¶
func NewUserUseCase(ur UserRepo, logger log.Logger) *UserUseCase
Source Files ¶
Click to show internal directories.
Click to hide internal directories.