firestore

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2025 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

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

func (f *FirestoreDriver) GetProject(ctx context.Context, id string) (*models.Project, error)

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) GetTeams

func (f *FirestoreDriver) GetTeams(ctx context.Context, userId string) ([]*models.Team, error)

GetTeams retrieves teams for a given user 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

func (f *FirestoreDriver) SaveAuditLog(ctx context.Context, auditLog *models.AuditLogs) error

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

SearchAuditLogs searches for audit logs based on common system parameters using Firestore

func (*FirestoreDriver) SearchFunctions

SearchFunctions searches for cloud functions in a project using Firestore

func (*FirestoreDriver) SearchProjects

SearchProjects searches for projects based on common system parameters using Firestore

func (*FirestoreDriver) SearchResource

SearchResource searches for resources based on common system parameters using Firestore

func (*FirestoreDriver) SearchUsers

SearchUsers searches for system users based on parameters using Firestore

func (*FirestoreDriver) SearchWebHooks

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL