deck

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: Unlicense Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_deck_deck_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Deck

type Deck struct {
	Name           string               `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" bson:"name"`                               // @gotags: bson:"name"
	Code           string               `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty" bson:"code"`                               // @gotags: bson:"code"
	Type           string               `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty" bson:"type"`                               // @gotags: bson:"type"
	ReleaseDate    string               `protobuf:"bytes,4,opt,name=releaseDate,proto3" json:"releaseDate,omitempty" bson:"releaseDate"`          // @gotags: bson:"releaseDate"
	Commander      []*DeckContent       `protobuf:"bytes,6,rep,name=commander,proto3" json:"commander,omitempty"`                                 // gotags: bson:"commander"
	MainBoard      []*DeckContent       `protobuf:"bytes,7,rep,name=mainBoard,proto3" json:"mainBoard,omitempty" bson:"mainBoard"`                // @gotags: bson:"mainBoard"
	SideBoard      []*DeckContent       `protobuf:"bytes,8,rep,name=sideBoard,proto3" json:"sideBoard,omitempty" bson:"sideBoard"`                // @gotags: bson:"sideBoard"
	MtgjsonApiMeta *meta.MTGJSONAPIMeta `protobuf:"bytes,9,opt,name=mtgjsonApiMeta,proto3" json:"mtgjsonApiMeta,omitempty" bson:"mtgjsonApiMeta"` // @gotags: bson:"mtgjsonApiMeta"
	// contains filtered or unexported fields
}

Deck - Represents an MTGJSON deck

See here for more info: https://mtgjson.com/data-models/deck

This model has been changed slightly from the original model to seperate out lists for both the card ids and for cards themselves. This way we can store just the ID's in the database and fill the contents field before it gets returned to the user

func (*Deck) Descriptor deprecated added in v1.2.0

func (*Deck) Descriptor() ([]byte, []int)

Deprecated: Use Deck.ProtoReflect.Descriptor instead.

func (*Deck) GetCode added in v1.2.0

func (x *Deck) GetCode() string

func (*Deck) GetCommander added in v1.3.5

func (x *Deck) GetCommander() []*DeckContent

func (*Deck) GetMainBoard added in v1.3.5

func (x *Deck) GetMainBoard() []*DeckContent

func (*Deck) GetMtgjsonApiMeta added in v1.2.0

func (x *Deck) GetMtgjsonApiMeta() *meta.MTGJSONAPIMeta

func (*Deck) GetName added in v1.2.0

func (x *Deck) GetName() string

func (*Deck) GetReleaseDate added in v1.2.0

func (x *Deck) GetReleaseDate() string

func (*Deck) GetSideBoard added in v1.3.5

func (x *Deck) GetSideBoard() []*DeckContent

func (*Deck) GetType added in v1.2.0

func (x *Deck) GetType() string

func (*Deck) ProtoMessage added in v1.2.0

func (*Deck) ProtoMessage()

func (*Deck) ProtoReflect added in v1.2.0

func (x *Deck) ProtoReflect() protoreflect.Message

func (*Deck) Reset added in v1.2.0

func (x *Deck) Reset()

func (*Deck) String added in v1.2.0

func (x *Deck) String() string

type DeckContent added in v1.3.5

type DeckContent struct {
	Quantity    int64           `protobuf:"varint,1,opt,name=quantity,proto3" json:"quantity,omitempty" bson:"quantity"`         // @gotags: bson:"quantity"
	MtgjsonV4Id string          `protobuf:"bytes,2,opt,name=mtgjsonV4Id,proto3" json:"mtgjsonV4Id,omitempty" bson:"mtgjsonV4Id"` // @gotags: bson:"mtgjsonV4Id"
	Card        []*card.CardSet `protobuf:"bytes,3,rep,name=card,proto3" json:"card,omitempty" bson:"card"`                      // @gotags: bson:"card"
	// contains filtered or unexported fields
}

DeckContent - Represents an Card within the deck. The card field is only populated when it is processed by the API and not when it is stored within the database. This is to ensure that there are not duplicated card models across the database

func (*DeckContent) Descriptor deprecated added in v1.3.5

func (*DeckContent) Descriptor() ([]byte, []int)

Deprecated: Use DeckContent.ProtoReflect.Descriptor instead.

func (*DeckContent) GetCard added in v1.3.5

func (x *DeckContent) GetCard() []*card.CardSet

func (*DeckContent) GetMtgjsonV4Id added in v1.3.5

func (x *DeckContent) GetMtgjsonV4Id() string

func (*DeckContent) GetQuantity added in v1.3.5

func (x *DeckContent) GetQuantity() int64

func (*DeckContent) ProtoMessage added in v1.3.5

func (*DeckContent) ProtoMessage()

func (*DeckContent) ProtoReflect added in v1.3.5

func (x *DeckContent) ProtoReflect() protoreflect.Message

func (*DeckContent) Reset added in v1.3.5

func (x *DeckContent) Reset()

func (*DeckContent) String added in v1.3.5

func (x *DeckContent) String() string

Jump to

Keyboard shortcuts

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