Documentation ¶
Index ¶
- Variables
- func NewCreate[T any](collection *Collection, data T) *create[T]
- func NewDelete[T any](collection *Collection) *delete[T]
- func NewQuery[T any](collection *Collection) *query[T]
- func NewSearch[T any](collection *Collection, query string) *search[T]
- func NewUpdate[T any](collection *Collection, data T) *update[T]
- func NewWatch[T any](collection *Collection, operations ...Operation) *watch[T]
- type Collection
- type Creator
- type Database
- type Deleter
- type Operation
- type Querier
- type Searcher
- type Updater
- type Watcher
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Any = []Operation{Create, Delete, Update}
)
Functions ¶
func NewCreate ¶
func NewCreate[T any](collection *Collection, data T) *create[T]
func NewDelete ¶ added in v0.2.6
func NewDelete[T any](collection *Collection) *delete[T]
func NewQuery ¶
func NewQuery[T any](collection *Collection) *query[T]
func NewSearch ¶ added in v0.3.0
func NewSearch[T any](collection *Collection, query string) *search[T]
func NewUpdate ¶
func NewUpdate[T any](collection *Collection, data T) *update[T]
func NewWatch ¶ added in v0.3.0
func NewWatch[T any](collection *Collection, operations ...Operation) *watch[T]
Types ¶
type Collection ¶
func NewCollection ¶
func NewCollection(name string) *Collection
func NewCollectionWithDatabase ¶ added in v0.3.0
func NewCollectionWithDatabase( database string, name string, ) *Collection
type Creator ¶
type Creator[T any] interface { Create( ctx context.Context, collection *Collection, data T, ) error }
type Database ¶ added in v0.3.1
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func (*Database) Collection ¶ added in v0.3.1
func (d *Database) Collection(name string) *Collection
Source Files ¶
Click to show internal directories.
Click to hide internal directories.