Documentation ¶
Index ¶
- Constants
- func Find(db, collection string, query, selector, result interface{}) error
- func FindAll(db, collection string, query, selector, result interface{}) error
- func Insert(db, collection string, docs ...interface{}) error
- func Remove(db, collection string, query interface{}) error
- func Update(db, collection string, query, update interface{}) error
- type Movies
- func (m *Movies) FindAllMovies() ([]Movies, error)
- func (m *Movies) FindMovieById(id string) (Movies, error)
- func (m *Movies) FindMovieByName(name string) (Movies, error)
- func (m *Movies) InsertMovie(movie Movies) error
- func (m *Movies) RemoveMovieById(id string) error
- func (m *Movies) UpdateMovie(movie Movies) error
Constants ¶
View Source
const ( HOST = "127.0.0.1:27017" DBSOURCE = "Movies" USERNAME = "service_test" PASSWORD = "123456" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Movies ¶
type Movies struct { Id bson.ObjectId `bson:"_id" json:"id"` Name string `bson:"name" json:"name"` Time string `bson:"time" json:"time"` Description string `bson:"description" json:"description"` }
func (*Movies) FindAllMovies ¶
func (*Movies) InsertMovie ¶
func (*Movies) RemoveMovieById ¶
func (*Movies) UpdateMovie ¶
Click to show internal directories.
Click to hide internal directories.