models

package
v0.0.0-...-54f9dea Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ability

type Ability struct {
	Name string `json:"name"`
	Text string `json:"text"`
	Type string `json:"type"`
}

type AncientTrait

type AncientTrait struct {
	Name string `json:"name"`
	Text string `json:"text"`
}

type Attack

type Attack struct {
	Cost                []string `json:"cost"`
	ConvertedEnergyCost int      `json:"convertedEnergyCost"`
	Damage              string   `json:"damage"`
	Name                string   `json:"name"`
	Text                string   `json:"text"`
}

type Card

type Card struct {
	Id                    string             `json:"id"`
	Name                  string             `json:"name"`
	Supertype             string             `json:"supertype"`
	Subtypes              []string           `json:"subtypes"`
	Level                 string             `json:"level"`
	HP                    int                `json:"hp"`
	Types                 []string           `json:"types"`
	EvolvesFrom           string             `json:"evolves_from"`
	EvolvesTo             []string           `json:"evolves_to"`
	Rules                 []string           `json:"rules"`
	AncientTrait          AncientTrait       `json:"ancient_trait"`
	Abilities             []Ability          `json:"abilities"`
	Attacks               []Attack           `json:"attack"`
	Weaknessess           []TypeRelationship `json:"weaknesses"`
	Resistances           []TypeRelationship `json:"resistances"`
	SetId                 string             `json:"set_id"`
	Number                string             `json:"number"`
	Artist                string             `json:"artist"`
	Rarity                string             `json:"rarity"`
	NationalPokedexNumber int                `json:"national_pokedex_number"`
	RetreatCost           []string           `json:"retreat_cost"`
	ConvertedRetreatCost  int                `json:"converted_retreat_cost"`
	Images                Images             `json:"images"`
}

func FromJsonToPg

func FromJsonToPg(cardJson *CardJson) (*Card, error)

type CardJson

type CardJson struct {
	Id                    string             `json:"id"`
	Name                  string             `json:"name"`
	Supertype             string             `json:"supertype"`
	Subtypes              []string           `json:"subtypes"`
	Level                 string             `json:"level"`
	HP                    string             `json:"hp"`
	Types                 []string           `json:"types"`
	EvolvesFrom           string             `json:"evolvesFrom"`
	EvolvesTo             []string           `json:"evolvesTo"`
	Rules                 []string           `json:"rules"`
	AncientTrait          AncientTrait       `json:"ancientTrait"`
	Abilities             []Ability          `json:"abilities"`
	Attacks               []Attack           `json:"attacks"`
	Weaknessess           []TypeRelationship `json:"weaknesses"`
	Resistances           []TypeRelationship `json:"resistances"`
	Number                string             `json:"number"`
	Artist                string             `json:"artist"`
	Rarity                string             `json:"rarity"`
	NationalPokedexNumber []int              `json:"nationalPokedexNumbers"`
	RetreatCost           []string           `json:"retreatCost"`
	ConvertedRetreatCost  int                `json:"convertedRetreatCost"`
	Images                Images             `json:"images"`
}

type EmbeddingRequest

type EmbeddingRequest struct {
	Filenames string `json:"filenames"`
	Model     string `json:"model"`
}

type EmbeddingResponse

type EmbeddingResponse struct {
	Embeddings [][]float32 `json:"embeddings"`
}

type Images

type Images struct {
	Small string `json:"small"`
	Large string `json:"large"`
}

type SimilarSearchResponse

type SimilarSearchResponse struct {
	Id         string  `json:"id"`
	Image      string  `json:"image"`
	Similarity float32 `json:"similarity"`
}

type TypeRelationship

type TypeRelationship struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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