Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶ added in v0.1.7
type Database interface {
Create(ctx context.Context, collection string, document interface{}) (interface{}, error)
ReadOne(ctx context.Context, collection string, id interface{}) (interface{}, error)
ReadAll(ctx context.Context, collection string) ([]interface{}, error)
Update(ctx context.Context, collection string, id interface{}, document interface{}) (interface{}, error)
Delete(ctx context.Context, collection string, id interface{}) (interface{}, error)
}
type MapDB ¶ added in v0.1.6
type MapDB interface {
Create(ctx context.Context, collection string, document interface{}) (interface{}, error)
ReadOne(ctx context.Context, collection string, id interface{}) (interface{}, error)
ReadAll(ctx context.Context, collection string) ([]interface{}, error)
Update(ctx context.Context, collection string, id interface{}, document interface{}) (interface{}, error)
Delete(ctx context.Context, collection string, id interface{}) (interface{}, error)
}
type MongoDB ¶
type MongoDB interface {
Create(ctx context.Context, collection string, document interface{}) (interface{}, error)
ReadOne(ctx context.Context, collection string, id interface{}) (interface{}, error)
ReadAll(ctx context.Context, collection string) ([]interface{}, error)
Update(ctx context.Context, collection string, id interface{}, document interface{}) (interface{}, error)
Delete(ctx context.Context, collection string, id interface{}) (interface{}, error)
}
func NewMongoDB ¶
Click to show internal directories.
Click to hide internal directories.