This commit is contained in:
George Suntres
2026-03-29 12:10:42 -04:00
parent 38265c15d1
commit f0f90ae56f
3 changed files with 285 additions and 4 deletions

View File

@@ -15,8 +15,8 @@ import (
"go.mongodb.org/mongo-driver/v2/mongo/options"
"go.mongodb.org/mongo-driver/v2/bson"
"git.gsuntres.com/boxtep/boxtep/core"
"git.gsuntres.com/boxtep/boxtep/sys"
// "git.gsuntres.com/boxtep/boxtep/core"
"git.gsuntres.com/general/sys"
)
// WithiSessionFunc will run operations on the database within the same session.
@@ -103,7 +103,7 @@ const ADD_DEFINITION_SCHEMA = `
`
func (c *MongoClient) AddDefinition(data map[string]any) {
if valid := core.Validate(ADD_DEFINITION_SCHEMA, data); valid != nil {
if valid := commons.Validate(ADD_DEFINITION_SCHEMA, data); valid != nil {
log.Printf("failed to register data: %v", valid)
return
@@ -228,7 +228,7 @@ type MongoStartProps struct {
}
func Start(props *MongoStartProps) error {
if err := core.Validate(validSchema_StartProps, props); err != nil {
if err := commons.Validate(validSchema_StartProps, props); err != nil {
return err
}