Documentation
¶
Index ¶
- Variables
- type Deck
- func (*Deck) Descriptor() ([]byte, []int)deprecated
- func (x *Deck) GetCode() string
- func (x *Deck) GetContents() *DeckContents
- func (x *Deck) GetMtgjsonApiMeta() *meta.MTGJSONAPIMeta
- func (x *Deck) GetName() string
- func (x *Deck) GetReleaseDate() string
- func (x *Deck) GetType() string
- func (*Deck) ProtoMessage()
- func (x *Deck) ProtoReflect() protoreflect.Message
- func (x *Deck) Reset()
- func (x *Deck) String() string
- type DeckContentEntry
- func (*DeckContentEntry) Descriptor() ([]byte, []int)deprecated
- func (x *DeckContentEntry) GetCard() []*card.CardSet
- func (x *DeckContentEntry) GetMtgjsonV4Id() string
- func (x *DeckContentEntry) GetQuantity() int64
- func (*DeckContentEntry) ProtoMessage()
- func (x *DeckContentEntry) ProtoReflect() protoreflect.Message
- func (x *DeckContentEntry) Reset()
- func (x *DeckContentEntry) String() string
- type DeckContents
- func (*DeckContents) Descriptor() ([]byte, []int)deprecated
- func (x *DeckContents) GetCommander() []*DeckContentEntry
- func (x *DeckContents) GetMainBoard() []*DeckContentEntry
- func (x *DeckContents) GetSideBoard() []*DeckContentEntry
- func (*DeckContents) ProtoMessage()
- func (x *DeckContents) ProtoReflect() protoreflect.Message
- func (x *DeckContents) Reset()
- func (x *DeckContents) String() string
Constants ¶
This section is empty.
Variables ¶
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"
Contents *DeckContents `protobuf:"bytes,5,opt,name=contents,proto3" json:"contents,omitempty" bson:"contents"` // @gotags: bson:"contents"
MtgjsonApiMeta *meta.MTGJSONAPIMeta `protobuf:"bytes,6,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) GetContents ¶ added in v1.2.0
func (x *Deck) GetContents() *DeckContents
func (*Deck) GetMtgjsonApiMeta ¶ added in v1.2.0
func (x *Deck) GetMtgjsonApiMeta() *meta.MTGJSONAPIMeta
func (*Deck) GetReleaseDate ¶ added in v1.2.0
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 DeckContentEntry ¶ added in v1.3.6
type DeckContentEntry 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
}
DeckContentEntry - Represents a single entry within a deck's board. The card field is left nil when stored within the database and is filled in during call time. This is to ensure there are not duplicated models across the database
func (*DeckContentEntry) Descriptor
deprecated
added in
v1.3.6
func (*DeckContentEntry) Descriptor() ([]byte, []int)
Deprecated: Use DeckContentEntry.ProtoReflect.Descriptor instead.
func (*DeckContentEntry) GetCard ¶ added in v1.3.6
func (x *DeckContentEntry) GetCard() []*card.CardSet
func (*DeckContentEntry) GetMtgjsonV4Id ¶ added in v1.3.6
func (x *DeckContentEntry) GetMtgjsonV4Id() string
func (*DeckContentEntry) GetQuantity ¶ added in v1.3.6
func (x *DeckContentEntry) GetQuantity() int64
func (*DeckContentEntry) ProtoMessage ¶ added in v1.3.6
func (*DeckContentEntry) ProtoMessage()
func (*DeckContentEntry) ProtoReflect ¶ added in v1.3.6
func (x *DeckContentEntry) ProtoReflect() protoreflect.Message
func (*DeckContentEntry) Reset ¶ added in v1.3.6
func (x *DeckContentEntry) Reset()
func (*DeckContentEntry) String ¶ added in v1.3.6
func (x *DeckContentEntry) String() string
type DeckContents ¶ added in v1.0.3
type DeckContents struct {
Commander []*DeckContentEntry `protobuf:"bytes,1,rep,name=commander,proto3" json:"commander,omitempty"` // gotags: bson:"commander"
MainBoard []*DeckContentEntry `protobuf:"bytes,2,rep,name=mainBoard,proto3" json:"mainBoard,omitempty" bson:"mainBoard"` // @gotags: bson:"mainBoard"
SideBoard []*DeckContentEntry `protobuf:"bytes,3,rep,name=sideBoard,proto3" json:"sideBoard,omitempty" bson:"sideBoard"` // @gotags: bson:"sideBoard"
// contains filtered or unexported fields
}
DeckContents - Represents the contents of a deck. Each board is stored here
func (*DeckContents) Descriptor
deprecated
added in
v1.2.0
func (*DeckContents) Descriptor() ([]byte, []int)
Deprecated: Use DeckContents.ProtoReflect.Descriptor instead.
func (*DeckContents) GetCommander ¶ added in v1.2.0
func (x *DeckContents) GetCommander() []*DeckContentEntry
func (*DeckContents) GetMainBoard ¶ added in v1.2.0
func (x *DeckContents) GetMainBoard() []*DeckContentEntry
func (*DeckContents) GetSideBoard ¶ added in v1.2.0
func (x *DeckContents) GetSideBoard() []*DeckContentEntry
func (*DeckContents) ProtoMessage ¶ added in v1.2.0
func (*DeckContents) ProtoMessage()
func (*DeckContents) ProtoReflect ¶ added in v1.2.0
func (x *DeckContents) ProtoReflect() protoreflect.Message
func (*DeckContents) Reset ¶ added in v1.2.0
func (x *DeckContents) Reset()
func (*DeckContents) String ¶ added in v1.2.0
func (x *DeckContents) String() string