Documentation ¶
Index ¶
- type ExpressionDB
- func (e *ExpressionDB) AddModuleVersion(moduleID string, input modules.DataModuleVersionInput) (modules.DataModuleSpecificVersionWire, error)
- func (e *ExpressionDB) CreateExpression(input expressions.DataExpressionInput, creator pixlUser.UserInfo, ...) (expressions.DataExpression, error)
- func (e *ExpressionDB) CreateModule(input modules.DataModuleInput, creator pixlUser.UserInfo) (modules.DataModuleSpecificVersionWire, error)
- func (e *ExpressionDB) DeleteExpression(expressionID string) error
- func (e *ExpressionDB) GetExpression(expressionID string, retrieveUpdatedUserInfo bool) (expressions.DataExpression, error)
- func (e *ExpressionDB) GetModule(moduleID string, version *modules.SemanticVersion, ...) (modules.DataModuleSpecificVersionWire, error)
- func (e *ExpressionDB) IsNotFoundError(err error) bool
- func (e *ExpressionDB) ListExpressions(userID string, includeShared bool, retrieveUpdatedUserInfo bool) (expressions.DataExpressionLookup, error)
- func (e *ExpressionDB) ListModules(retrieveUpdatedUserInfo bool) (modules.DataModuleWireLookup, error)
- func (e *ExpressionDB) StoreExpressionRecentRunStats(expressionID string, stats expressions.DataExpressionExecStats) error
- func (e *ExpressionDB) UpdateExpression(expressionID string, input expressions.DataExpressionInput, ...) (expressions.DataExpression, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExpressionDB ¶
type ExpressionDB struct { Svcs *services.APIServices Database *mongo.Database Expressions *mongo.Collection Modules *mongo.Collection ModuleVersions *mongo.Collection }
func MakeExpressionDB ¶
func MakeExpressionDB( envName string, svcs *services.APIServices, ) *ExpressionDB
func (*ExpressionDB) AddModuleVersion ¶
func (e *ExpressionDB) AddModuleVersion(moduleID string, input modules.DataModuleVersionInput) (modules.DataModuleSpecificVersionWire, error)
func (*ExpressionDB) CreateExpression ¶
func (e *ExpressionDB) CreateExpression(input expressions.DataExpressionInput, creator pixlUser.UserInfo, createShared bool) (expressions.DataExpression, error)
func (*ExpressionDB) CreateModule ¶
func (e *ExpressionDB) CreateModule( input modules.DataModuleInput, creator pixlUser.UserInfo, ) (modules.DataModuleSpecificVersionWire, error)
func (*ExpressionDB) DeleteExpression ¶
func (e *ExpressionDB) DeleteExpression(expressionID string) error
func (*ExpressionDB) GetExpression ¶
func (e *ExpressionDB) GetExpression(expressionID string, retrieveUpdatedUserInfo bool) (expressions.DataExpression, error)
func (*ExpressionDB) GetModule ¶
func (e *ExpressionDB) GetModule(moduleID string, version *modules.SemanticVersion, retrieveUpdatedUserInfo bool) (modules.DataModuleSpecificVersionWire, error)
func (*ExpressionDB) IsNotFoundError ¶
func (e *ExpressionDB) IsNotFoundError(err error) bool
func (*ExpressionDB) ListExpressions ¶
func (e *ExpressionDB) ListExpressions(userID string, includeShared bool, retrieveUpdatedUserInfo bool) (expressions.DataExpressionLookup, error)
func (*ExpressionDB) ListModules ¶
func (e *ExpressionDB) ListModules(retrieveUpdatedUserInfo bool) (modules.DataModuleWireLookup, error)
ListModules - Lists all modules, returning a map of Module ID->Module, which contains a list of all module versions (with their tags). Note, this does
func (*ExpressionDB) StoreExpressionRecentRunStats ¶
func (e *ExpressionDB) StoreExpressionRecentRunStats(expressionID string, stats expressions.DataExpressionExecStats) error
func (*ExpressionDB) UpdateExpression ¶
func (e *ExpressionDB) UpdateExpression( expressionID string, input expressions.DataExpressionInput, creator pixlUser.UserInfo, createdUnixTimeSec int64, isShared bool, existingSourceCode string, ) (expressions.DataExpression, error)
Replaces the existing expression with the new one This assumes a GetExpression was required already to validate user permissions to this expression, etc therefore the prevUnixTime should be available. This way we can preserve the creation time but set a new modified time now. Also now requires the existing expression shared and source code field!
Click to show internal directories.
Click to hide internal directories.