Documentation
¶
Index ¶
- Constants
- func CollectionExists(ctx context.Context, db mongoifc.Database, name string) (bool, error)
- func Create(ctx context.Context, db mongoifc.Database, users ...User) ([]string, error)
- func CreateCollection(ctx context.Context, db mongoifc.Database, name string) error
- func Delete(ctx context.Context, db mongoifc.Database, ids ...string) error
- func DropCollection(ctx context.Context, db mongoifc.Database, name string) error
- type User
Constants ¶
View Source
const (
UsersCollection = "users"
)
Variables ¶
This section is empty.
Functions ¶
func CollectionExists ¶ added in v1.11.2
func CreateCollection ¶ added in v1.11.2
Types ¶
type User ¶
type User struct { ID string `json:"id,omitempty" bson:"_id,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` Email string `json:"email,omitempty" bson:"email,omitempty"` Active bool `json:"active,omitempty" bson:"active,omitempty"` IsAdmin bool `json:"is_admin,omitempty" bson:"is_admin,omitempty"` }
Click to show internal directories.
Click to hide internal directories.