Documentation ¶
Index ¶
- Variables
- func CreateLeaderboardClient(host string, sSetting sfx.SecuritySettingsParams) (leaderboard.LeaderboardServiceClient, error)
- func CreateLeaderboardPrivateClient(host string, sSetting sfx.SecuritySettingsParams) (leaderboard.LeaderboardPrivateServiceClient, error)
- type LeaderboardClientParams
- type LeaderboardClientPrivateParams
- type LeaderboardClientPrivateResult
- type LeaderboardClientResult
- type LeaderboardSettingParams
- type LeaderboardSettingResult
Constants ¶
This section is empty.
Variables ¶
View Source
var LeaderboardClientModule = fx.Provide( func( setting LeaderboardSettingParams, sSetting sfx.SecuritySettingsParams, ) (out LeaderboardClientResult, err error) { if cli, e := CreateLeaderboardClient(setting.Url, sSetting); e != nil { err = e } else { out.Client = cli } return }, )
View Source
var LeaderboardClientPrivateModule = fx.Provide( func( setting LeaderboardSettingParams, sSetting sfx.SecuritySettingsParams, ) (out LeaderboardClientPrivateResult, err error) { if cli, e := CreateLeaderboardPrivateClient(setting.Url, sSetting); e != nil { err = e } else { out.Client = cli } return }, )
View Source
var LeaderboardSettingModule = fx.Provide( func() (out LeaderboardSettingResult, err error) { err = out.LoadFromEnv() return })
Functions ¶
func CreateLeaderboardClient ¶
func CreateLeaderboardClient(host string, sSetting sfx.SecuritySettingsParams) (leaderboard.LeaderboardServiceClient, error)
func CreateLeaderboardPrivateClient ¶
func CreateLeaderboardPrivateClient(host string, sSetting sfx.SecuritySettingsParams) (leaderboard.LeaderboardPrivateServiceClient, error)
Types ¶
type LeaderboardClientParams ¶
type LeaderboardClientParams struct { fx.In Client leaderboard.LeaderboardServiceClient `name:"LeaderboardClient"` }
type LeaderboardClientPrivateParams ¶
type LeaderboardClientPrivateParams struct { fx.In Client leaderboard.LeaderboardPrivateServiceClient `name:"LeaderboardClientPrivate"` }
type LeaderboardClientPrivateResult ¶
type LeaderboardClientPrivateResult struct { fx.Out Client leaderboard.LeaderboardPrivateServiceClient `name:"LeaderboardClientPrivate"` }
type LeaderboardClientResult ¶
type LeaderboardClientResult struct { fx.Out Client leaderboard.LeaderboardServiceClient `name:"LeaderboardClient"` }
type LeaderboardSettingParams ¶
type LeaderboardSettingParams struct { fx.In Url string `name:"leaderboardUrl"` // leaderboard expired time in days Expire int64 `name:"leaderboardExpire"` // leaderboard max number MaxNum int32 `name:"leaderboardMaxNum"` // can star the leaderboard rank StarRank int32 `name:"leaderboardStarRank"` }
type LeaderboardSettingResult ¶
type LeaderboardSettingResult struct { fx.Out Url string `name:"leaderboardUrl" envconfig:"LEADERBOARD_URL" default:"localhost:8081"` // Expire is the expired time of the leaderboard in days Expire int64 `name:"leaderboardExpire" envconfig:"LEADERBOARD_EXPIRE" default:"30"` // MaxNum is the max number of the leaderboard MaxNum int32 `name:"leaderboardMaxNum" envconfig:"LEADERBOARD_MAX_NUM" default:"5000"` // StarRank is the rank that can be starred StarRank int32 `name:"leaderboardStarRank" envconfig:"LEADERBOARD_STAR_RANK" default:"3"` }
func (*LeaderboardSettingResult) LoadFromEnv ¶
func (g *LeaderboardSettingResult) LoadFromEnv() (err error)
Click to show internal directories.
Click to hide internal directories.