Documentation
¶
Index ¶
- Variables
- type Deck
- func (*Deck) Descriptor() ([]byte, []int)deprecated
- func (x *Deck) GetCode() string
- func (x *Deck) GetCommander() []*DeckContent
- func (x *Deck) GetMainBoard() []*DeckContent
- func (x *Deck) GetMtgjsonApiMeta() *meta.MTGJSONAPIMeta
- func (x *Deck) GetName() string
- func (x *Deck) GetReleaseDate() string
- func (x *Deck) GetSideBoard() []*DeckContent
- func (x *Deck) GetType() string
- func (*Deck) ProtoMessage()
- func (x *Deck) ProtoReflect() protoreflect.Message
- func (x *Deck) Reset()
- func (x *Deck) String() string
- type DeckContent
- func (*DeckContent) Descriptor() ([]byte, []int)deprecated
- func (x *DeckContent) GetCard() []*card.CardSet
- func (x *DeckContent) GetMtgjsonV4Id() string
- func (x *DeckContent) GetQuantity() int64
- func (*DeckContent) ProtoMessage()
- func (x *DeckContent) ProtoReflect() protoreflect.Message
- func (x *DeckContent) Reset()
- func (x *DeckContent) String() string
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) 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) GetReleaseDate ¶ added in v1.2.0
func (*Deck) GetSideBoard ¶ added in v1.3.5
func (x *Deck) GetSideBoard() []*DeckContent
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
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
Click to show internal directories.
Click to hide internal directories.