mongoModel

package
v0.0.0-...-6dda8ec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCollectionValueIsRequired = errors.NewError("135bc16c-001", "Value for mongo collection is required")
)

Functions

This section is empty.

Types

type Collection

type Collection string

func CollectionFrom

func CollectionFrom(str string) (Collection, error)

func (Collection) String

func (c Collection) String() string

type Config

type Config struct {
	URL      string
	Database string
}

type DBIndex

type DBIndex struct {
	Collection Collection
	Name       string
	Keys       []string
	Type       DBIndexType
	Uniq       bool
}

type DBIndexType

type DBIndexType int32
const (
	DBIndexAsc  DBIndexType = 1
	DBIndexDesc DBIndexType = -1
)

type DBTextIndex

type DBTextIndex struct {
	Collection string
	Name       string
	Keys       []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL