Documentation
¶
Index ¶
- type SystemMongoDriver
- func (m *SystemMongoDriver) AddATeamMemberToProject(ctx context.Context, req *models.TeamMemberAddRequest) error
- func (m *SystemMongoDriver) AddSystemUserMetaInfo(ctx context.Context, doc *types.DefaultDocumentStructure) (*types.DefaultDocumentStructure, error)
- func (m *SystemMongoDriver) AddTeamMetaInfo(ctx context.Context, docs []*models.SystemUser) ([]*models.SystemUser, error)
- func (m *SystemMongoDriver) AddWebhookToProject(ctx context.Context, doc *models.Webhook) (*models.Webhook, error)
- func (m *SystemMongoDriver) AssignProjectToOrganization(ctx context.Context, orgId, userId, projectId string) error
- func (m *SystemMongoDriver) AssignTeamToOrganization(ctx context.Context, orgId, userId, teamId string) error
- func (m *SystemMongoDriver) BlacklistAToken(ctx context.Context, token map[string]interface{}) error
- func (m *SystemMongoDriver) CheckProjectName(ctx context.Context, name string) error
- func (m *SystemMongoDriver) CheckProjectWithRoles(ctx context.Context, userId, projectId string) (*models.ProjectWithRoles, error)
- func (m *SystemMongoDriver) CheckTeamMemberExists(ctx context.Context, projectId string, memberID string) error
- func (m *SystemMongoDriver) CheckTokenBlacklisted(ctx context.Context, tokenId string) error
- func (m *SystemMongoDriver) CreateOrganization(ctx context.Context, org *models.Organization) (*models.Organization, error)
- func (m *SystemMongoDriver) CreateProject(ctx context.Context, userId string, project *models.Project) (*models.Project, error)
- func (m *SystemMongoDriver) CreateSystemUser(ctx context.Context, user *models.SystemUser) (*models.SystemUser, error)
- func (m *SystemMongoDriver) CreateTeam(ctx context.Context, team *models.Team) (*models.Team, error)
- func (m *SystemMongoDriver) DeleteProjectFromSystem(ctx context.Context, projectId string) error
- func (m *SystemMongoDriver) DeleteWebhook(ctx context.Context, projectId, hookId string) error
- func (m *SystemMongoDriver) FindOrganizationAdmin(ctx context.Context, orgId string) (*models.SystemUser, error)
- func (m *SystemMongoDriver) FindUserOrganizations(ctx context.Context, userId string) ([]*models.Organization, error)
- func (m *SystemMongoDriver) FindUserProjects(ctx context.Context, userId string) ([]*models.Project, error)
- func (m *SystemMongoDriver) FindUserProjectsWithRoles(ctx context.Context, userId string) ([]*models.ProjectWithRoles, error)
- func (m *SystemMongoDriver) FindUserTeams(ctx context.Context, userId string) ([]*models.Team, error)
- func (m *SystemMongoDriver) GetOrganizations(ctx context.Context, userId string) (*models.SearchResponse[models.Organization], error)
- func (m *SystemMongoDriver) GetProject(ctx context.Context, id string) (*models.Project, error)
- func (m *SystemMongoDriver) GetProjectTeams(ctx context.Context, projectId string) (*models.Team, error)
- func (m *SystemMongoDriver) GetProjects(ctx context.Context, keys []string) ([]*models.Project, error)
- func (m *SystemMongoDriver) GetSystemUser(ctx context.Context, id string) (*models.SystemUser, error)
- func (m *SystemMongoDriver) GetSystemUserByEmail(ctx context.Context, email string) (*models.SystemUser, error)
- func (m *SystemMongoDriver) GetSystemUsers(ctx context.Context, keys []string) ([]*models.SystemUser, error)
- func (m *SystemMongoDriver) GetTeams(ctx context.Context, userId string) ([]*models.Team, error)
- func (m *SystemMongoDriver) GetTeamsMembers(ctx context.Context, projectId string) ([]*models.SystemUser, error)
- func (m *SystemMongoDriver) GetWebHook(ctx context.Context, projectId, hookId string) (*models.Webhook, error)
- func (m *SystemMongoDriver) Ping() error
- func (m *SystemMongoDriver) RemoveATeamFromOrganization(ctx context.Context, orgId, userId, teamId string) error
- func (m *SystemMongoDriver) RemoveATeamMemberFromProject(ctx context.Context, projectId string, memberID string) error
- func (m *SystemMongoDriver) RemoveProjectFromOrganization(ctx context.Context, orgId, userId, projectId string) error
- func (m *SystemMongoDriver) RunMigration(ctx context.Context) error
- func (m *SystemMongoDriver) SaveAuditLog(ctx context.Context, auditLog *models.AuditLogs) error
- func (m *SystemMongoDriver) SaveRawData(ctx context.Context, collection string, data map[string]interface{}) error
- func (m *SystemMongoDriver) SearchAuditLogs(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.AuditLogs], error)
- func (m *SystemMongoDriver) SearchFunctions(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.ApitoFunction], error)
- func (m *SystemMongoDriver) SearchProjects(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Project], error)
- func (m *SystemMongoDriver) SearchResource(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[any], error)
- func (m *SystemMongoDriver) SearchUsers(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.SystemUser], error)
- func (m *SystemMongoDriver) SearchWebHooks(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Webhook], error)
- func (m *SystemMongoDriver) UpdateProject(ctx context.Context, project *models.Project, replace bool) error
- func (m *SystemMongoDriver) UpdateSystemUser(ctx context.Context, user *models.SystemUser, replace bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SystemMongoDriver ¶
type SystemMongoDriver struct { Client *mongo.Client Database *mongo.Database DriverCredential *models.DriverCredentials }
func GetMongoDriver ¶
func GetMongoDriver(driverCredentials *models.DriverCredentials) (*SystemMongoDriver, error)
GetMongoDriver creates a new MongoDB system driver instance
func (*SystemMongoDriver) AddATeamMemberToProject ¶
func (m *SystemMongoDriver) AddATeamMemberToProject(ctx context.Context, req *models.TeamMemberAddRequest) error
AddATeamMemberToProject adds a team member to a project using MongoDB
func (*SystemMongoDriver) AddSystemUserMetaInfo ¶
func (m *SystemMongoDriver) AddSystemUserMetaInfo(ctx context.Context, doc *types.DefaultDocumentStructure) (*types.DefaultDocumentStructure, error)
AddSystemUserMetaInfo adds metadata to a system user using MongoDB
func (*SystemMongoDriver) AddTeamMetaInfo ¶
func (m *SystemMongoDriver) AddTeamMetaInfo(ctx context.Context, docs []*models.SystemUser) ([]*models.SystemUser, error)
AddTeamMetaInfo adds metadata to team members using MongoDB
func (*SystemMongoDriver) AddWebhookToProject ¶
func (m *SystemMongoDriver) AddWebhookToProject(ctx context.Context, doc *models.Webhook) (*models.Webhook, error)
AddWebhookToProject adds a webhook to a project using MongoDB
func (*SystemMongoDriver) AssignProjectToOrganization ¶
func (m *SystemMongoDriver) AssignProjectToOrganization(ctx context.Context, orgId, userId, projectId string) error
AssignProjectToOrganization assigns a project to an organization using MongoDB
func (*SystemMongoDriver) AssignTeamToOrganization ¶
func (m *SystemMongoDriver) AssignTeamToOrganization(ctx context.Context, orgId, userId, teamId string) error
AssignTeamToOrganization assigns a team to an organization using MongoDB
func (*SystemMongoDriver) BlacklistAToken ¶
func (m *SystemMongoDriver) BlacklistAToken(ctx context.Context, token map[string]interface{}) error
BlacklistAToken adds a token to the blacklist using MongoDB
func (*SystemMongoDriver) CheckProjectName ¶
func (m *SystemMongoDriver) CheckProjectName(ctx context.Context, name string) error
CheckProjectName checks if a project name already exists using MongoDB
func (*SystemMongoDriver) CheckProjectWithRoles ¶
func (m *SystemMongoDriver) CheckProjectWithRoles(ctx context.Context, userId, projectId string) (*models.ProjectWithRoles, error)
CheckProjectWithRoles checks if a user belongs to a project and returns roles/permissions using MongoDB
func (*SystemMongoDriver) CheckTeamMemberExists ¶
func (m *SystemMongoDriver) CheckTeamMemberExists(ctx context.Context, projectId string, memberID string) error
CheckTeamMemberExists checks if a team member exists in a project using MongoDB
func (*SystemMongoDriver) CheckTokenBlacklisted ¶
func (m *SystemMongoDriver) CheckTokenBlacklisted(ctx context.Context, tokenId string) error
CheckTokenBlacklisted checks if a token is blacklisted using MongoDB
func (*SystemMongoDriver) CreateOrganization ¶
func (m *SystemMongoDriver) CreateOrganization(ctx context.Context, org *models.Organization) (*models.Organization, error)
CreateOrganization creates a new organization using MongoDB
func (*SystemMongoDriver) CreateProject ¶
func (m *SystemMongoDriver) CreateProject(ctx context.Context, userId string, project *models.Project) (*models.Project, error)
CreateProject creates a new project using MongoDB
func (*SystemMongoDriver) CreateSystemUser ¶
func (m *SystemMongoDriver) CreateSystemUser(ctx context.Context, user *models.SystemUser) (*models.SystemUser, error)
CreateSystemUser creates a new system user using MongoDB
func (*SystemMongoDriver) CreateTeam ¶
func (m *SystemMongoDriver) CreateTeam(ctx context.Context, team *models.Team) (*models.Team, error)
CreateTeam creates a new team using MongoDB
func (*SystemMongoDriver) DeleteProjectFromSystem ¶
func (m *SystemMongoDriver) DeleteProjectFromSystem(ctx context.Context, projectId string) error
DeleteProjectFromSystem deletes a project and all related data using MongoDB
func (*SystemMongoDriver) DeleteWebhook ¶
func (m *SystemMongoDriver) DeleteWebhook(ctx context.Context, projectId, hookId string) error
DeleteWebhook deletes a webhook using MongoDB
func (*SystemMongoDriver) FindOrganizationAdmin ¶
func (m *SystemMongoDriver) FindOrganizationAdmin(ctx context.Context, orgId string) (*models.SystemUser, error)
FindOrganizationAdmin retrieves the admin of an organization using MongoDB
func (*SystemMongoDriver) FindUserOrganizations ¶
func (m *SystemMongoDriver) FindUserOrganizations(ctx context.Context, userId string) ([]*models.Organization, error)
FindUserOrganizations retrieves all organizations for a given user using MongoDB
func (*SystemMongoDriver) FindUserProjects ¶
func (m *SystemMongoDriver) FindUserProjects(ctx context.Context, userId string) ([]*models.Project, error)
FindUserProjects retrieves all projects for a given user using MongoDB
func (*SystemMongoDriver) FindUserProjectsWithRoles ¶
func (m *SystemMongoDriver) FindUserProjectsWithRoles(ctx context.Context, userId string) ([]*models.ProjectWithRoles, error)
FindUserProjectsWithRoles retrieves user projects with their roles and permissions using MongoDB
func (*SystemMongoDriver) FindUserTeams ¶
func (m *SystemMongoDriver) FindUserTeams(ctx context.Context, userId string) ([]*models.Team, error)
FindUserTeams retrieves all teams for a given user using MongoDB
func (*SystemMongoDriver) GetOrganizations ¶
func (m *SystemMongoDriver) GetOrganizations(ctx context.Context, userId string) (*models.SearchResponse[models.Organization], error)
GetOrganizations retrieves organizations for a given user using MongoDB
func (*SystemMongoDriver) GetProject ¶
GetProject retrieves a project by ID using MongoDB
func (*SystemMongoDriver) GetProjectTeams ¶
func (m *SystemMongoDriver) GetProjectTeams(ctx context.Context, projectId string) (*models.Team, error)
GetProjectTeams retrieves team information for a project using MongoDB
func (*SystemMongoDriver) GetProjects ¶
func (m *SystemMongoDriver) GetProjects(ctx context.Context, keys []string) ([]*models.Project, error)
GetProjects retrieves multiple projects by their IDs using MongoDB
func (*SystemMongoDriver) GetSystemUser ¶
func (m *SystemMongoDriver) GetSystemUser(ctx context.Context, id string) (*models.SystemUser, error)
GetSystemUser retrieves a system user by ID using MongoDB
func (*SystemMongoDriver) GetSystemUserByEmail ¶
func (m *SystemMongoDriver) GetSystemUserByEmail(ctx context.Context, email string) (*models.SystemUser, error)
GetSystemUserByEmail retrieves a system user by email using MongoDB
func (*SystemMongoDriver) GetSystemUsers ¶
func (m *SystemMongoDriver) GetSystemUsers(ctx context.Context, keys []string) ([]*models.SystemUser, error)
GetSystemUsers retrieves multiple system users by their IDs using MongoDB
func (*SystemMongoDriver) GetTeamsMembers ¶
func (m *SystemMongoDriver) GetTeamsMembers(ctx context.Context, projectId string) ([]*models.SystemUser, error)
GetTeamsMembers retrieves team members for a project using MongoDB
func (*SystemMongoDriver) GetWebHook ¶
func (m *SystemMongoDriver) GetWebHook(ctx context.Context, projectId, hookId string) (*models.Webhook, error)
GetWebHook retrieves a specific webhook by ID using MongoDB
func (*SystemMongoDriver) Ping ¶ added in v1.0.7
func (m *SystemMongoDriver) Ping() error
func (*SystemMongoDriver) RemoveATeamFromOrganization ¶
func (m *SystemMongoDriver) RemoveATeamFromOrganization(ctx context.Context, orgId, userId, teamId string) error
RemoveATeamFromOrganization removes a team from an organization using MongoDB
func (*SystemMongoDriver) RemoveATeamMemberFromProject ¶
func (m *SystemMongoDriver) RemoveATeamMemberFromProject(ctx context.Context, projectId string, memberID string) error
RemoveATeamMemberFromProject removes a team member from a project using MongoDB
func (*SystemMongoDriver) RemoveProjectFromOrganization ¶
func (m *SystemMongoDriver) RemoveProjectFromOrganization(ctx context.Context, orgId, userId, projectId string) error
RemoveProjectFromOrganization removes a project from an organization using MongoDB
func (*SystemMongoDriver) RunMigration ¶
func (m *SystemMongoDriver) RunMigration(ctx context.Context) error
RunMigration runs the database migrations for MongoDB (creates necessary collections and indexes)
func (*SystemMongoDriver) SaveAuditLog ¶
SaveAuditLog saves an audit log entry using MongoDB
func (*SystemMongoDriver) SaveRawData ¶
func (m *SystemMongoDriver) SaveRawData(ctx context.Context, collection string, data map[string]interface{}) error
SaveRawData saves raw data using MongoDB for payment-related operations
func (*SystemMongoDriver) SearchAuditLogs ¶
func (m *SystemMongoDriver) SearchAuditLogs(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.AuditLogs], error)
SearchAuditLogs searches for audit logs based on common system parameters using MongoDB
func (*SystemMongoDriver) SearchFunctions ¶
func (m *SystemMongoDriver) SearchFunctions(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.ApitoFunction], error)
SearchFunctions searches for cloud functions in a project using MongoDB
func (*SystemMongoDriver) SearchProjects ¶
func (m *SystemMongoDriver) SearchProjects(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Project], error)
SearchProjects searches for projects based on common system parameters using MongoDB
func (*SystemMongoDriver) SearchResource ¶
func (m *SystemMongoDriver) SearchResource(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[any], error)
SearchResource searches for resources based on common system parameters using MongoDB
func (*SystemMongoDriver) SearchUsers ¶
func (m *SystemMongoDriver) SearchUsers(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.SystemUser], error)
SearchUsers searches for system users based on parameters using MongoDB
func (*SystemMongoDriver) SearchWebHooks ¶
func (m *SystemMongoDriver) SearchWebHooks(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Webhook], error)
SearchWebHooks searches for webhooks in a project using MongoDB
func (*SystemMongoDriver) UpdateProject ¶
func (m *SystemMongoDriver) UpdateProject(ctx context.Context, project *models.Project, replace bool) error
UpdateProject updates a project using MongoDB
func (*SystemMongoDriver) UpdateSystemUser ¶
func (m *SystemMongoDriver) UpdateSystemUser(ctx context.Context, user *models.SystemUser, replace bool) error
UpdateSystemUser updates a system user using MongoDB