Documentation ¶
Index ¶
- type FriendInterface
- type FriendService
- func (fr *FriendService) AcceptIncomingFriendRequest(ctx context.Context, playerID string, friendID string) error
- func (fr *FriendService) AddFriend(ctx context.Context, playerID string, friendID string) error
- func (fr *FriendService) FetchFriendStatuses(ctx context.Context, friendList []string) map[string]string
- func (fr *FriendService) FetchFriends(ctx context.Context, friendList []string) ([]*models.FriendDetails, error)
- func (fr *FriendService) FetchFriendsAndInfo(ctx context.Context, friendList []string) ([]*models.FriendDetails, error)
- func (fr *FriendService) RejectIncomingFriendRequest(ctx context.Context, playerID string, friendID string) error
- func (fr *FriendService) RemoveFriend(ctx context.Context, playerID string, friendID string) error
- type PartyInterface
- type PartyService
- func (party *PartyService) CreateParty(ctx context.Context, playerID string) (partyCode string, err error)
- func (party *PartyService) FetchPartyKey(ctx context.Context, partyCode string) (string, error)
- func (party *PartyService) FetchPartyPlayers(ctx context.Context, partyCode string) (partyPlayers []string, err error)
- func (party *PartyService) JoinParty(ctx context.Context, playerID, partyCode string) (err error)
- func (party *PartyService) LeaveParty(ctx context.Context, playerID, partyCode string) (int64, error)
- type PlayerInterface
- type PlayerService
- func (pl *PlayerService) CreateNewPlayer(ctx context.Context, req *ssp.NewPlayer) (string, error)
- func (pl *PlayerService) FetchPlayerInfo(ctx context.Context, playerID string, username string) (*models.Player, error)
- func (pl *PlayerService) PlayerValuesUnique(ctx context.Context, username, email string) (usernameUnique, emailUnique bool)
- func (pl *PlayerService) UpdatePlayerStatusREDIS(ctx context.Context, playerID string, status string, timeout int) error
- func (pl *PlayerService) ValidateNewPlayerRequest(ctx context.Context, req *ssp.NewPlayer) []error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FriendInterface ¶
type FriendInterface interface { FetchFriendsAndInfo(ctx context.Context, friendList []string) ([]*models.FriendDetails, error) AddFriend(ctx context.Context, playerID string, friendID string) error RemoveFriend(ctx context.Context, playerID string, friendID string) error AcceptIncomingFriendRequest(ctx context.Context, playerID string, friendID string) error RejectIncomingFriendRequest(ctx context.Context, playerID string, friendID string) error }
func ReturnFriendService ¶
func ReturnFriendService() (FriendInterface, error)
type FriendService ¶
type FriendService struct { //DBs MongoDAO mongodb.MongoDBClient RedisDAO redis.RedisCacheClient FriendRequestType func(string) int32 }
func (*FriendService) AcceptIncomingFriendRequest ¶
func (*FriendService) FetchFriendStatuses ¶
func (*FriendService) FetchFriends ¶
func (fr *FriendService) FetchFriends(ctx context.Context, friendList []string) ([]*models.FriendDetails, error)
func (*FriendService) FetchFriendsAndInfo ¶
func (fr *FriendService) FetchFriendsAndInfo(ctx context.Context, friendList []string) ([]*models.FriendDetails, error)
func (*FriendService) RejectIncomingFriendRequest ¶
func (*FriendService) RemoveFriend ¶
type PartyInterface ¶
type PartyInterface interface { CreateParty(ctx context.Context, playerID string) (partyCode string, err error) JoinParty(ctx context.Context, playerID, partyCode string) (err error) LeaveParty(ctx context.Context, playerID, partyCode string) (int64, error) FetchPartyKey(ctx context.Context, partyCode string) (string, error) FetchPartyPlayers(ctx context.Context, partyKey string) (partyPlayers []string, err error) }
func ReturnPartyService ¶
func ReturnPartyService() (PartyInterface, error)
type PartyService ¶
type PartyService struct { //DBs RedisDAO redis.RedisCacheClient //PartyID generator function PartyGenerator *shortid.Shortid }
func (*PartyService) CreateParty ¶
func (*PartyService) FetchPartyKey ¶
func (*PartyService) FetchPartyPlayers ¶
func (*PartyService) JoinParty ¶
func (party *PartyService) JoinParty(ctx context.Context, playerID, partyCode string) (err error)
func (*PartyService) LeaveParty ¶
type PlayerInterface ¶
type PlayerInterface interface { ValidateNewPlayerRequest(ctx context.Context, req *ssp.NewPlayer) []error CreateNewPlayer(ctx context.Context, req *ssp.NewPlayer) (string, error) FetchPlayerInfo(ctx context.Context, playerID string, username string) (*models.Player, error) UpdatePlayerStatusREDIS(ctx context.Context, playerID string, status string, timeout int) error }
func ReturnPlayerService ¶
func ReturnPlayerService() (PlayerInterface, error)
type PlayerService ¶
type PlayerService struct { //DBs MongoDAO mongodb.MongoDBClient RedisDAO redis.RedisCacheClient }
func (*PlayerService) CreateNewPlayer ¶
func (*PlayerService) FetchPlayerInfo ¶
func (*PlayerService) PlayerValuesUnique ¶
func (pl *PlayerService) PlayerValuesUnique(ctx context.Context, username, email string) (usernameUnique, emailUnique bool)
func (*PlayerService) UpdatePlayerStatusREDIS ¶
func (*PlayerService) ValidateNewPlayerRequest ¶
Click to show internal directories.
Click to hide internal directories.