Documentation
¶
Index ¶
- func Create[D any](document base.IBaseDocument) *D
- func CreateAndSerialize[D any, S any](document base.IBaseDocument) *S
- func DeleteMany[D any](filter any, opts ...*options.DeleteOptions) (*int64, error)
- func Find[D any](filters any, opts ...*options.FindOptions) []D
- func FindAll[D any](opts ...*options.FindOptions) []D
- func FindAllAndSerialize[D any, S any](opts ...*options.FindOptions) []S
- func FindAndSerialize[D any, S any](filters any, opts ...*options.FindOptions) []S
- func FindOne[D any](filters any, opts ...*options.FindOneOptions) *D
- func FindOneAndSerialize[D any, S any](filters any, opts ...*options.FindOneOptions) *S
- func Get[D any](id primitive.ObjectID) *D
- func Remove[D any](document base.IBaseDocument) *D
- func RemoveByID[D any](id primitive.ObjectID) bool
- func Update[D any](document base.IBaseDocument, update any, opts ...*options.UpdateOptions) (*D, error)
- func UpdateMany[D any](filter any, update any, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
- func UpdateSelf[D any](document base.IBaseDocument, opts ...*options.UpdateOptions) (*D, error)
- type Goodm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create[D any](document base.IBaseDocument) *D
func CreateAndSerialize ¶
func CreateAndSerialize[D any, S any](document base.IBaseDocument) *S
func DeleteMany ¶
func FindAll ¶
func FindAll[D any](opts ...*options.FindOptions) []D
func FindAllAndSerialize ¶
func FindAllAndSerialize[D any, S any](opts ...*options.FindOptions) []S
func FindAndSerialize ¶
func FindAndSerialize[D any, S any](filters any, opts ...*options.FindOptions) []S
func FindOneAndSerialize ¶
func FindOneAndSerialize[D any, S any](filters any, opts ...*options.FindOneOptions) *S
func Remove ¶
func Remove[D any](document base.IBaseDocument) *D
func Update ¶
func Update[D any](document base.IBaseDocument, update any, opts ...*options.UpdateOptions) (*D, error)
func UpdateMany ¶
func UpdateMany[D any](filter any, update any, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
func UpdateSelf ¶
func UpdateSelf[D any](document base.IBaseDocument, opts ...*options.UpdateOptions) (*D, error)
* UPDATE FUNCTIONS *
Types ¶
type Goodm ¶
type Goodm struct {
// contains filtered or unexported fields
}
func (*Goodm) Connect ¶
func (odm *Goodm) Connect(uri string, timeout time.Duration, opts ...*options.ClientOptions) (*database.GoodmClient, error)
func (*Goodm) ConnectMock ¶
func (odm *Goodm) ConnectMock(mtestClient *mongo.Client) *database.GoodmClient
func (*Goodm) Disconnect ¶
func (odm *Goodm) Disconnect()
Click to show internal directories.
Click to hide internal directories.