Documentation
¶
Index ¶
- Variables
- type Activity
- type IModel
- type Model
- func (s *Model) Delete(id string) error
- func (s *Model) Filter(data map[string]interface{}) map[string]interface{}
- func (s *Model) GetAll() (any, error)
- func (s *Model) GetById(id string) (any, error)
- func (s *Model) Post(data map[string]any) error
- func (s *Model) Put(id string, data map[string]any) error
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ActivityModel = &Model{&Activity{}}
View Source
var DatabaseName = "api_test"
View Source
var MongodbConnection = "mongodb://localhost:27017"
View Source
var UserModel = &Model{&User{}}
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct { Image string `bson:"image" json:"image" xml:"image"` Images []string `bson:"images" json:"images" xml:"images"` Title string `bson:"title" json:"title" xml:"title"` Titles string `bson:"titles" json:"titles" xml:"titles"` Content string `bson:"content" json:"content" xml:"content"` Distance string `bson:"distance" json:"distance" xml:"distance"` }
func (*Activity) CheckRequired ¶
func (*Activity) GetCollectionName ¶
type User ¶
type User struct { Name string `bson:"name" json:"name" xml:"name"` Age int `bson:"age" json:"age" xml:"age"` }
func (*User) CheckRequired ¶
func (*User) GetCollectionName ¶
Click to show internal directories.
Click to hide internal directories.