Documentation
¶
Index ¶
- type MongoDB
- func (m *MongoDB) Connect() error
- func (m *MongoDB) Disconnect()
- func (m *MongoDB) DropDatabase(name string) error
- func (m *MongoDB) FindAll() ([]interface{}, error)
- func (m *MongoDB) FindOne(filter interface{}, data interface{}) (interface{}, error)
- func (m *MongoDB) GetCollInstance() *mongo.Collection
- func (m *MongoDB) GetCollection(name string)
- func (m *MongoDB) GetDatabase(name string)
- func (m *MongoDB) InitializeProject() error
- func (m *MongoDB) InsertOne(dat interface{}) error
- func (m MongoDB) Isconnected() bool
- func (m *MongoDB) ListDBCollections() ([]string, error)
- func (m *MongoDB) ListDatabases() ([]string, error)
- func (m MongoDB) PingTest() error
- func (m *MongoDB) TempConnection(db string) *mongo.Database
- func (m *MongoDB) UpdateDocument(filter interface{}, dat interface{}) (*mongo.UpdateResult, error)
- func (m *MongoDB) ValidateProject() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoDB ¶
type MongoDB struct { URL string // contains filtered or unexported fields }
MongoDB ...
func (*MongoDB) DropDatabase ¶
DropDatabase : Drop a Database
func (*MongoDB) GetCollInstance ¶
func (m *MongoDB) GetCollInstance() *mongo.Collection
GetCollInstance : Get Collection Instance
func (*MongoDB) GetCollection ¶
GetCollection : Get COllection
func (*MongoDB) GetDatabase ¶
GetDatabase : Connect to Database
func (*MongoDB) InitializeProject ¶
InitializeProject : Initalize Project According to Sandman Needs
func (MongoDB) Isconnected ¶
Isconnected : Check If Connected to Database
func (*MongoDB) ListDBCollections ¶
ListDBCollections : List All Collections of Current Database
func (*MongoDB) ListDatabases ¶
ListDatabases : List all Databases
func (*MongoDB) TempConnection ¶
TempConnection : Create a temp connection to different database
func (*MongoDB) UpdateDocument ¶
func (m *MongoDB) UpdateDocument(filter interface{}, dat interface{}) (*mongo.UpdateResult, error)
UpdateDocument : Update Existing Document or create New One
func (*MongoDB) ValidateProject ¶
ValidateProject : Just Check if Files are as intended by application
Click to show internal directories.
Click to hide internal directories.