initdb

package
v0.0.0-...-18f4101 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CardAncestorsPlaceholdersCapacity = 512
	CardAncestorsValuesCapacity       = CardAncestorsPlaceholdersCapacity * 2
)
View Source
const (
	ProductCardsPlaceholdersCapacity = 512
	ProductCardsValuesCapacity       = ProductCardsPlaceholdersCapacity * 2
)
View Source
const (
	CardSpecialColorsCapacity = 8
)
View Source
const (
	CardTypesCapacity = 8
)
View Source
const (
	CardsCapacity = 512
)
View Source
const (
	DecksCapacity = 64
)
View Source
const (
	ProductsCapacity = 64
)
View Source
const (
	RevisionsCapacity = 8
)

Variables

View Source
var RevisonsBytes []byte

Functions

This section is empty.

Types

type Card

type Card struct {
	ID                              int     `csv:"id"`
	LiteralID                       string  `csv:"literal_id"`
	PrintedID                       string  `csv:"printed_id"`
	PlayAgricolaCardID              *string `csv:"play_agricola_card_id"`
	NameJa                          string  `csv:"name_ja"`
	NameEn                          string  `csv:"name_en"`
	MinPlayersNumber                *int    `csv:"min_players_number"`
	Prerequisite                    *string `csv:"prerequisite"`
	Cost                            *string `csv:"cost"`
	Description                     *string `csv:"description"`
	Note                            *string `csv:"note"`
	IsOfficialJa                    bool    `csv:"is_official_ja"`
	VictoryPoint                    *int    `csv:"victory_point"`
	SpecialVictoryPoint             *string `csv:"special_victory_point"`
	HasArrow                        bool    `csv:"has_arrow"`
	HasBonusPointIcon               bool    `csv:"has_bonus_point_icon"`
	HasNegativeBonusPointIcon       bool    `csv:"has_negative_bonus_point_icon"`
	HasPanIcon                      bool    `csv:"has_pan_icon"`
	HasBreadIcon                    bool    `csv:"has_bread_icon"`
	HasFarmPlannerIcon              bool    `csv:"has_farm_planner_icon"`
	HasActionsBoosterIcon           bool    `csv:"has_actions_booster_icon"`
	HasPointsProviderIcon           bool    `csv:"has_points_provider_icon"`
	HasGoodsProviderIcon            bool    `csv:"has_goods_provider_icon"`
	HasFoodProviderIcon             bool    `csv:"has_food_provider_icon"`
	HasCropProviderIcon             bool    `csv:"has_crop_provider_icon"`
	HasBuildingResourceProviderIcon bool    `csv:"has_building_resource_provider_icon"`
	HasLivestockProviderIcon        bool    `csv:"has_livestock_provider_icon"`
	HasCutPeatIcon                  bool    `csv:"has_cut_peat_icon"`
	HasFellTreesIcon                bool    `csv:"has_fell_trees_icon"`
	HasSlashAndBurnIcon             bool    `csv:"has_slash_and_burn_icon"`
	HasHiringFareIcon               bool    `csv:"has_hiring_fare_icon"`
	CardSpecialColorID              *int    `csv:"card_special_color_id"`
	CardTypeID                      int     `csv:"card_type_id"`
	DeckID                          *int    `csv:"deck_id"`
	RevisionID                      int     `csv:"revision_id"`
}

type CardAncestors

type CardAncestors struct {
	CardID  int `csv:"card_id"`
	ChildID int `csv:"child_id"`
}

type CardSpecialColor

type CardSpecialColor struct {
	ID     int    `csv:"id"`
	Key    string `csv:"key"`
	NameJa string `csv:"name_ja"`
	NameEn string `csv:"name_en"`
}

type CardType

type CardType struct {
	ID     int    `csv:"id"`
	Key    string `csv:"key"`
	NameJa string `csv:"name_ja"`
	NameEn string `csv:"name_en"`
}

type Deck

type Deck struct {
	ID         int    `csv:"id"`
	Key        string `csv:"key"`
	NameJa     string `csv:"name_ja"`
	NameEn     string `csv:"name_en"`
	RevisionID int    `csv:"revision_id"`
}

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(client *ent.Client, forceFresh bool) *Generator

func (*Generator) DropTablesIfNeed

func (g *Generator) DropTablesIfNeed() error

func (*Generator) DropTablesIfNeedWithContext

func (g *Generator) DropTablesIfNeedWithContext(ctx context.Context) error

func (*Generator) Generate

func (g *Generator) Generate() error

func (*Generator) GenerateWithContext

func (g *Generator) GenerateWithContext(ctx context.Context) error

type Product

type Product struct {
	ID            int    `csv:"id"`
	IsOfficialJa  bool   `csv:"is_official_ja"`
	NameJa        string `csv:"name_ja"`
	NameEn        string `csv:"name_en"`
	PublishedYear *int   `csv:"published_year"`
	RevisionID    int    `csv:"revision_id"`
}

type ProductCards

type ProductCards struct {
	ProductID int `csv:"product_id"`
	CardID    int `csv:"card_id"`
}

type Revision

type Revision struct {
	ID     int    `csv:"id"`
	Key    string `csv:"key"`
	NameJa string `csv:"name_ja"`
	NameEn string `csv:"name_en"`
}

Jump to

Keyboard shortcuts

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