Documentation
¶
Index ¶
- type PostgreSQLDriver
- func (p *PostgreSQLDriver) AddATeamMemberToProject(ctx context.Context, req *models.TeamMemberAddRequest) error
- func (p *PostgreSQLDriver) AddSystemUserMetaInfo(ctx context.Context, doc *types.DefaultDocumentStructure) (*types.DefaultDocumentStructure, error)
- func (p *PostgreSQLDriver) AddTeamMetaInfo(ctx context.Context, docs []*models.SystemUser) ([]*models.SystemUser, error)
- func (p *PostgreSQLDriver) AddWebhookToProject(ctx context.Context, doc *models.Webhook) (*models.Webhook, error)
- func (p *PostgreSQLDriver) AssignProjectToOrganization(ctx context.Context, orgId, userId, projectId string) error
- func (p *PostgreSQLDriver) AssignTeamToOrganization(ctx context.Context, orgId, userId, teamId string) error
- func (p *PostgreSQLDriver) BlacklistAToken(ctx context.Context, token map[string]interface{}) error
- func (p *PostgreSQLDriver) CheckProjectName(ctx context.Context, name string) error
- func (p *PostgreSQLDriver) CheckProjectWithRoles(ctx context.Context, userId, projectId string) (*models.ProjectWithRoles, error)
- func (p *PostgreSQLDriver) CheckTeamMemberExists(ctx context.Context, projectId string, memberID string) error
- func (p *PostgreSQLDriver) CheckTokenBlacklisted(ctx context.Context, tokenId string) error
- func (p *PostgreSQLDriver) CreateOrganization(ctx context.Context, org *models.Organization) (*models.Organization, error)
- func (p *PostgreSQLDriver) CreateProject(ctx context.Context, userId string, project *models.Project) (*models.Project, error)
- func (p *PostgreSQLDriver) CreateSystemUser(ctx context.Context, user *models.SystemUser) (*models.SystemUser, error)
- func (p *PostgreSQLDriver) CreateTeam(ctx context.Context, team *models.Team) (*models.Team, error)
- func (p *PostgreSQLDriver) DeleteProjectFromSystem(ctx context.Context, projectId string) error
- func (p *PostgreSQLDriver) DeleteWebhook(ctx context.Context, projectId, hookId string) error
- func (p *PostgreSQLDriver) FindOrganizationAdmin(ctx context.Context, orgId string) (*models.SystemUser, error)
- func (p *PostgreSQLDriver) FindUserOrganizations(ctx context.Context, userId string) ([]*models.Organization, error)
- func (p *PostgreSQLDriver) FindUserProjects(ctx context.Context, userId string) ([]*models.Project, error)
- func (p *PostgreSQLDriver) FindUserProjectsWithRoles(ctx context.Context, userId string) ([]*models.ProjectWithRoles, error)
- func (p *PostgreSQLDriver) FindUserTeams(ctx context.Context, userId string) ([]*models.Team, error)
- func (p *PostgreSQLDriver) GetOrganizations(ctx context.Context, userId string) (*models.SearchResponse[models.Organization], error)
- func (p *PostgreSQLDriver) GetProject(ctx context.Context, id string) (*models.Project, error)
- func (p *PostgreSQLDriver) GetProjectTeams(ctx context.Context, projectId string) (*models.Team, error)
- func (p *PostgreSQLDriver) GetProjectWithRolesAndPermission(ctx context.Context, userId string) ([]*models.ProjectWithRoles, error)
- func (p *PostgreSQLDriver) GetProjects(ctx context.Context, keys []string) ([]*models.Project, error)
- func (p *PostgreSQLDriver) GetSystemUser(ctx context.Context, id string) (*models.SystemUser, error)
- func (p *PostgreSQLDriver) GetSystemUserByEmail(ctx context.Context, email string) (*models.SystemUser, error)
- func (p *PostgreSQLDriver) GetSystemUsers(ctx context.Context, keys []string) ([]*models.SystemUser, error)
- func (p *PostgreSQLDriver) GetTeams(ctx context.Context, userId string) ([]*models.Team, error)
- func (p *PostgreSQLDriver) GetTeamsMembers(ctx context.Context, projectId string) ([]*models.SystemUser, error)
- func (p *PostgreSQLDriver) GetWebHook(ctx context.Context, projectId, hookId string) (*models.Webhook, error)
- func (p *PostgreSQLDriver) ListAllProjects(ctx context.Context, userId string) ([]*models.Project, error)
- func (p *PostgreSQLDriver) ListAllUsers(ctx context.Context) ([]*models.SystemUser, error)
- func (p *PostgreSQLDriver) ListTeams(ctx context.Context, projectId string) ([]*models.SystemUser, error)
- func (p *PostgreSQLDriver) RemoveATeamFromOrganization(ctx context.Context, orgId, userId, teamId string) error
- func (p *PostgreSQLDriver) RemoveATeamMemberFromProject(ctx context.Context, projectId string, memberID string) error
- func (p *PostgreSQLDriver) RemoveProjectFromOrganization(ctx context.Context, orgId, userId, projectId string) error
- func (p *PostgreSQLDriver) RunMigration(ctx context.Context) error
- func (p *PostgreSQLDriver) SaveAuditLog(ctx context.Context, auditLog *models.AuditLogs) error
- func (p *PostgreSQLDriver) SaveRawData(ctx context.Context, collection string, data map[string]interface{}) error
- func (p *PostgreSQLDriver) SearchAuditLogs(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.AuditLogs], error)
- func (p *PostgreSQLDriver) SearchFunctions(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.ApitoFunction], error)
- func (p *PostgreSQLDriver) SearchProjects(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Project], error)
- func (p *PostgreSQLDriver) SearchResource(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[any], error)
- func (p *PostgreSQLDriver) SearchUsers(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.SystemUser], error)
- func (p *PostgreSQLDriver) SearchWebHooks(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Webhook], error)
- func (p *PostgreSQLDriver) UpdateProject(ctx context.Context, project *models.Project, replace bool) error
- func (p *PostgreSQLDriver) 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 PostgreSQLDriver ¶
type PostgreSQLDriver struct { ORM *bun.DB DriverCredential *models.DriverCredentials }
func GetSystemSQLDriver ¶
func GetSystemSQLDriver(driverCredentials *models.DriverCredentials) (*PostgreSQLDriver, error)
func (*PostgreSQLDriver) AddATeamMemberToProject ¶
func (p *PostgreSQLDriver) AddATeamMemberToProject(ctx context.Context, req *models.TeamMemberAddRequest) error
AddATeamMemberToProject adds a team member to a project using SQL
func (*PostgreSQLDriver) AddSystemUserMetaInfo ¶
func (p *PostgreSQLDriver) AddSystemUserMetaInfo(ctx context.Context, doc *types.DefaultDocumentStructure) (*types.DefaultDocumentStructure, error)
AddSystemUserMetaInfo adds metadata to a system user using SQL
func (*PostgreSQLDriver) AddTeamMetaInfo ¶
func (p *PostgreSQLDriver) AddTeamMetaInfo(ctx context.Context, docs []*models.SystemUser) ([]*models.SystemUser, error)
AddTeamMetaInfo adds metadata to team members using SQL
func (*PostgreSQLDriver) AddWebhookToProject ¶
func (p *PostgreSQLDriver) AddWebhookToProject(ctx context.Context, doc *models.Webhook) (*models.Webhook, error)
AddWebhookToProject adds a webhook to a project using SQL
func (*PostgreSQLDriver) AssignProjectToOrganization ¶
func (p *PostgreSQLDriver) AssignProjectToOrganization(ctx context.Context, orgId, userId, projectId string) error
AssignProjectToOrganization assigns a project to an organization using SQL
func (*PostgreSQLDriver) AssignTeamToOrganization ¶
func (p *PostgreSQLDriver) AssignTeamToOrganization(ctx context.Context, orgId, userId, teamId string) error
AssignTeamToOrganization assigns a team to an organization using SQL
func (*PostgreSQLDriver) BlacklistAToken ¶
func (p *PostgreSQLDriver) BlacklistAToken(ctx context.Context, token map[string]interface{}) error
BlacklistAToken adds a token to the blacklist using SQL
func (*PostgreSQLDriver) CheckProjectName ¶
func (p *PostgreSQLDriver) CheckProjectName(ctx context.Context, name string) error
CheckProjectName checks if a project name already exists using SQL
func (*PostgreSQLDriver) CheckProjectWithRoles ¶
func (p *PostgreSQLDriver) CheckProjectWithRoles(ctx context.Context, userId, projectId string) (*models.ProjectWithRoles, error)
CheckProjectWithRoles checks if a user belongs to a project and returns roles/permissions using SQL
func (*PostgreSQLDriver) CheckTeamMemberExists ¶
func (p *PostgreSQLDriver) CheckTeamMemberExists(ctx context.Context, projectId string, memberID string) error
CheckTeamMemberExists checks if a team member exists in a project using SQL
func (*PostgreSQLDriver) CheckTokenBlacklisted ¶
func (p *PostgreSQLDriver) CheckTokenBlacklisted(ctx context.Context, tokenId string) error
CheckTokenBlacklisted checks if a token is blacklisted using SQL
func (*PostgreSQLDriver) CreateOrganization ¶
func (p *PostgreSQLDriver) CreateOrganization(ctx context.Context, org *models.Organization) (*models.Organization, error)
CreateOrganization creates a new organization using SQL
func (*PostgreSQLDriver) CreateProject ¶
func (p *PostgreSQLDriver) CreateProject(ctx context.Context, userId string, project *models.Project) (*models.Project, error)
CreateProject creates a new project using SQL
func (*PostgreSQLDriver) CreateSystemUser ¶
func (p *PostgreSQLDriver) CreateSystemUser(ctx context.Context, user *models.SystemUser) (*models.SystemUser, error)
CreateSystemUser creates a new system user using SQL
func (*PostgreSQLDriver) CreateTeam ¶
CreateTeam creates a new team using SQL
func (*PostgreSQLDriver) DeleteProjectFromSystem ¶
func (p *PostgreSQLDriver) DeleteProjectFromSystem(ctx context.Context, projectId string) error
DeleteProjectFromSystem deletes a project and all related data using SQL
func (*PostgreSQLDriver) DeleteWebhook ¶
func (p *PostgreSQLDriver) DeleteWebhook(ctx context.Context, projectId, hookId string) error
DeleteWebhook deletes a webhook using SQL
func (*PostgreSQLDriver) FindOrganizationAdmin ¶
func (p *PostgreSQLDriver) FindOrganizationAdmin(ctx context.Context, orgId string) (*models.SystemUser, error)
FindOrganizationAdmin retrieves the admin of an organization using SQL
func (*PostgreSQLDriver) FindUserOrganizations ¶
func (p *PostgreSQLDriver) FindUserOrganizations(ctx context.Context, userId string) ([]*models.Organization, error)
FindUserOrganizations retrieves all organizations for a given user using SQL
func (*PostgreSQLDriver) FindUserProjects ¶
func (p *PostgreSQLDriver) FindUserProjects(ctx context.Context, userId string) ([]*models.Project, error)
FindUserProjects retrieves all projects for a given user using SQL
func (*PostgreSQLDriver) FindUserProjectsWithRoles ¶
func (p *PostgreSQLDriver) FindUserProjectsWithRoles(ctx context.Context, userId string) ([]*models.ProjectWithRoles, error)
FindUserProjectsWithRoles retrieves user projects with their roles and permissions using SQL
func (*PostgreSQLDriver) FindUserTeams ¶
func (p *PostgreSQLDriver) FindUserTeams(ctx context.Context, userId string) ([]*models.Team, error)
FindUserTeams retrieves all teams for a given user using SQL
func (*PostgreSQLDriver) GetOrganizations ¶
func (p *PostgreSQLDriver) GetOrganizations(ctx context.Context, userId string) (*models.SearchResponse[models.Organization], error)
GetOrganizations retrieves organizations for a given user using SQL
func (*PostgreSQLDriver) GetProject ¶
GetProject retrieves a project by ID using SQL
func (*PostgreSQLDriver) GetProjectTeams ¶
func (p *PostgreSQLDriver) GetProjectTeams(ctx context.Context, projectId string) (*models.Team, error)
GetProjectTeams retrieves team information for a project using SQL
func (*PostgreSQLDriver) GetProjectWithRolesAndPermission ¶
func (p *PostgreSQLDriver) GetProjectWithRolesAndPermission(ctx context.Context, userId string) ([]*models.ProjectWithRoles, error)
GetProjectWithRolesAndPermission retrieves projects with roles and permissions for a user using SQL
func (*PostgreSQLDriver) GetProjects ¶
func (p *PostgreSQLDriver) GetProjects(ctx context.Context, keys []string) ([]*models.Project, error)
GetProjects retrieves multiple projects by their IDs using SQL
func (*PostgreSQLDriver) GetSystemUser ¶
func (p *PostgreSQLDriver) GetSystemUser(ctx context.Context, id string) (*models.SystemUser, error)
GetSystemUser retrieves a system user by ID using SQL
func (*PostgreSQLDriver) GetSystemUserByEmail ¶
func (p *PostgreSQLDriver) GetSystemUserByEmail(ctx context.Context, email string) (*models.SystemUser, error)
GetSystemUserByEmail retrieves a system user by email using SQL
func (*PostgreSQLDriver) GetSystemUsers ¶
func (p *PostgreSQLDriver) GetSystemUsers(ctx context.Context, keys []string) ([]*models.SystemUser, error)
GetSystemUsers retrieves multiple system users by their IDs using SQL
func (*PostgreSQLDriver) GetTeamsMembers ¶
func (p *PostgreSQLDriver) GetTeamsMembers(ctx context.Context, projectId string) ([]*models.SystemUser, error)
GetTeamsMembers retrieves team members for a project using SQL
func (*PostgreSQLDriver) GetWebHook ¶
func (p *PostgreSQLDriver) GetWebHook(ctx context.Context, projectId, hookId string) (*models.Webhook, error)
GetWebHook retrieves a specific webhook by ID using SQL
func (*PostgreSQLDriver) ListAllProjects ¶
func (p *PostgreSQLDriver) ListAllProjects(ctx context.Context, userId string) ([]*models.Project, error)
ListAllProjects lists all projects for a user (with admin check) using SQL
func (*PostgreSQLDriver) ListAllUsers ¶
func (p *PostgreSQLDriver) ListAllUsers(ctx context.Context) ([]*models.SystemUser, error)
ListAllUsers lists all system users using SQL
func (*PostgreSQLDriver) ListTeams ¶
func (p *PostgreSQLDriver) ListTeams(ctx context.Context, projectId string) ([]*models.SystemUser, error)
ListTeams lists team members for a project using SQL
func (*PostgreSQLDriver) RemoveATeamFromOrganization ¶
func (p *PostgreSQLDriver) RemoveATeamFromOrganization(ctx context.Context, orgId, userId, teamId string) error
RemoveATeamFromOrganization removes a team from an organization using SQL
func (*PostgreSQLDriver) RemoveATeamMemberFromProject ¶
func (p *PostgreSQLDriver) RemoveATeamMemberFromProject(ctx context.Context, projectId string, memberID string) error
RemoveATeamMemberFromProject removes a team member from a project using SQL
func (*PostgreSQLDriver) RemoveProjectFromOrganization ¶
func (p *PostgreSQLDriver) RemoveProjectFromOrganization(ctx context.Context, orgId, userId, projectId string) error
RemoveProjectFromOrganization removes a project from an organization using SQL
func (*PostgreSQLDriver) RunMigration ¶
func (p *PostgreSQLDriver) RunMigration(ctx context.Context) error
func (*PostgreSQLDriver) SaveAuditLog ¶
SaveAuditLog saves an audit log entry using SQL
func (*PostgreSQLDriver) SaveRawData ¶
func (p *PostgreSQLDriver) SaveRawData(ctx context.Context, collection string, data map[string]interface{}) error
SaveRawData saves raw data using SQL for payment-related operations
func (*PostgreSQLDriver) SearchAuditLogs ¶
func (p *PostgreSQLDriver) SearchAuditLogs(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.AuditLogs], error)
SearchAuditLogs searches for audit logs based on common system parameters using SQL
func (*PostgreSQLDriver) SearchFunctions ¶
func (p *PostgreSQLDriver) SearchFunctions(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.ApitoFunction], error)
SearchFunctions searches for cloud functions in a project using SQL
func (*PostgreSQLDriver) SearchProjects ¶
func (p *PostgreSQLDriver) SearchProjects(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Project], error)
SearchProjects searches for projects based on common system parameters using SQL
func (*PostgreSQLDriver) SearchResource ¶
func (p *PostgreSQLDriver) SearchResource(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[any], error)
SearchResource searches for resources based on common system parameters using SQL
func (*PostgreSQLDriver) SearchUsers ¶
func (p *PostgreSQLDriver) SearchUsers(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.SystemUser], error)
SearchUsers searches for system users based on parameters using SQL
func (*PostgreSQLDriver) SearchWebHooks ¶
func (p *PostgreSQLDriver) SearchWebHooks(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Webhook], error)
SearchWebHooks searches for webhooks in a project using SQL
func (*PostgreSQLDriver) UpdateProject ¶
func (p *PostgreSQLDriver) UpdateProject(ctx context.Context, project *models.Project, replace bool) error
UpdateProject updates a project using SQL
func (*PostgreSQLDriver) UpdateSystemUser ¶
func (p *PostgreSQLDriver) UpdateSystemUser(ctx context.Context, user *models.SystemUser, replace bool) error
UpdateSystemUser updates a system user using SQL