Documentation
¶
Index ¶
- Constants
- Variables
- func Avg(vars ...float64) float64
- func ChunkInt64s(ints []int64, n int) (chunks [][]int64)
- func ChunkInts(ints []int, n int) (chunks [][]int)
- func ChunkStrings(strings []string, n int) (chunks [][]string)
- func Close(closer io.Closer)
- func Delete(link string, timeout time.Duration, headers http.Header) (b []byte, code int, err error)
- func Filter(ss []string, filter func(string) bool) (ret []string)
- func FindArticleImage(body string) string
- func FirstInts(slice []int, x int) []int
- func FlattenMap(m map[string]interface{}) map[string]interface{}
- func FloatToString(f float64, decimals int) string
- func FormatJSON(unformatted string) (formatted string, err error)
- func Get(link string, timeout time.Duration, headers http.Header) (b []byte, code int, err error)
- func GetAchievementCompleted(f float64) string
- func GetAchievementIcon(appID int, icon string) string
- func GetAppArticleFeedName(id, name string) string
- func GetAppCommunityLink(appID int) string
- func GetAppFollowers(groupID string, followers int) string
- func GetAppHeaderImage(appID int) string
- func GetAppIcon(id int, icon string) string
- func GetAppIconAbsolute(id int, icon string) string
- func GetAppName(id int, name string) string
- func GetAppPath(id int, name string) string
- func GetAppPathAbsolute(id int, name string) string
- func GetAppPlayLink(appID int) template.URL
- func GetAppReleaseDateNice(releaseDateOriginal int64, releaseDateSteam int64, releaseDate string) string
- func GetAppReleaseState(state string) (ret string)
- func GetAppReviewScore(score float64) string
- func GetAppStoreLink(appID int) string
- func GetAppType(appType string) (ret string)
- func GetArticleBody(body string) template.HTML
- func GetArticleIcon(articleIcon string, appID int, appIcon string) string
- func GetBadgeIcon(icon string, appID int, badgeID int) string
- func GetBadgeName(badgeName string, uniqueID int) string
- func GetBadgePath(badgeName string, appID int, badgeID int, foil bool) string
- func GetBadgeUniqueID(appID int, badgeID int) int
- func GetBundleName(id int, name string) string
- func GetBundlePath(id int, name string) string
- func GetBundlePricesFormatted(prices map[steamapi.ProductCC]int) (ret map[steamapi.ProductCC]string)
- func GetBundleStoreLink(id int) string
- func GetDaysToRelease(unix int64) string
- func GetGroupAbbreviation(name string) string
- func GetGroupIcon(icon string) string
- func GetGroupLink(typex string, url string) string
- func GetGroupName(id string, name string) string
- func GetGroupPath(id string, name string) string
- func GetGroupPathAbsolute(id string, name string) string
- func GetGroupType(typex string) string
- func GetHashTag(string string) (ret string)
- func GetIP() string
- func GetPackageName(id int, name string) string
- func GetPackagePath(id int, name string) string
- func GetPlayerAvatar(avatar string) string
- func GetPlayerAvatar2(level int) string
- func GetPlayerAvatarAbsolute(avatar string) string
- func GetPlayerCommunityLink(playerID int64) string
- func GetPlayerFlagPath(code string) string
- func GetPlayerMaxFriends(level int) (ret int)
- func GetPlayerName(id int64, name string) string
- func GetPlayerPath(id int64, name string) string
- func GetPlayerPathAbsolute(id int64, name string) string
- func GetReleaseDateUnix(date string) int64
- func GetStatPath(p string, id int, name string) string
- func GetTimeLong(minutes int, max int) (ret string)
- func GetTimeShort(minutes int, max int) (ret string)
- func GetTrendValue(i float64) string
- func Head(link string, timeout time.Duration) (code int, err error)
- func IgnoreErrors(err error, errs ...error) error
- func Int32sToInts(s []int32) (o []int)
- func IntSliceToStringSlice(in []int) (ret []string)
- func IntsToInt32s(s []int) (o []int32)
- func IsBadgeEvent(appID int) bool
- func IsBadgeGame(appID int) bool
- func IsBadgeSpecial(appID int) bool
- func IsBot(userAgent string) bool
- func IsGroupOfficial(typex string) bool
- func IsJSON(str string) bool
- func IsValidAppID(id int) bool
- func IsValidGroupID(id string) (string, error)
- func IsValidPackageID(id int) bool
- func IsValidPlayerID(id int64) (int64, error)
- func JoinInt64s(i []int64, sep string) string
- func JoinInts(i []int, sep string) string
- func KeepAlive(callbacks ...func())
- func MD5(b []byte) string
- func MD5Interface(i interface{}) string
- func MarshalUnmarshal(in interface{}, out interface{}) (err error)
- func Max(vars ...float64) float64
- func Min(vars ...float64) float64
- func OrdinalComma(i int) string
- func OutputBundleForJSON(bundle Bundle) []interface{}
- func PercentageChange(old, new int) (delta float64)
- func Post(link string, data url.Values, headers http.Header) (b []byte, code int, err error)
- func RandString(n int, chars string) string
- func RenderHTMLAndBBCode(in string) template.HTML
- func RoundFloatTo1DP(f float64) float64
- func RoundFloatTo2DP(f float64) float64
- func RoundIntTo2DP(i int) float64
- func RoundTo(x, unit float64) float64
- func ShortHandNumber(i int64) string
- func ShuffleInt64s(slice []int64) []int64
- func SliceHasInt(slice []int, i int) bool
- func SliceHasInt64(slice []int64, i int64) bool
- func SliceHasString(i string, slice []string) bool
- func StringPointer(s string) *string
- func StringSliceToInt64Slice(in []string) (ret []int64)
- func StringSliceToIntSlice(in []string) (ret []int)
- func StringToInt(s string) int
- func StringToSlice(s string, glue string) (ret []string)
- func StringsToInterfaces(s []string) (o []interface{})
- func TruncateString(str string, size int, tail string) string
- func UniqueInt(arg []int) []int
- func UniqueInt64(arg []int64) []int64
- func UniqueString(strings []string) []string
- func Unmarshal(data []byte, v interface{}) (err error)
- func UnmarshalStrict(data []byte, v interface{}) error
- type AppImage
- type AppReview
- type AppReviewSummary
- type AppStat
- type AppSteamSpy
- type AppVideo
- type Bits
- type BuiltInbadge
- type Bundle
- type ProductInterface
- type ProductPrice
- func (p ProductPrice) GetCountryName(code steamapi.ProductCC) string
- func (p ProductPrice) GetDiscountPercent() string
- func (p ProductPrice) GetFinal() string
- func (p ProductPrice) GetFlag(code steamapi.ProductCC) string
- func (p ProductPrice) GetIndividual() string
- func (p ProductPrice) GetInitial() string
- type ProductPrices
- func (p *ProductPrices) AddPriceFromApp(code steamapi.ProductCC, prices steamapi.AppDetails)
- func (p *ProductPrices) AddPriceFromPackage(code steamapi.ProductCC, prices steamapi.PackageDetailsBody)
- func (p ProductPrices) Get(code steamapi.ProductCC) (price ProductPrice)
- func (p ProductPrices) Map() (prices map[steamapi.ProductCC]int)
- func (p ProductPrices) MapDiscountedFormatted() (prices map[steamapi.ProductCC]string)
- func (p ProductPrices) MapFormatted() (prices map[steamapi.ProductCC]string)
- type ProductType
- type RankMetric
- type SystemRequirement
- type Tuple
- type TupleInt
- type TupleStringInt
Constants ¶
View Source
const ( AppIconBase = "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/apps/" // Also the base for achievements DefaultAppIcon = "/assets/img/no-app-image-square.jpg" )
View Source
const ( AvatarBase = "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/" GroupTypeGame = "game" GroupTypeGroup = "group" )
View Source
const ( Date = "02 Jan" DateTime = "02 Jan 15:04" DateYear = "02 Jan 2006" DateYearTime = "02 Jan 06 15:04" DateSQL = "2006-01-02 15:04:05" DateSQLMinute = "2006-01-02 15:04" DateSQLDay = "2006-01-02" )
View Source
const (
DefaultPlayerAvatar = "/assets/img/no-player-image.jpg"
)
View Source
const Letters = "abcdefghijklmnopqrstuvwxyz"
View Source
const LettersCaps = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
View Source
const Numbers = "0123456789"
Variables ¶
View Source
var ( RegexAlpha = regexp.MustCompile(`[a-zA-Z]+`) RegexInts = regexp.MustCompile(`[0-9]+`) RegexIntsCommas = regexp.MustCompile(`[0-9,]+`) RegexIntsOnly = regexp.MustCompile(`^[0-9]+$`) RegexMD5Only = regexp.MustCompile(`^[a-f0-9]{32}$`) RegexSha1 = regexp.MustCompile(`[a-f0-9]{40}`) RegexSha1Only = regexp.MustCompile(`^[a-f0-9]{40}$`) RegexTimestamps = regexp.MustCompile(`1[0-9]{9}`) RegexNonInts = regexp.MustCompile(`[^0-9]+`) RegexNonNumbers = regexp.MustCompile(`[^0-9-]+`) RegexNonAlphaNumeric = regexp.MustCompile(`[^a-zA-Z0-9]+`) RegexNonAlphaNumericSpace = regexp.MustCompile(`[^a-zA-Z0-9 ]+`) RegexNewLines = regexp.MustCompile(`[\n\r]{3,}`) RegexNewLine = regexp.MustCompile(`[\n\r]`) RegexSpaces = regexp.MustCompile(`[\s]`) RegexSpacesStartEnd = regexp.MustCompile(`^[\s\n\r]+|[\s\n\r]+$`) RegexFilterEmptyCharacters = regexp.MustCompile(`[\p{Cf}\p{Co}\p{Cs}\p{Cc}\p{C}\p{Braille}]`) RegexSmallRomanOnly = regexp.MustCompile(`^[IVX]+$`) RegexYouTubeID = regexp.MustCompile(`[a-zA-Z0-9_\-]{11}`) RegexIP = regexp.MustCompile(`(?:[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})`) RegexOrdinals = regexp.MustCompile(`[0-9]st|[0-9]nd|[0-9]rd|[0-9]th`) )
noinspection GoUnusedGlobalVariable
View Source
var BBCodeCompiler = bbcode.NewCompiler(true, true)
View Source
var BuiltInEventBadges = map[int]BuiltInbadge{
245070: {BadgeID: 1, AppID: 245070, Icon: "30a5de112a3512269cbc3d428fad3b9c507c56ba", Name: "2013: Summer Getaway"},
267420: {BadgeID: 1, AppID: 267420, Icon: "e041163b0c4d5cba61fb54612973612636cdd970", Name: "2013: Holdiay Sale"},
303700: {BadgeID: 1, AppID: 303700, Icon: "b3c3fa2821b32ce6bcc127e5ee3ec47845c35308", Name: "2014: Summer Adventure"},
335590: {BadgeID: 1, AppID: 335590, Icon: "b1c504dfaf4d073e5cf9c2d7d48c55c9cf11b7d3", Name: "2014: Holdiay Sale"},
368020: {BadgeID: 1, AppID: 368020, Icon: "49715c47e076456e0aacec76a5a0d714cadea951", Name: "2015: Monster Summer Sale"},
425280: {BadgeID: 1, AppID: 425280, Icon: "3442d0c36e5d549abf29872c9aec9f6e4364d23f", Name: "2015: Holdiay Sale"},
480730: {BadgeID: 1, AppID: 480730, Icon: "6b1280c07eedafdb3d9cac282f82da4365b9c98d", Name: "2016: Summer Sale"},
566020: {BadgeID: 1, AppID: 566020, Icon: "604be0b040a1117a5b8b5579b3c6ec25e540f458", Name: "2016: Steam Awards"},
639900: {BadgeID: 1, AppID: 639900, Icon: "9dd59323d14eb5dba94328db80e27caaee4c29ea", Name: "2017: Summer Sale"},
762800: {BadgeID: 1, AppID: 762800, Icon: "0a10b3b3725de8f72cb48fd94daff296cc3dfe52", Name: "2017: Steam Awards"},
876740: {BadgeID: 1, AppID: 876740, Icon: "9c677484f7f148045189a9dabe7efdf733e9e1f1", Name: "2018: Intergalactic Summer"},
991980: {BadgeID: 1, AppID: 991980, Icon: "3c96df81a7f82f23b68356c51733793cdece8f63", Name: "2018: Winter Sale"},
1195670: {BadgeID: 1, AppID: 1195670, Icon: "581a14e34100d7f4955ceff9365a7e40a89b57c8", Name: "2019: Winter Sale"},
1263950: {BadgeID: 1, AppID: 1263950, Icon: "24a62a6fa825d6b0a174675fb97a01e9df81d030", Name: "2020: The Debut Collection"},
1343890: {BadgeID: 1, AppID: 1343890, Icon: "89bf983bd41c23c8e4f4e24155e995e770e51070", Name: "2020: Summer Road Trip"},
1465680: {BadgeID: 1, AppID: 1465680, Icon: "64f30989f0794a5437b4b501eb932b2f119616ae", Name: "2020: Winter Sale"},
1492660: {BadgeID: 1, AppID: 1492660, Icon: "526005d8e2862a721f0079c52eb422fa2f293344", Name: "2020: Winter Collection"},
1615900: {BadgeID: 1, AppID: 1615900, Icon: "093e0e79264e9e249cc7a0c24c0151da7c2af379", Name: "2021: Spring Collection"},
}
View Source
var BuiltInSpecialBadges = map[int]BuiltInbadge{
1: {BadgeID: 1, Icon: "02_years/steamyears1_80.png", Name: "Years of Service"},
2: {BadgeID: 2, Icon: "01_community/community03_80.png", Name: "Community Ambassador"},
3: {BadgeID: 3, Icon: "03_potato/potato03_80.png", Name: "The Potato Sack"},
4: {BadgeID: 4, Icon: "04_treasurehunt/treasurehunt03_80.png", Name: "The Great Steam Treasure Hunt"},
5: {BadgeID: 5, Icon: "05_summer2011/tickets80.png", Name: "Steam Summer Camp"},
6: {BadgeID: 6, Icon: "06_winter2011/coal03_80.png", Name: "Steam Holiday Sale 2011"},
7: {BadgeID: 7, Icon: "07_summer2012/Summer2012_stage3_80.png", Name: "Steam Summer Sale 2012"},
8: {BadgeID: 8, Icon: "08_winter2012/winter2012_badge80.png", Name: "Steam Holiday Sale 2012"},
9: {BadgeID: 9, Icon: "09_communitytranslator/translator_level4_80.png", Name: "Steam Community Translator"},
10: {BadgeID: 10, Icon: "generic/CommunityModerator_80.png", Name: "Steam Community Moderator"},
11: {BadgeID: 11, Icon: "generic/ValveEmployee_80.png", Name: "Valve Employee"},
12: {BadgeID: 12, Icon: "generic/GameDeveloper_80.png", Name: "Steamworks Developer"},
13: {BadgeID: 13, Icon: "13_gamecollector/25000_80.png", Name: "Owned Games"},
14: {BadgeID: 14, Icon: "generic/TradingCardBeta_80.png", Name: "Trading Card Beta Tester"},
15: {BadgeID: 15, Icon: "15_hwbeta/hwbeta03_80.png", Name: "Steam Hardware Beta"},
16: {BadgeID: 16, Icon: "16_summer2014/team_red.png", Name: "Steam Summer Adventure 2014 - Red Team"},
17: {BadgeID: 17, Icon: "16_summer2014/team_blue.png", Name: "Steam Summer Adventure 2014 - Blue Team"},
18: {BadgeID: 18, Icon: "16_summer2014/team_pink.png", Name: "Steam Summer Adventure 2014 - Pink Team"},
19: {BadgeID: 19, Icon: "16_summer2014/team_green.png", Name: "Steam Summer Adventure 2014 - Green Team"},
20: {BadgeID: 20, Icon: "16_summer2014/team_purple.png", Name: "Steam Summer Adventure 2014 - Purple Team"},
21: {BadgeID: 21, Icon: "21_auction/winner_80.png?v=2", Name: "Auction Participant/Winner"},
22: {BadgeID: 22, Icon: "22_golden/owner_80.png", Name: "2014 Holiday Profile Recipient"},
23: {BadgeID: 23, Icon: "23_towerattack/wormhole.png", Name: "Monster Summer"},
24: {BadgeID: 24, Icon: "24_winter2015_arg_red_herring/red_herring.png", Name: "Red Herring"},
25: {BadgeID: 25, Icon: "25_steamawardnominations/level04_80.png", Name: "Steam Awards Nomination Committee 2016"},
26: {BadgeID: 26, Icon: "26_summer2017_sticker/completionist.png", Name: "Sticker Completionist"},
27: {BadgeID: 27, Icon: "27_steamawardnominations/level04_80.png", Name: "Steam Awards Nomination Committee 2017"},
28: {BadgeID: 28, Icon: "28_springcleaning2018/gold_80.png", Name: "Spring Cleaning Event 2018"},
29: {BadgeID: 29, Icon: "29_salien/6_80.png", Name: "Salien"},
30: {BadgeID: 30, Icon: "generic/RetiredModerator_80.png", Name: "Retired Community Moderator"},
31: {BadgeID: 31, Icon: "30_steamawardnominations/level04_80.png", Name: "Steam Awards Nomination Committee 2018"},
32: {BadgeID: 32, Icon: "generic/ValveEmployee_80.png", Name: "Valve Moderator"},
33: {BadgeID: 33, Icon: "33_cozycottage2018/1000000_80.png", Name: "Winter 2018 Knick-Knack Collector"},
34: {BadgeID: 34, Icon: "34_lny2019/10_80.png", Name: "Lunar New Year 2019"},
35: {BadgeID: 34, Icon: "https://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxH5rd9eDAjcFyv45SRYAFMIcKL_PArgVSL403ulRUWEndVKv8h56EAgQkalZSsuOnegRm1aqed2oStIXlkIHez6aiNe6CkzIAuJcgiLGU8I6kjgz6ux07-Ytsxtc/96fx96f", Name: "Lunar New Year 2019 Golden Profile"},
36: {BadgeID: 36, Icon: "36_springcleaning2019/gold_80x80.png", Name: "Spring Cleaning Event 2019"},
37: {BadgeID: 37, Icon: "37_summer2019/level1000000_80.png", Name: "Steam Grand Prix 2019"},
38: {BadgeID: 38, Icon: "37_summer2019/hare_gold_80.png", Name: "Steam Grand Prix 2019 - Team Hare"},
39: {BadgeID: 39, Icon: "37_summer2019/tortoise_gold_80.png", Name: "Steam Grand Prix 2019 - Team Tortoise"},
40: {BadgeID: 40, Icon: "37_summer2019/corgi_gold_80.png", Name: "Steam Grand Prix 2019 - Team Corgi"},
41: {BadgeID: 41, Icon: "37_summer2019/cockatiel_gold_80.png", Name: "Steam Grand Prix 2019 - Team Cockatiel"},
42: {BadgeID: 42, Icon: "37_summer2019/pig_gold_80.png", Name: "Steam Grand Prix 2019 - Team Pig"},
43: {BadgeID: 43, Icon: "43_steamawardnominations/level04_80.png", Name: "Steam Awards Nomination Committee 2019"},
44: {BadgeID: 44, Icon: "44_winter2019/level15_80.png", Name: "Winter Sale 2019"},
45: {BadgeID: 45, Icon: "45_steamville2019/key_to_city_80.png", Name: "Steamville 2019"},
46: {BadgeID: 46, Icon: "46_lny2020/10_80.png", Name: "Lunar New Year 2020"},
47: {BadgeID: 47, Icon: "47_springcleaning2020/dewey_badge_3.0_80x80.png", Name: "Spring Cleaning Event 2020"},
48: {BadgeID: 48, Icon: "48_communitycontributor/1_80.png", Name: "Community Contributor"},
49: {BadgeID: 49, Icon: "49_communitypatron/1_80.png", Name: "Community Patron"},
50: {BadgeID: 50, Icon: "50_steamawardnominations/level04_80.png", Name: "Steam Award Nominations"},
}
View Source
var ErrInvalidGroupID = errors.New("invalid group id")
View Source
var ErrNon200 = errors.New("server responded with error")
View Source
var ErrUnMarshalNonPointer = errors.New("trying to unmarshal a non-pointer")
View Source
var LastUpdatedQuery = bson.D{ {"community_visibility_state", 3}, {"removed", false}, }
Just here so frontend can use it
View Source
var PlayerRankFields = map[string]RankMetric{ "level": RankKeyLevel, "games_count": RankKeyGames, "badges_count": RankKeyBadges, "badges_foil_count": RankKeyBadgesFoil, "play_time": RankKeyPlaytime, "achievement_count": RankKeyAchievements, "awards_given_points": RankKeyAwardsGiven, "awards_received_points": RankKeyAwardsReceived, }
Mongo col -> Rank key
View Source
var PlayerRankFieldsInflux = map[RankMetric]schemas.PlayerField{ RankKeyLevel: schemas.InfPlayersLevelRank, RankKeyGames: schemas.InfPlayersGamesRank, RankKeyBadges: schemas.InfPlayersBadgesRank, RankKeyBadgesFoil: schemas.InfPlayersBadgesFoilRank, RankKeyPlaytime: schemas.InfPlayersPlaytimeRank, RankKeyAchievements: schemas.InfPlayersAchievementsRank, RankKeyAwardsGiven: schemas.InfPlayersAwardsGivenPointsRank, RankKeyAwardsReceived: schemas.InfPlayersAwardsReceivedPointsRank, }
Rank key -> Influx col
Functions ¶
func ChunkInt64s ¶
func ChunkStrings ¶
func FindArticleImage ¶
func FlattenMap ¶
func FormatJSON ¶
func GetAchievementCompleted ¶
func GetAchievementIcon ¶
func GetAppArticleFeedName ¶
func GetAppCommunityLink ¶
func GetAppFollowers ¶
func GetAppHeaderImage ¶
func GetAppIcon ¶
func GetAppIconAbsolute ¶
func GetAppName ¶
func GetAppPath ¶
func GetAppPathAbsolute ¶
func GetAppPlayLink ¶
func GetAppReleaseDateNice ¶
func GetAppReleaseState ¶
func GetAppReviewScore ¶
func GetAppStoreLink ¶
func GetAppType ¶
func GetArticleBody ¶
func GetBadgeName ¶
func GetBadgeUniqueID ¶
func GetBundleName ¶
func GetBundlePath ¶
func GetBundleStoreLink ¶
func GetDaysToRelease ¶
func GetGroupAbbreviation ¶
func GetGroupIcon ¶
func GetGroupLink ¶
func GetGroupName ¶
func GetGroupPath ¶
func GetGroupPathAbsolute ¶
func GetGroupType ¶
func GetHashTag ¶
func GetPackageName ¶
func GetPackagePath ¶
func GetPlayerAvatarAbsolute ¶
func GetPlayerCommunityLink ¶
Just use ID in case slug has changed
func GetPlayerFlagPath ¶
func GetPlayerMaxFriends ¶
func GetPlayerName ¶
func GetPlayerPath ¶
func GetPlayerPathAbsolute ¶
func GetReleaseDateUnix ¶
func GetTimeLong ¶
func GetTimeShort ¶
func GetTrendValue ¶
func IgnoreErrors ¶
IgnoreErrors returns nil if an error is of one of the provided types, returns the provided error otherwise.
func Int32sToInts ¶
func IntSliceToStringSlice ¶
func IntsToInt32s ¶
func IsBadgeEvent ¶
func IsBadgeGame ¶
func IsGroupOfficial ¶
func IsValidAppID ¶
func IsValidGroupID ¶
func IsValidPackageID ¶
func IsValidPlayerID ¶
func JoinInt64s ¶
func MD5Interface ¶
func MD5Interface(i interface{}) string
func MarshalUnmarshal ¶
func MarshalUnmarshal(in interface{}, out interface{}) (err error)
func OrdinalComma ¶
func OutputBundleForJSON ¶
func OutputBundleForJSON(bundle Bundle) []interface{}
func PercentageChange ¶
func RandString ¶
func RenderHTMLAndBBCode ¶
func RoundFloatTo1DP ¶
func RoundFloatTo2DP ¶
func RoundIntTo2DP ¶
func ShortHandNumber ¶
func ShuffleInt64s ¶
func SliceHasInt ¶
func SliceHasInt64 ¶
func SliceHasString ¶
func StringPointer ¶
func StringSliceToInt64Slice ¶
func StringSliceToIntSlice ¶
func StringToInt ¶
func StringToSlice ¶
func StringsToInterfaces ¶
func StringsToInterfaces(s []string) (o []interface{})
func UniqueInt ¶
todo, keep order by doing https://codereview.stackexchange.com/questions/191238/return-unique-items-in-a-go-slice
func UniqueInt64 ¶
func UniqueString ¶
func UnmarshalStrict ¶
Types ¶
type AppReview ¶
type AppReviewSummary ¶
func (AppReviewSummary) GetNegativePercent ¶
func (r AppReviewSummary) GetNegativePercent() float64
func (AppReviewSummary) GetPositivePercent ¶
func (r AppReviewSummary) GetPositivePercent() float64
func (AppReviewSummary) GetTotal ¶
func (r AppReviewSummary) GetTotal() int
type AppSteamSpy ¶
type AppSteamSpy struct { SSAveragePlaytimeTwoWeeks int `json:"aw"` SSAveragePlaytimeForever int `json:"af"` SSMedianPlaytimeTwoWeeks int `json:"mw"` SSMedianPlaytimeForever int `json:"mf"` SSOwnersLow int `json:"ol"` SSOwnersHigh int `json:"oh"` }
func (AppSteamSpy) GetSSAveragePlaytimeForever ¶
func (ss AppSteamSpy) GetSSAveragePlaytimeForever() float64
func (AppSteamSpy) GetSSAveragePlaytimeTwoWeeks ¶
func (ss AppSteamSpy) GetSSAveragePlaytimeTwoWeeks() float64
func (AppSteamSpy) GetSSMedianPlaytimeForever ¶
func (ss AppSteamSpy) GetSSMedianPlaytimeForever() float64
func (AppSteamSpy) GetSSMedianPlaytimeTwoWeeks ¶
func (ss AppSteamSpy) GetSSMedianPlaytimeTwoWeeks() float64
type AppVideo ¶
type BuiltInbadge ¶
func (BuiltInbadge) GetIcon ¶
func (badge BuiltInbadge) GetIcon() string
func (BuiltInbadge) GetName ¶
func (badge BuiltInbadge) GetName() string
func (BuiltInbadge) GetPath ¶
func (badge BuiltInbadge) GetPath(foil bool) string
func (BuiltInbadge) ID ¶
func (badge BuiltInbadge) ID() int
func (BuiltInbadge) IsSpecial ¶
func (badge BuiltInbadge) IsSpecial() bool
type Bundle ¶
type Bundle interface { OutputForJSON() (output []interface{}) GetName() string GetPath() string GetStoreLink() string GetID() int GetUpdated() time.Time GetCreated() time.Time GetDiscount() int GetDiscountSale() int GetDiscountHighest() int GetPrices() map[steamapi.ProductCC]int GetPricesFormatted() map[steamapi.ProductCC]string GetPricesSaleFormatted() map[steamapi.ProductCC]string GetScore() float64 GetType() string GetApps() int GetPackages() int IsGiftable() bool }
type ProductInterface ¶
type ProductInterface interface { GetID() int GetProductType() ProductType GetName() string GetIcon() string GetPrices() (prices ProductPrices) GetPath() string GetType() string }
type ProductPrice ¶
type ProductPrice struct { Exists bool `json:"-" bson:"-"` Currency steamapi.CurrencyCode `json:"currency"` Initial int `json:"initial"` Final int `json:"final"` DiscountPercent int `json:"discount_percent"` Individual int `json:"individual"` Free bool `json:"free"` }
func (ProductPrice) GetCountryName ¶
func (p ProductPrice) GetCountryName(code steamapi.ProductCC) string
func (ProductPrice) GetDiscountPercent ¶
func (p ProductPrice) GetDiscountPercent() string
func (ProductPrice) GetFinal ¶
func (p ProductPrice) GetFinal() string
func (ProductPrice) GetIndividual ¶
func (p ProductPrice) GetIndividual() string
func (ProductPrice) GetInitial ¶
func (p ProductPrice) GetInitial() string
type ProductPrices ¶
type ProductPrices map[steamapi.ProductCC]ProductPrice
func (*ProductPrices) AddPriceFromApp ¶
func (p *ProductPrices) AddPriceFromApp(code steamapi.ProductCC, prices steamapi.AppDetails)
func (*ProductPrices) AddPriceFromPackage ¶
func (p *ProductPrices) AddPriceFromPackage(code steamapi.ProductCC, prices steamapi.PackageDetailsBody)
func (ProductPrices) Get ¶
func (p ProductPrices) Get(code steamapi.ProductCC) (price ProductPrice)
func (ProductPrices) MapDiscountedFormatted ¶
func (p ProductPrices) MapDiscountedFormatted() (prices map[steamapi.ProductCC]string)
func (ProductPrices) MapFormatted ¶
func (p ProductPrices) MapFormatted() (prices map[steamapi.ProductCC]string)
type ProductType ¶
type ProductType uint8
const ( ProductTypeApp ProductType = iota ProductTypePackage )
func (ProductType) String ¶
func (pt ProductType) String() string
type RankMetric ¶
type RankMetric string
const ( RankKeyLevel RankMetric = "l" RankKeyBadges RankMetric = "b" RankKeyBadgesFoil RankMetric = "d" RankKeyGames RankMetric = "g" RankKeyPlaytime RankMetric = "p" RankKeyAchievements RankMetric = "a" RankKeyAwardsGiven RankMetric = "c" RankKeyAwardsReceived RankMetric = "e" )
Must be single character
func (RankMetric) Letter ¶
func (rk RankMetric) Letter() string
func (RankMetric) String ¶
func (rk RankMetric) String() string
type SystemRequirement ¶
func (SystemRequirement) Format ¶
func (sr SystemRequirement) Format() template.HTML
type TupleStringInt ¶
Click to show internal directories.
Click to hide internal directories.