Documentation
¶
Index ¶
- type FirestoreDriver
- func (f *FirestoreDriver) AddSystemUserMetaInfo(ctx context.Context, doc *types.DefaultDocumentStructure) (*types.DefaultDocumentStructure, error)
- func (f *FirestoreDriver) AddTeamMetaInfo(ctx context.Context, docs []*models.SystemUser) ([]*models.SystemUser, error)
- func (f *FirestoreDriver) AddWebhookToProject(ctx context.Context, doc *models.Webhook) (*models.Webhook, error)
- func (f *FirestoreDriver) BlacklistAToken(ctx context.Context, token map[string]interface{}) error
- func (f *FirestoreDriver) CheckProjectName(ctx context.Context, name string) error
- func (f *FirestoreDriver) CheckTeamMemberExists(ctx context.Context, projectId string, memberID string) error
- func (f *FirestoreDriver) CheckTokenBlacklisted(ctx context.Context, tokenId string) error
- func (f *FirestoreDriver) CreateProject(ctx context.Context, userId string, project *models.Project) (*models.Project, error)
- func (f *FirestoreDriver) CreateSystemUser(ctx context.Context, user *models.SystemUser) (*models.SystemUser, error)
- func (f *FirestoreDriver) DeleteProjectFromSystem(ctx context.Context, projectId string) error
- func (f *FirestoreDriver) DeleteWebhook(ctx context.Context, projectId, hookId string) error
- func (f *FirestoreDriver) FindOrganizationAdmin(ctx context.Context, orgId string) (*models.SystemUser, error)
- func (f *FirestoreDriver) FindUserProjectsWithRoles(ctx context.Context, userId string) ([]*models.ProjectWithRoles, error)
- func (f *FirestoreDriver) GetOrganizations(ctx context.Context, userId string) (*models.SearchResponse[models.Organization], error)
- func (f *FirestoreDriver) GetProject(ctx context.Context, id string) (*models.Project, error)
- func (f *FirestoreDriver) GetSystemUser(ctx context.Context, id string) (*models.SystemUser, error)
- func (f *FirestoreDriver) GetSystemUserByEmail(ctx context.Context, email string) (*models.SystemUser, error)
- func (f *FirestoreDriver) GetTeams(ctx context.Context, userId string) ([]*models.Team, error)
- func (f *FirestoreDriver) GetTeamsMembers(ctx context.Context, projectId string) ([]*models.SystemUser, error)
- func (f *FirestoreDriver) GetWebHook(ctx context.Context, projectId, hookId string) (*models.Webhook, error)
- func (f *FirestoreDriver) RemoveATeamMemberFromProject(ctx context.Context, projectId string, memberID string) error
- func (f *FirestoreDriver) RunMigration(ctx context.Context) error
- func (f *FirestoreDriver) SaveAuditLog(ctx context.Context, auditLog *models.AuditLogs) error
- func (f *FirestoreDriver) SaveRawData(ctx context.Context, collection string, data map[string]interface{}) error
- func (f *FirestoreDriver) SearchAuditLogs(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.AuditLogs], error)
- func (f *FirestoreDriver) SearchFunctions(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.ApitoFunction], error)
- func (f *FirestoreDriver) SearchProjects(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Project], error)
- func (f *FirestoreDriver) SearchResource(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[any], error)
- func (f *FirestoreDriver) SearchUsers(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.SystemUser], error)
- func (f *FirestoreDriver) SearchWebHooks(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Webhook], error)
- func (f *FirestoreDriver) UpdateProject(ctx context.Context, project *models.Project, replace bool) error
- func (f *FirestoreDriver) 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 FirestoreDriver ¶
type FirestoreDriver struct { Client *firestore.Client DriverCredential *models.DriverCredentials }
func GetFirestoreDriver ¶
func GetFirestoreDriver(driverCredentials *models.DriverCredentials) (*FirestoreDriver, error)
GetFirestoreDriver creates a new Firestore system driver instance
func (*FirestoreDriver) AddSystemUserMetaInfo ¶
func (f *FirestoreDriver) AddSystemUserMetaInfo(ctx context.Context, doc *types.DefaultDocumentStructure) (*types.DefaultDocumentStructure, error)
AddSystemUserMetaInfo adds metadata to a system user using Firestore
func (*FirestoreDriver) AddTeamMetaInfo ¶
func (f *FirestoreDriver) AddTeamMetaInfo(ctx context.Context, docs []*models.SystemUser) ([]*models.SystemUser, error)
AddTeamMetaInfo adds metadata to team members using Firestore
func (*FirestoreDriver) AddWebhookToProject ¶
func (f *FirestoreDriver) AddWebhookToProject(ctx context.Context, doc *models.Webhook) (*models.Webhook, error)
AddWebhookToProject adds a webhook to a project using Firestore
func (*FirestoreDriver) BlacklistAToken ¶
func (f *FirestoreDriver) BlacklistAToken(ctx context.Context, token map[string]interface{}) error
BlacklistAToken adds a token to the blacklist using Firestore
func (*FirestoreDriver) CheckProjectName ¶
func (f *FirestoreDriver) CheckProjectName(ctx context.Context, name string) error
CheckProjectName checks if a project name already exists using Firestore
func (*FirestoreDriver) CheckTeamMemberExists ¶
func (f *FirestoreDriver) CheckTeamMemberExists(ctx context.Context, projectId string, memberID string) error
CheckTeamMemberExists checks if a team member exists in a project using Firestore
func (*FirestoreDriver) CheckTokenBlacklisted ¶
func (f *FirestoreDriver) CheckTokenBlacklisted(ctx context.Context, tokenId string) error
CheckTokenBlacklisted checks if a token is blacklisted using Firestore
func (*FirestoreDriver) CreateProject ¶
func (f *FirestoreDriver) CreateProject(ctx context.Context, userId string, project *models.Project) (*models.Project, error)
CreateProject creates a new project using Firestore
func (*FirestoreDriver) CreateSystemUser ¶
func (f *FirestoreDriver) CreateSystemUser(ctx context.Context, user *models.SystemUser) (*models.SystemUser, error)
CreateSystemUser creates a new system user using Firestore
func (*FirestoreDriver) DeleteProjectFromSystem ¶
func (f *FirestoreDriver) DeleteProjectFromSystem(ctx context.Context, projectId string) error
DeleteProjectFromSystem deletes a project and all related data using Firestore
func (*FirestoreDriver) DeleteWebhook ¶
func (f *FirestoreDriver) DeleteWebhook(ctx context.Context, projectId, hookId string) error
DeleteWebhook deletes a webhook using Firestore
func (*FirestoreDriver) FindOrganizationAdmin ¶
func (f *FirestoreDriver) FindOrganizationAdmin(ctx context.Context, orgId string) (*models.SystemUser, error)
FindOrganizationAdmin retrieves the admin of an organization using Firestore
func (*FirestoreDriver) FindUserProjectsWithRoles ¶
func (f *FirestoreDriver) FindUserProjectsWithRoles(ctx context.Context, userId string) ([]*models.ProjectWithRoles, error)
FindUserProjectsWithRoles retrieves user projects with their roles and permissions using Firestore
func (*FirestoreDriver) GetOrganizations ¶
func (f *FirestoreDriver) GetOrganizations(ctx context.Context, userId string) (*models.SearchResponse[models.Organization], error)
GetOrganizations retrieves organizations for a given user using Firestore
func (*FirestoreDriver) GetProject ¶
GetProject retrieves a project by ID using Firestore
func (*FirestoreDriver) GetSystemUser ¶
func (f *FirestoreDriver) GetSystemUser(ctx context.Context, id string) (*models.SystemUser, error)
GetSystemUser retrieves a system user by ID using Firestore
func (*FirestoreDriver) GetSystemUserByEmail ¶
func (f *FirestoreDriver) GetSystemUserByEmail(ctx context.Context, email string) (*models.SystemUser, error)
GetSystemUserByEmail retrieves a system user by email using Firestore
func (*FirestoreDriver) GetTeamsMembers ¶
func (f *FirestoreDriver) GetTeamsMembers(ctx context.Context, projectId string) ([]*models.SystemUser, error)
GetTeamsMembers retrieves team members for a project using Firestore
func (*FirestoreDriver) GetWebHook ¶
func (f *FirestoreDriver) GetWebHook(ctx context.Context, projectId, hookId string) (*models.Webhook, error)
GetWebHook retrieves a specific webhook by ID using Firestore
func (*FirestoreDriver) RemoveATeamMemberFromProject ¶
func (f *FirestoreDriver) RemoveATeamMemberFromProject(ctx context.Context, projectId string, memberID string) error
RemoveATeamMemberFromProject removes a team member from a project using Firestore
func (*FirestoreDriver) RunMigration ¶
func (f *FirestoreDriver) RunMigration(ctx context.Context) error
RunMigration runs the database migrations for Firestore (creates necessary indexes)
func (*FirestoreDriver) SaveAuditLog ¶
SaveAuditLog saves an audit log entry using Firestore
func (*FirestoreDriver) SaveRawData ¶
func (f *FirestoreDriver) SaveRawData(ctx context.Context, collection string, data map[string]interface{}) error
SaveRawData saves raw data using Firestore for payment-related operations
func (*FirestoreDriver) SearchAuditLogs ¶
func (f *FirestoreDriver) SearchAuditLogs(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.AuditLogs], error)
SearchAuditLogs searches for audit logs based on common system parameters using Firestore
func (*FirestoreDriver) SearchFunctions ¶
func (f *FirestoreDriver) SearchFunctions(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.ApitoFunction], error)
SearchFunctions searches for cloud functions in a project using Firestore
func (*FirestoreDriver) SearchProjects ¶
func (f *FirestoreDriver) SearchProjects(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Project], error)
SearchProjects searches for projects based on common system parameters using Firestore
func (*FirestoreDriver) SearchResource ¶
func (f *FirestoreDriver) SearchResource(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[any], error)
SearchResource searches for resources based on common system parameters using Firestore
func (*FirestoreDriver) SearchUsers ¶
func (f *FirestoreDriver) SearchUsers(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.SystemUser], error)
SearchUsers searches for system users based on parameters using Firestore
func (*FirestoreDriver) SearchWebHooks ¶
func (f *FirestoreDriver) SearchWebHooks(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Webhook], error)
SearchWebHooks searches for webhooks in a project using Firestore
func (*FirestoreDriver) UpdateProject ¶
func (f *FirestoreDriver) UpdateProject(ctx context.Context, project *models.Project, replace bool) error
UpdateProject updates a project using Firestore
func (*FirestoreDriver) UpdateSystemUser ¶
func (f *FirestoreDriver) UpdateSystemUser(ctx context.Context, user *models.SystemUser, replace bool) error
UpdateSystemUser updates a system user using Firestore