Documentation ¶
Index ¶
- func AddHero(hero HeroCharacter)
- func AddHeroXp(heroName string, addedXP int)
- func FindHeroByName(nameHero string, heroFound *HeroCharacter) error
- func GetHexIdFromResult(result *mongo.InsertOneResult) string
- func Init(agent *MongoAgent) error
- func TestDB(agent *MongoAgent)
- type Attribute
- type Character
- type EntryId
- type EventAdventure
- type HeroCharacter
- type MongoAgent
- func (dbagent *MongoAgent) AddEvent(eventNew EventAdventure)
- func (self *MongoAgent) AddOne(value interface{}, table string) string
- func (self *MongoAgent) AutoMigrate(object interface{})
- func (self *MongoAgent) Begin() *MongoAgent
- func (self *MongoAgent) Commit() *MongoAgent
- func (self *MongoAgent) Delete(value interface{}) *MongoAgent
- func (self *MongoAgent) Find(valuePointer interface{}, where ...interface{}) *MongoAgent
- func (self *MongoAgent) FindMany(objects string, filter interface{}, objectFoundSlice interface{})
- func (self *MongoAgent) First(foundObject interface{}, conditions ...interface{}) *MongoAgent
- func (self *MongoAgent) FirstOrCreate(foundPointer interface{}, conditions ...interface{}) *MongoAgent
- func (dbagent *MongoAgent) GetConnectionUrl() string
- func (agent *MongoAgent) InitDB() error
- func (self *MongoAgent) Limit(number int) *MongoAgent
- func (dbagent *MongoAgent) LoadEvents() []EventAdventure
- func (self *MongoAgent) Model(model interface{}) *MongoAgent
- func (self *MongoAgent) Offset(number int) *MongoAgent
- func (self *MongoAgent) Related(valuePointer interface{}, foregnKey ...string) *MongoAgent
- func (self *MongoAgent) Save(value interface{}) *MongoAgent
- func (dbagent *MongoAgent) SetModel(model interface{})
- func (self *MongoAgent) Update(data interface{}) *MongoAgent
- func (dbagent *MongoAgent) UpdateOne(table string, filter interface{}, update interface{})
- func (self *MongoAgent) Where(conditions ...interface{}) *MongoAgent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHero ¶
func AddHero(hero HeroCharacter)
func FindHeroByName ¶
func FindHeroByName(nameHero string, heroFound *HeroCharacter) error
func TestDB ¶
func TestDB(agent *MongoAgent)
Types ¶
type EventAdventure ¶
type HeroCharacter ¶
type MongoAgent ¶
type MongoAgent struct { //extended mongo client //wrapper ConnectionUrl string Error error ObjectModel interface{} //Login string //Password string mongo.Client // contains filtered or unexported fields }
var DBagent MongoAgent
func (*MongoAgent) AddEvent ¶
func (dbagent *MongoAgent) AddEvent(eventNew EventAdventure)
func (*MongoAgent) AddOne ¶
func (self *MongoAgent) AddOne(value interface{}, table string) string
func (*MongoAgent) AutoMigrate ¶
func (self *MongoAgent) AutoMigrate(object interface{})
func (*MongoAgent) Begin ¶
func (self *MongoAgent) Begin() *MongoAgent
func (*MongoAgent) Commit ¶
func (self *MongoAgent) Commit() *MongoAgent
func (*MongoAgent) Delete ¶
func (self *MongoAgent) Delete(value interface{}) *MongoAgent
func (*MongoAgent) Find ¶
func (self *MongoAgent) Find(valuePointer interface{}, where ...interface{}) *MongoAgent
func (*MongoAgent) FindMany ¶
func (self *MongoAgent) FindMany(objects string, filter interface{}, objectFoundSlice interface{})
func (*MongoAgent) First ¶
func (self *MongoAgent) First(foundObject interface{}, conditions ...interface{}) *MongoAgent
gorm interface find first by id
func (*MongoAgent) FirstOrCreate ¶
func (self *MongoAgent) FirstOrCreate(foundPointer interface{}, conditions ...interface{}) *MongoAgent
func (*MongoAgent) GetConnectionUrl ¶
func (dbagent *MongoAgent) GetConnectionUrl() string
func (*MongoAgent) InitDB ¶
func (agent *MongoAgent) InitDB() error
func (*MongoAgent) Limit ¶
func (self *MongoAgent) Limit(number int) *MongoAgent
func (*MongoAgent) LoadEvents ¶
func (dbagent *MongoAgent) LoadEvents() []EventAdventure
func (*MongoAgent) Model ¶
func (self *MongoAgent) Model(model interface{}) *MongoAgent
func (*MongoAgent) Offset ¶
func (self *MongoAgent) Offset(number int) *MongoAgent
func (*MongoAgent) Related ¶
func (self *MongoAgent) Related(valuePointer interface{}, foregnKey ...string) *MongoAgent
func (*MongoAgent) Save ¶
func (self *MongoAgent) Save(value interface{}) *MongoAgent
func (*MongoAgent) SetModel ¶
func (dbagent *MongoAgent) SetModel(model interface{})
func (*MongoAgent) Update ¶
func (self *MongoAgent) Update(data interface{}) *MongoAgent
func (*MongoAgent) UpdateOne ¶
func (dbagent *MongoAgent) UpdateOne(table string, filter interface{}, update interface{})
func (*MongoAgent) Where ¶
func (self *MongoAgent) Where(conditions ...interface{}) *MongoAgent
Click to show internal directories.
Click to hide internal directories.