Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConflict = fmt.Errorf("conflict: document already exists")
View Source
var ErrNotFound = fmt.Errorf("document not found")
Functions ¶
This section is empty.
Types ¶
type DbService ¶
type DbService[DocType interface{}] interface { CreateDocument(ctx context.Context, id string, document *DocType) error FindDocument(ctx context.Context, id string) (*DocType, error) UpdateDocument(ctx context.Context, id string, document *DocType) error DeleteDocument(ctx context.Context, id string) error Disconnect(ctx context.Context) error }
func NewMongoService ¶
func NewMongoService[DocType interface{}](config MongoServiceConfig) DbService[DocType]
Click to show internal directories.
Click to hide internal directories.