Documentation ¶
Index ¶
Constants ¶
View Source
const (
CodeDuplicateKeyErrorCollection = 11000
)
Variables ¶
View Source
var ( ErrorSessionNotInit = errors.New("database session not init") ErrorDatabaseNotFound = errors.New("database name not found in DSN connection string") )
View Source
var ( ErrorProtocolNotFound = errors.New("protocol not found") ErrorHostsNotFound = errors.New("hosts not found") )
Functions ¶
func GetObjectIDCounter ¶
func IsDuplicate ¶
func ToSortOption ¶
func ToSortOption(fields []string) interface{}
Types ¶
type DSN ¶
type Options ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func (*Source) Collection ¶
func (s *Source) Collection(name string) *mongo.Collection
Click to show internal directories.
Click to hide internal directories.