Documentation ¶
Index ¶
- type ArmorModel
- func (model *ArmorModel) AllImage() ([]models.ArmorImage, error)
- func (model *ArmorModel) AllItem() ([]models.ArmorItem, error)
- func (model *ArmorModel) AllSet() ([]models.ArmorSet, error)
- func (model *ArmorModel) DeleteImage(id string) (*mongo.DeleteResult, error)
- func (model *ArmorModel) DeleteItem(id string) (*mongo.DeleteResult, error)
- func (model *ArmorModel) DeleteSet(id string) (*mongo.DeleteResult, error)
- func (model *ArmorModel) FindImage(id string) (*models.ArmorImage, error)
- func (model *ArmorModel) FindImageByName(name string) (*models.ArmorImage, error)
- func (model *ArmorModel) FindItem(id string) (*models.ArmorItem, error)
- func (model *ArmorModel) FindSet(id string) (*models.ArmorSet, error)
- func (model *ArmorModel) InsertImage(ArmorImage *models.ArmorImage) (*mongo.InsertOneResult, error)
- func (model *ArmorModel) InsertItem(Armor *models.ArmorItem) (*mongo.InsertOneResult, error)
- func (model *ArmorModel) InsertManyItem(docs []interface{}) (*mongo.InsertManyResult, error)
- func (model *ArmorModel) InsertManySet(docs []interface{}) (*mongo.InsertManyResult, error)
- func (model *ArmorModel) InsertSet(Armor *models.ArmorSet) (*mongo.InsertOneResult, error)
- func (model *ArmorModel) UpdateImage(ArmorImage *models.ArmorImage) (*mongo.UpdateResult, error)
- func (model *ArmorModel) UpdateSetByName(Name string, ItemID string) (*mongo.UpdateResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArmorModel ¶
type ArmorModel struct {
Collection *mongo.Collection
}
func (*ArmorModel) AllImage ¶
func (model *ArmorModel) AllImage() ([]models.ArmorImage, error)
AllImage returns a slice of all ArmorImage objects in the database.
func (*ArmorModel) AllItem ¶
func (model *ArmorModel) AllItem() ([]models.ArmorItem, error)
AllItem returns a slice of all ArmorItem objects in the database.
func (*ArmorModel) AllSet ¶
func (model *ArmorModel) AllSet() ([]models.ArmorSet, error)
AllSet returns a slice of all ArmorSet objects in the database.
func (*ArmorModel) DeleteImage ¶
func (model *ArmorModel) DeleteImage(id string) (*mongo.DeleteResult, error)
DeleteImage deletes a single ArmorImage object by its ID.
func (*ArmorModel) DeleteItem ¶
func (model *ArmorModel) DeleteItem(id string) (*mongo.DeleteResult, error)
DeleteItem deletes a single ArmorItem object by its ID.
func (*ArmorModel) DeleteSet ¶
func (model *ArmorModel) DeleteSet(id string) (*mongo.DeleteResult, error)
DeleteSet deletes a single ArmorSet object by its ID.
func (*ArmorModel) FindImage ¶
func (model *ArmorModel) FindImage(id string) (*models.ArmorImage, error)
FindImage finds and returns a single ArmorImage object by its ID.
func (*ArmorModel) FindImageByName ¶
func (model *ArmorModel) FindImageByName(name string) (*models.ArmorImage, error)
FindImageByName finds and returns a single ArmorImage object by its name.
func (*ArmorModel) FindItem ¶
func (model *ArmorModel) FindItem(id string) (*models.ArmorItem, error)
FindItem finds and returns a single ArmorItem object by its ID.
func (*ArmorModel) FindSet ¶
func (model *ArmorModel) FindSet(id string) (*models.ArmorSet, error)
FindSet finds and returns a single ArmorSet object by its ID.
func (*ArmorModel) InsertImage ¶
func (model *ArmorModel) InsertImage(ArmorImage *models.ArmorImage) (*mongo.InsertOneResult, error)
InsertImage inserts a new ArmorImage object into the database.
func (*ArmorModel) InsertItem ¶
func (model *ArmorModel) InsertItem(Armor *models.ArmorItem) (*mongo.InsertOneResult, error)
InsertItem inserts a new ArmorItem object into the database.
func (*ArmorModel) InsertManyItem ¶
func (model *ArmorModel) InsertManyItem(docs []interface{}) (*mongo.InsertManyResult, error)
InsertManyItem inserts multiple ArmorItem objects into the database.
func (*ArmorModel) InsertManySet ¶
func (model *ArmorModel) InsertManySet(docs []interface{}) (*mongo.InsertManyResult, error)
InsertManySet inserts multiple ArmorSet objects into the database.
func (*ArmorModel) InsertSet ¶
func (model *ArmorModel) InsertSet(Armor *models.ArmorSet) (*mongo.InsertOneResult, error)
InsertSet inserts a new ArmorSet object into the database.
func (*ArmorModel) UpdateImage ¶
func (model *ArmorModel) UpdateImage(ArmorImage *models.ArmorImage) (*mongo.UpdateResult, error)
UpdateImage updates an existing ArmorImage object in the database.
func (*ArmorModel) UpdateSetByName ¶
func (model *ArmorModel) UpdateSetByName(Name string, ItemID string) (*mongo.UpdateResult, error)
UpdateSetByName updates an existing ArmorSet object by adding a new tag (ItemID) to the tag array in the set.