guild

package
v0.0.0-...-2200e63 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(token string, timeout time.Duration) *client

Types

type All

type All struct {
	Score int    `json:"score"`
	Color string `json:"color"`
}

type Class

type Class struct {
	World  int `json:"world"`
	Region int `json:"region"`
	Realm  int `json:"realm"`
}

type Config

type Config struct {
	// Client is the configuration for the client.
	Client struct {
		// Token is the token for the client.
		Token string `yaml:"token" mapstructure:"token" validate:"required"`
		// Timeout is the timeout for the client.
		Timeout time.Duration `yaml:"timeout" mapstructure:"timeout" validate:"gte=0"`
	} `yaml:"client" mapstructure:"client"`
}

Config is the configuration for the guild service.

type Gear

type Gear struct {
	ItemLevelEquipped int `json:"item_level_equipped"`
	ItemLevelTotal    int `json:"item_level_total"`
	ArtifactTraits    int `json:"artifact_traits"`
}

type GuildProfile

type GuildProfile struct {
	RaidRankings map[string]RaidRanking `json:"raid_rankings"`
	// contains filtered or unexported fields
}

type MythicPlusRanks

type MythicPlusRanks struct {
	Overall     Class `json:"overall"`
	Tank        Class `json:"tank"`
	Healer      Class `json:"healer"`
	Dps         Class `json:"dps"`
	Class       Class `json:"class"`
	ClassTank   Class `json:"class_tank"`
	ClassHealer Class `json:"class_healer"`
	ClassDps    Class `json:"class_dps"`
}

type MythicPlusRun

type MythicPlusRun struct {
	Dungeon             string    `json:"dungeon"`
	ShortName           string    `json:"short_name"`
	MythicLevel         int       `json:"mythic_level"`
	CompletedAt         time.Time `json:"completed_at"`
	ClearTimeMS         int       `json:"clear_time_ms"`
	NumKeystoneUpgrades int       `json:"num_keystone_upgrades"`
	Score               float64   `json:"score"`
	URL                 string    `json:"url"`
}

type MythicPlusScoresBySeason

type MythicPlusScoresBySeason struct {
	Season   string   `json:"season"`
	Scores   Scores   `json:"scores"`
	Segments Segments `json:"segments"`
}

type Profiles

type Profiles struct {
	UserProfile  *UserProfile  `json:"user_profile,omitempty"`
	GuildProfile *GuildProfile `json:"guild_profile,omitempty"`
}

func (*Profiles) IsGuild

func (p *Profiles) IsGuild() bool

func (*Profiles) IsUser

func (p *Profiles) IsUser() bool

type RaidProgression

type RaidProgression struct {
	Summary            string `json:"summary"`
	TotalBosses        int    `json:"total_bosses"`
	NormalBossesKilled int    `json:"normal_bosses_killed"`
	HeroicBossesKilled int    `json:"heroic_bosses_killed"`
	MythicBossesKilled int    `json:"mythic_bosses_killed"`
}

type RaidRanking

type RaidRanking struct {
	Normal Stats `json:"normal"`
	Heroic Stats `json:"heroic"`
	Mythic Stats `json:"mythic"`
}

type RequestProfile

type RequestProfile struct {
	Type    string
	GuildID snowflake.ID
	User    string
	// contains filtered or unexported fields
}

RequestProfile is the request for the profile.

type Scores

type Scores struct {
	All    int `json:"all"`
	Dps    int `json:"dps"`
	Healer int `json:"healer"`
	Tank   int `json:"tank"`
	Spec0  int `json:"spec_0"`
	Spec1  int `json:"spec_1"`
	Spec2  int `json:"spec_2"`
	Spec3  int `json:"spec_3"`
}

type Segments

type Segments struct {
	All    All `json:"all"`
	Dps    All `json:"dps"`
	Healer All `json:"healer"`
	Tank   All `json:"tank"`
	Spec0  All `json:"spec_0"`
	Spec1  All `json:"spec_1"`
	Spec2  All `json:"spec_2"`
	Spec3  All `json:"spec_3"`
}

type Service

type Service interface {
	// contains filtered or unexported methods
}

Service is the interface for the guild service.

func NewService

func NewService(c *Config, db *sql.DB) Service

NewService creates a new guild service.

type Stats

type Stats struct {
	World  int `json:"world"`
	Region int `json:"region"`
	Realm  int `json:"realm"`
}

type UserProfile

type UserProfile struct {
	Race                     string                     `json:"race"`
	Class                    string                     `json:"class"`
	ActiveSpecName           string                     `json:"active_spec_name"`
	ActiveSpecRole           string                     `json:"active_spec_role"`
	Gender                   string                     `json:"gender"`
	Gear                     Gear                       `json:"gear"`
	MythicPlusScoresBySeason []MythicPlusScoresBySeason `json:"mythic_plus_scores_by_season"`
	MythicPlusRanks          MythicPlusRanks            `json:"mythic_plus_ranks"`
	PreviousMythicPlusRanks  MythicPlusRanks            `json:"previous_mythic_plus_ranks"`
	MythicPlusRecentRuns     []MythicPlusRun            `json:"mythic_plus_recent_runs"`
	MythicPlusBestRuns       []MythicPlusRun            `json:"mythic_plus_best_runs"`
	MythicPlusAlternateRuns  []MythicPlusRun            `json:"mythic_plus_alternate_runs"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL