Documentation
¶
Index ¶
- type MongoDriver
- func (m *MongoDriver) AddCollection(ctx context.Context, param *models.CommonSystemParams, ...) error
- func (m *MongoDriver) AddDocumentToProject(ctx context.Context, param *models.CommonSystemParams, ...) (interface{}, error)
- func (m *MongoDriver) AddFieldToModel(ctx context.Context, param *models.CommonSystemParams, isUpdate bool, ...) (*models.ModelType, error)
- func (m *MongoDriver) AddModel(ctx context.Context, project *models.Project, model *models.ModelType) (*models.ProjectSchema, error)
- func (m *MongoDriver) AddRelationFields(ctx context.Context, from *models.ConnectionType, to *models.ConnectionType) error
- func (m *MongoDriver) AddTeamMetaInfo(ctx context.Context, users []*models.SystemUser) ([]*models.SystemUser, error)
- func (m *MongoDriver) AggregateDocOfProject(ctx context.Context, param *models.CommonSystemParams) (interface{}, error)
- func (m *MongoDriver) AggregateDocOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
- func (m *MongoDriver) CheckCollectionExists(ctx context.Context, param *models.CommonSystemParams, ...) (bool, error)
- func (m *MongoDriver) CheckOneToOneRelationExists(ctx context.Context, param *models.ConnectDisconnectParam) (bool, error)
- func (m *MongoDriver) ConnectBuilder(ctx context.Context, param *models.CommonSystemParams) error
- func (m *MongoDriver) ConvertModel(ctx context.Context, project *models.Project, modelName string) error
- func (m *MongoDriver) CountDocOfProject(ctx context.Context, param *models.CommonSystemParams) (interface{}, error)
- func (m *MongoDriver) CountDocOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
- func (m *MongoDriver) CountMultiDocumentOfProject(ctx context.Context, param *models.CommonSystemParams, previewModel bool) (int, error)
- func (m *MongoDriver) CreateIndex(ctx context.Context, param *models.CommonSystemParams, fieldName string, ...) error
- func (m *MongoDriver) CreateRelation(ctx context.Context, projectId string, relation *models.EdgeRelation) error
- func (m *MongoDriver) DeleteDocumentFromProject(ctx context.Context, param *models.CommonSystemParams) error
- func (m *MongoDriver) DeleteDocumentRelation(ctx context.Context, param *models.CommonSystemParams) error
- func (m *MongoDriver) DeleteDocumentsFromProject(ctx context.Context, param *models.CommonSystemParams) error
- func (m *MongoDriver) DeleteProject(ctx context.Context, projectId string) error
- func (m *MongoDriver) DeleteRelation(ctx context.Context, param *models.ConnectDisconnectParam, id string) error
- func (m *MongoDriver) DeleteRelationDocuments(ctx context.Context, projectId string, from *models.ConnectionType, ...) error
- func (m *MongoDriver) DisconnectBuilder(ctx context.Context, param *models.CommonSystemParams) error
- func (m *MongoDriver) DropField(ctx context.Context, param *models.CommonSystemParams) error
- func (m *MongoDriver) DropIndex(ctx context.Context, param *models.CommonSystemParams, indexName string) error
- func (m *MongoDriver) DropModel(ctx context.Context, project *models.Project, modelName string) error
- func (m *MongoDriver) GetAllRelationDocumentsOfSingleDocument(ctx context.Context, from string, arg *models.CommonSystemParams) (interface{}, error)
- func (m *MongoDriver) GetLoggedInProjectUser(ctx context.Context, param *models.CommonSystemParams) (*types.DefaultDocumentStructure, error)
- func (m *MongoDriver) GetProject(ctx context.Context, id string) (*models.Project, error)
- func (m *MongoDriver) GetProjectUser(ctx context.Context, phone, email, projectId string) (*types.DefaultDocumentStructure, error)
- func (m *MongoDriver) GetProjectUsers(ctx context.Context, projectId string, keys []string) (map[string]*types.DefaultDocumentStructure, error)
- func (m *MongoDriver) GetRelationDocument(ctx context.Context, param *models.ConnectDisconnectParam) (*models.EdgeRelation, error)
- func (m *MongoDriver) GetRelationIds(ctx context.Context, param *models.ConnectDisconnectParam) ([]string, error)
- func (m *MongoDriver) GetSingleProjectDocument(ctx context.Context, param *models.CommonSystemParams) (*types.DefaultDocumentStructure, error)
- func (m *MongoDriver) GetSingleProjectDocumentBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
- func (m *MongoDriver) GetSingleProjectDocumentRevisions(ctx context.Context, param *models.CommonSystemParams) ([]*models.DocumentRevisionHistory, error)
- func (m *MongoDriver) GetSingleRawDocumentFromProject(ctx context.Context, param *models.CommonSystemParams) (interface{}, error)
- func (m *MongoDriver) GetWebHook(ctx context.Context, projectId, hookId string) (*models.Webhook, error)
- func (m *MongoDriver) NewInsertableRelations(ctx context.Context, param *models.ConnectDisconnectParam) ([]string, error)
- func (m *MongoDriver) QueryMultiDocumentOfProject(ctx context.Context, param *models.CommonSystemParams) ([]*types.DefaultDocumentStructure, error)
- func (m *MongoDriver) QueryMultiDocumentOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
- func (m *MongoDriver) RelationshipDataLoader(ctx context.Context, param *models.CommonSystemParams, ...) (interface{}, error)
- func (m *MongoDriver) RelationshipDataLoaderBytes(ctx context.Context, param *models.CommonSystemParams, ...) ([]byte, error)
- func (m *MongoDriver) RenameField(ctx context.Context, oldFieldName string, repeatedFieldGroup string, ...) error
- func (m *MongoDriver) RenameModel(ctx context.Context, project *models.Project, modelName, newName string) error
- func (m *MongoDriver) SearchFunctions(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.ApitoFunction], error)
- func (m *MongoDriver) SearchWebHooks(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Webhook], error)
- func (m *MongoDriver) TransferProject(ctx context.Context, userId, from, to string) error
- func (m *MongoDriver) UpdateDocumentOfProject(ctx context.Context, param *models.CommonSystemParams, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoDriver ¶
type MongoDriver struct { Client *mongo.Client Database *mongo.Database DriverCredential *models.DriverCredentials }
func GetMongoDriver ¶
func GetMongoDriver(driverCredentials *models.DriverCredentials) (*MongoDriver, error)
func (*MongoDriver) AddCollection ¶
func (m *MongoDriver) AddCollection(ctx context.Context, param *models.CommonSystemParams, isRelationCollection bool) error
AddCollection adds a new collection to the project
func (*MongoDriver) AddDocumentToProject ¶
func (m *MongoDriver) AddDocumentToProject(ctx context.Context, param *models.CommonSystemParams, doc *types.DefaultDocumentStructure) (interface{}, error)
AddDocumentToProject adds a document to a project
func (*MongoDriver) AddFieldToModel ¶
func (m *MongoDriver) AddFieldToModel(ctx context.Context, param *models.CommonSystemParams, isUpdate bool, repeatedGroupIdentifier string) (*models.ModelType, error)
AddFieldToModel adds a new field to an existing model in the project.
func (*MongoDriver) AddModel ¶
func (m *MongoDriver) AddModel(ctx context.Context, project *models.Project, model *models.ModelType) (*models.ProjectSchema, error)
func (*MongoDriver) AddRelationFields ¶
func (m *MongoDriver) AddRelationFields(ctx context.Context, from *models.ConnectionType, to *models.ConnectionType) error
func (*MongoDriver) AddTeamMetaInfo ¶
func (m *MongoDriver) AddTeamMetaInfo(ctx context.Context, users []*models.SystemUser) ([]*models.SystemUser, error)
func (*MongoDriver) AggregateDocOfProject ¶
func (m *MongoDriver) AggregateDocOfProject(ctx context.Context, param *models.CommonSystemParams) (interface{}, error)
func (*MongoDriver) AggregateDocOfProjectBytes ¶
func (m *MongoDriver) AggregateDocOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
func (*MongoDriver) CheckCollectionExists ¶
func (m *MongoDriver) CheckCollectionExists(ctx context.Context, param *models.CommonSystemParams, isRelationCollection bool) (bool, error)
CheckCollectionExists checks if a collection exists in the project
func (*MongoDriver) CheckOneToOneRelationExists ¶
func (m *MongoDriver) CheckOneToOneRelationExists(ctx context.Context, param *models.ConnectDisconnectParam) (bool, error)
CheckOneToOneRelationExists checks if a one-to-one relation exists in the project.
func (*MongoDriver) ConnectBuilder ¶
func (m *MongoDriver) ConnectBuilder(ctx context.Context, param *models.CommonSystemParams) error
ConnectBuilder connects a builder to the project.
func (*MongoDriver) ConvertModel ¶
func (*MongoDriver) CountDocOfProject ¶
func (m *MongoDriver) CountDocOfProject(ctx context.Context, param *models.CommonSystemParams) (interface{}, error)
func (*MongoDriver) CountDocOfProjectBytes ¶
func (m *MongoDriver) CountDocOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
func (*MongoDriver) CountMultiDocumentOfProject ¶
func (m *MongoDriver) CountMultiDocumentOfProject(ctx context.Context, param *models.CommonSystemParams, previewModel bool) (int, error)
CountMultiDocumentOfProject counts documents in a project
func (*MongoDriver) CreateIndex ¶
func (m *MongoDriver) CreateIndex(ctx context.Context, param *models.CommonSystemParams, fieldName string, repeatedGroupIdentifier string) error
func (*MongoDriver) CreateRelation ¶
func (m *MongoDriver) CreateRelation(ctx context.Context, projectId string, relation *models.EdgeRelation) error
func (*MongoDriver) DeleteDocumentFromProject ¶
func (m *MongoDriver) DeleteDocumentFromProject(ctx context.Context, param *models.CommonSystemParams) error
DeleteDocumentFromProject deletes a document from a project
func (*MongoDriver) DeleteDocumentRelation ¶
func (m *MongoDriver) DeleteDocumentRelation(ctx context.Context, param *models.CommonSystemParams) error
DeleteDocumentRelation deletes all relations or data in pivot tables from the project.
func (*MongoDriver) DeleteDocumentsFromProject ¶
func (m *MongoDriver) DeleteDocumentsFromProject(ctx context.Context, param *models.CommonSystemParams) error
func (*MongoDriver) DeleteProject ¶
func (m *MongoDriver) DeleteProject(ctx context.Context, projectId string) error
DeleteProject implements the deletion of a project
func (*MongoDriver) DeleteRelation ¶
func (m *MongoDriver) DeleteRelation(ctx context.Context, param *models.ConnectDisconnectParam, id string) error
func (*MongoDriver) DeleteRelationDocuments ¶
func (m *MongoDriver) DeleteRelationDocuments(ctx context.Context, projectId string, from *models.ConnectionType, to *models.ConnectionType) error
func (*MongoDriver) DisconnectBuilder ¶
func (m *MongoDriver) DisconnectBuilder(ctx context.Context, param *models.CommonSystemParams) error
DisconnectBuilder disconnects a builder from the project.
func (*MongoDriver) DropField ¶
func (m *MongoDriver) DropField(ctx context.Context, param *models.CommonSystemParams) error
func (*MongoDriver) DropIndex ¶
func (m *MongoDriver) DropIndex(ctx context.Context, param *models.CommonSystemParams, indexName string) error
func (*MongoDriver) GetAllRelationDocumentsOfSingleDocument ¶
func (m *MongoDriver) GetAllRelationDocumentsOfSingleDocument(ctx context.Context, from string, arg *models.CommonSystemParams) (interface{}, error)
GetAllRelationDocumentsOfSingleDocument retrieves all relation data of a single document by ID.
func (*MongoDriver) GetLoggedInProjectUser ¶
func (m *MongoDriver) GetLoggedInProjectUser(ctx context.Context, param *models.CommonSystemParams) (*types.DefaultDocumentStructure, error)
GetLoggedInProjectUser retrieves the logged-in user profile for the project
func (*MongoDriver) GetProject ¶
GetProject retrieves a project by ID
func (*MongoDriver) GetProjectUser ¶
func (m *MongoDriver) GetProjectUser(ctx context.Context, phone, email, projectId string) (*types.DefaultDocumentStructure, error)
GetProjectUser retrieves a user profile by phone, email, and project ID
func (*MongoDriver) GetProjectUsers ¶
func (m *MongoDriver) GetProjectUsers(ctx context.Context, projectId string, keys []string) (map[string]*types.DefaultDocumentStructure, error)
GetProjectUsers retrieves metadata for multiple users in the project
func (*MongoDriver) GetRelationDocument ¶
func (m *MongoDriver) GetRelationDocument(ctx context.Context, param *models.ConnectDisconnectParam) (*models.EdgeRelation, error)
func (*MongoDriver) GetRelationIds ¶
func (m *MongoDriver) GetRelationIds(ctx context.Context, param *models.ConnectDisconnectParam) ([]string, error)
GetRelationIds retrieves the IDs of every document related to a document.
func (*MongoDriver) GetSingleProjectDocument ¶
func (m *MongoDriver) GetSingleProjectDocument(ctx context.Context, param *models.CommonSystemParams) (*types.DefaultDocumentStructure, error)
GetSingleProjectDocument gets a single document from a project
func (*MongoDriver) GetSingleProjectDocumentBytes ¶
func (m *MongoDriver) GetSingleProjectDocumentBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
GetSingleProjectDocumentBytes retrieves a single project document by ID as bytes.
func (*MongoDriver) GetSingleProjectDocumentRevisions ¶
func (m *MongoDriver) GetSingleProjectDocumentRevisions(ctx context.Context, param *models.CommonSystemParams) ([]*models.DocumentRevisionHistory, error)
GetSingleProjectDocumentRevisions retrieves the revision history of a single project document by ID.
func (*MongoDriver) GetSingleRawDocumentFromProject ¶
func (m *MongoDriver) GetSingleRawDocumentFromProject(ctx context.Context, param *models.CommonSystemParams) (interface{}, error)
func (*MongoDriver) GetWebHook ¶
func (*MongoDriver) NewInsertableRelations ¶
func (m *MongoDriver) NewInsertableRelations(ctx context.Context, param *models.ConnectDisconnectParam) ([]string, error)
NewInsertableRelations retrieves new insertable relations in the project.
func (*MongoDriver) QueryMultiDocumentOfProject ¶
func (m *MongoDriver) QueryMultiDocumentOfProject(ctx context.Context, param *models.CommonSystemParams) ([]*types.DefaultDocumentStructure, error)
QueryMultiDocumentOfProject retrieves multiple documents from a project
func (*MongoDriver) QueryMultiDocumentOfProjectBytes ¶
func (m *MongoDriver) QueryMultiDocumentOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
func (*MongoDriver) RelationshipDataLoader ¶
func (m *MongoDriver) RelationshipDataLoader(ctx context.Context, param *models.CommonSystemParams, connection map[string]interface{}) (interface{}, error)
RelationshipDataLoader loads relationship data for the project.
func (*MongoDriver) RelationshipDataLoaderBytes ¶
func (m *MongoDriver) RelationshipDataLoaderBytes(ctx context.Context, param *models.CommonSystemParams, connection map[string]interface{}) ([]byte, error)
RelationshipDataLoaderBytes loads relationship data for the project and returns it as bytes.
func (*MongoDriver) RenameField ¶
func (m *MongoDriver) RenameField(ctx context.Context, oldFieldName string, repeatedFieldGroup string, param *models.CommonSystemParams) error
func (*MongoDriver) RenameModel ¶
func (*MongoDriver) SearchFunctions ¶
func (m *MongoDriver) SearchFunctions(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.ApitoFunction], error)
func (*MongoDriver) SearchWebHooks ¶
func (m *MongoDriver) SearchWebHooks(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Webhook], error)
func (*MongoDriver) TransferProject ¶
func (m *MongoDriver) TransferProject(ctx context.Context, userId, from, to string) error
TransferProject transfers a project from one user to another
func (*MongoDriver) UpdateDocumentOfProject ¶
func (m *MongoDriver) UpdateDocumentOfProject(ctx context.Context, param *models.CommonSystemParams, doc *types.DefaultDocumentStructure, replace bool) error
UpdateDocumentOfProject updates a document in a project