repository

package
v0.0.0-...-6e8d5b8 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindCardsBuilder

func FindCardsBuilder(cli *mongo.Client) func(context.Context, string, ...string) ([]*Card, error)

func GetLang

func GetLang(cli *mongo.Client) func(ctx context.Context, guild string) (string, error)

func GetTemplate

func GetTemplate(cli *mongo.Client) func(ctx context.Context, guild string) (string, string, error)

func InsertBuilder

func InsertBuilder(cli *mongo.Client) func(context.Context, *SetBundle) error

func SaveLang

func SaveLang(cli *mongo.Client) func(ctx context.Context, guild string, lang string) error

func SaveURLTemplate

func SaveURLTemplate(cli *mongo.Client) func(ctx context.Context, guild string, template string, label string) error

func SearchByNameBuilder

func SearchByNameBuilder(cli *mongo.Client) func(context.Context, string, string) ([]*Card, error)

func UpdateSetBundles

func UpdateSetBundles(ctx context.Context, bundleVersion string, saveFunc func(context.Context, *SetBundle) error) error

Types

type Card

type Card struct {
	CardCode string `json:"cardCode"`

	AssociatedCards    []string `json:"associatedCards"`
	AssociatedCardRefs []string `json:"associatedCardRefs"`
	Assets             []struct {
		GameAbsolutePath string `json:"gameAbsolutePath"`
		FullAbsolutePath string `json:"fullAbsolutePath"`
	} `json:"assets"`
	Regions               []string `json:"regions"`
	RegionRefs            []string `json:"regionRefs"`
	Attack                int      `json:"attack"`
	Cost                  int      `json:"cost"`
	Health                int      `json:"health"`
	Description           string   `json:"description"`
	DescriptionRaw        string   `json:"descriptionRaw"`
	LevelupDescription    string   `json:"levelupDescription"`
	LevelupDescriptionRaw string   `json:"levelupDescriptionRaw"`
	FlavorText            string   `json:"flavorText"`
	ArtistName            string   `json:"artistName"`
	Name                  string   `json:"name"`
	Keywords              []string `json:"keywords"`
	KeywordRefs           []string `json:"keywordRefs"`
	SpellSpeed            string   `json:"spellSpeed"`
	SpellSpeedRef         string   `json:"spellSpeedRef"`
	Rarity                string   `json:"rarity"`
	RarityRef             string   `json:"rarityRef"`
	Subtypes              []string `json:"subtypes"`
	Supertype             string   `json:"supertype"`
	Type                  string   `json:"type"`
	Collectible           bool     `json:"collectible"`
	Set                   string   `json:"set"`
	Formats               []string `json:"formats"`
	FormatRefs            []string `json:"formatRefs"`

	TypeRef      string
	SupertypeRef string
}

type SetBundle

type SetBundle struct {
	LastModified time.Time
	Locale       string
	Set          string
	Version      string
	Cards        []*Card
}

Jump to

Keyboard shortcuts

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