Documentation
¶
Index ¶
- type Driver
- func (d *Driver) AddATeamMemberToProject(ctx context.Context, req *models.TeamMemberAddRequest) error
- func (d *Driver) AddTeamMetaInfo(ctx context.Context, docs []*models.SystemUser) ([]*models.SystemUser, error)
- func (d *Driver) AddWebhookToProject(ctx context.Context, doc *models.Webhook) (*models.Webhook, error)
- func (d *Driver) AssignProjectToOrganization(ctx context.Context, orgId, userId, projectId string) error
- func (d *Driver) AssignTeamToOrganization(ctx context.Context, orgId, userId, teamId string) error
- func (d *Driver) BlacklistAToken(ctx context.Context, token map[string]interface{}) error
- func (d *Driver) CheckProjectName(ctx context.Context, name string) error
- func (d *Driver) CheckProjectWithRoles(ctx context.Context, userId, projectId string) (*models.ProjectWithRoles, error)
- func (d *Driver) CheckTokenBlacklisted(ctx context.Context, tokenId string) error
- func (d *Driver) Close() error
- func (d *Driver) CountProjectUsersByRole(ctx context.Context, projectID string) (map[string]int, error)
- func (d *Driver) CreateOrganization(ctx context.Context, org *models.Organization) (*models.Organization, error)
- func (d *Driver) CreateProject(ctx context.Context, userId string, project *models.Project) (*models.Project, error)
- func (d *Driver) CreateSystemUser(ctx context.Context, user *models.SystemUser) (*models.SystemUser, error)
- func (d *Driver) CreateTeam(ctx context.Context, team *models.Team) (*models.Team, error)
- func (d *Driver) CreateUser(ctx context.Context, user *models.User) (*models.User, error)
- func (d *Driver) DeleteModelType(ctx context.Context, projectID, modelName string) error
- func (d *Driver) DeleteProjectFromSystem(ctx context.Context, projectId string) error
- func (d *Driver) DeleteSystemUser(ctx context.Context, id string) error
- func (d *Driver) DeleteUser(ctx context.Context, projectID, userID string) error
- func (d *Driver) DeleteWebhook(ctx context.Context, projectId, hookId string) error
- func (d *Driver) EnsureSystemBootstrap(ctx context.Context) error
- func (d *Driver) FindOrganizationAdmin(ctx context.Context, orgId string) (*models.SystemUser, error)
- func (d *Driver) FindUserOrganizations(ctx context.Context, userId string) ([]*models.Organization, error)
- func (d *Driver) FindUserProjects(ctx context.Context, userId string) ([]*models.Project, error)
- func (d *Driver) FindUserProjectsWithRoles(ctx context.Context, userId string) ([]*models.ProjectWithRoles, error)
- func (d *Driver) GetOrganizations(ctx context.Context, userId string) (*models.SearchResponse[models.Organization], error)
- func (d *Driver) GetProject(ctx context.Context, id string) (*models.Project, error)
- func (d *Driver) GetProjectTeams(ctx context.Context, projectId string) (*models.Team, error)
- func (d *Driver) GetProjects(ctx context.Context, keys []string) ([]*models.Project, error)
- func (d *Driver) GetSystemUser(ctx context.Context, id string) (*models.SystemUser, error)
- func (d *Driver) GetSystemUserByEmail(ctx context.Context, email string) (*models.SystemUser, error)
- func (d *Driver) GetSystemUsers(ctx context.Context, keys []string) ([]*models.SystemUser, error)
- func (d *Driver) GetTeams(ctx context.Context, userId string) ([]*models.Team, error)
- func (d *Driver) GetTeamsMembers(ctx context.Context, projectId string) ([]*models.SystemUser, error)
- func (d *Driver) GetUser(ctx context.Context, projectID, userID string) (*models.User, error)
- func (d *Driver) GetUserByUsername(ctx context.Context, projectID, username string) (*models.User, error)
- func (d *Driver) GetWebHook(ctx context.Context, projectId, hookId string) (*models.Webhook, error)
- func (d *Driver) ListUsersByEmail(ctx context.Context, projectID, email string) ([]*models.User, error)
- func (d *Driver) ListUsersByGoogleSub(ctx context.Context, projectID, googleSub string) ([]*models.User, error)
- func (d *Driver) ListUsersByPhone(ctx context.Context, projectID, phone string) ([]*models.User, error)
- func (d *Driver) PersistProjectModelTypes(ctx context.Context, projectID string, schemaModels []*models.ModelType) error
- func (d *Driver) Ping(ctx context.Context) error
- func (d *Driver) RemoveATeamFromOrganization(ctx context.Context, orgId, userId, teamId string) error
- func (d *Driver) RemoveATeamMemberFromProject(ctx context.Context, projectId string, userId string) error
- func (d *Driver) RemoveProjectFromOrganization(ctx context.Context, orgId, userId, projectId string) error
- func (d *Driver) RunMigration(ctx context.Context) error
- func (d *Driver) SaveAuditLog(ctx context.Context, auditLog *models.AuditLogs) error
- func (d *Driver) SaveProjectAuthenticationSettings(ctx context.Context, projectID string, auth *models.AuthenticationSettings) error
- func (d *Driver) SaveProjectStorageSettings(ctx context.Context, projectID string, storage *models.StorageSettings) error
- func (d *Driver) SaveRawData(ctx context.Context, collection string, data map[string]interface{}) error
- func (d *Driver) SearchAuditLogs(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.AuditLogs], error)
- func (d *Driver) SearchFunctions(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.ApitoFunction], error)
- func (d *Driver) SearchProjectUsers(ctx context.Context, projectID, q string, limit, offset int) ([]*models.User, int, error)
- func (d *Driver) SearchProjects(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Project], error)
- func (d *Driver) SearchResource(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[any], error)
- func (d *Driver) SearchSystemUsers(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.SystemUser], error)
- func (d *Driver) SearchWebHooks(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Webhook], error)
- func (d *Driver) TouchProjectUpdatedAt(ctx context.Context, projectID string) error
- func (d *Driver) UpdateProject(ctx context.Context, project *models.Project, replace bool) error
- func (d *Driver) UpdateSystemUser(ctx context.Context, user *models.SystemUser, replace bool) error
- func (d *Driver) UpdateUser(ctx context.Context, user *models.User) error
- func (d *Driver) UpsertModelType(ctx context.Context, projectID string, m *models.ModelType) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
Driver is the Cloudflare D1 system (control-plane) driver.
func GetCloudflareD1SystemDriver ¶
func GetCloudflareD1SystemDriver(cfg *models.Config, cred *models.DriverCredentials) (*Driver, error)
GetCloudflareD1SystemDriver opens the system cloudflared1 driver.
func (*Driver) AddATeamMemberToProject ¶
func (*Driver) AddTeamMetaInfo ¶
func (d *Driver) AddTeamMetaInfo(ctx context.Context, docs []*models.SystemUser) ([]*models.SystemUser, error)
func (*Driver) AddWebhookToProject ¶
func (*Driver) AssignProjectToOrganization ¶
func (*Driver) AssignTeamToOrganization ¶
func (*Driver) BlacklistAToken ¶
func (*Driver) CheckProjectName ¶
CheckProjectName reports ae.ErrProjectNameTaken when name is already used in SYSTEM_D1.
func (*Driver) CheckProjectWithRoles ¶
func (*Driver) CheckTokenBlacklisted ¶
func (*Driver) CountProjectUsersByRole ¶
func (*Driver) CreateOrganization ¶
func (d *Driver) CreateOrganization(ctx context.Context, org *models.Organization) (*models.Organization, error)
func (*Driver) CreateProject ¶
func (*Driver) CreateSystemUser ¶
func (d *Driver) CreateSystemUser(ctx context.Context, user *models.SystemUser) (*models.SystemUser, error)
func (*Driver) CreateTeam ¶
func (*Driver) CreateUser ¶
func (*Driver) DeleteModelType ¶
func (*Driver) DeleteProjectFromSystem ¶
DeleteProjectFromSystem removes catalog rows for a project from the system database.
func (*Driver) DeleteSystemUser ¶
func (*Driver) DeleteUser ¶
func (*Driver) DeleteWebhook ¶
func (*Driver) EnsureSystemBootstrap ¶
func (*Driver) FindOrganizationAdmin ¶
func (*Driver) FindUserOrganizations ¶
func (*Driver) FindUserProjects ¶
func (*Driver) FindUserProjectsWithRoles ¶
func (*Driver) GetOrganizations ¶
func (d *Driver) GetOrganizations(ctx context.Context, userId string) (*models.SearchResponse[models.Organization], error)
func (*Driver) GetProject ¶
func (*Driver) GetProjectTeams ¶
func (*Driver) GetProjects ¶
func (*Driver) GetSystemUser ¶
func (*Driver) GetSystemUserByEmail ¶
func (*Driver) GetSystemUsers ¶
func (*Driver) GetTeamsMembers ¶
func (*Driver) GetUserByUsername ¶
func (*Driver) GetWebHook ¶
func (*Driver) ListUsersByEmail ¶
func (*Driver) ListUsersByGoogleSub ¶
func (*Driver) ListUsersByPhone ¶
func (*Driver) PersistProjectModelTypes ¶
func (*Driver) RemoveATeamFromOrganization ¶
func (*Driver) RemoveATeamMemberFromProject ¶
func (*Driver) RemoveProjectFromOrganization ¶
func (*Driver) SaveAuditLog ¶
func (*Driver) SaveProjectAuthenticationSettings ¶
func (*Driver) SaveProjectStorageSettings ¶
func (*Driver) SaveRawData ¶
func (*Driver) SearchAuditLogs ¶
func (d *Driver) SearchAuditLogs(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.AuditLogs], error)
func (*Driver) SearchFunctions ¶
func (d *Driver) SearchFunctions(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.ApitoFunction], error)
func (*Driver) SearchProjectUsers ¶
func (*Driver) SearchProjects ¶
func (d *Driver) SearchProjects(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Project], error)
func (*Driver) SearchResource ¶
func (d *Driver) SearchResource(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[any], error)
func (*Driver) SearchSystemUsers ¶
func (d *Driver) SearchSystemUsers(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.SystemUser], error)
func (*Driver) SearchWebHooks ¶
func (d *Driver) SearchWebHooks(ctx context.Context, param *models.CommonSystemParams) (*models.SearchResponse[models.Webhook], error)
func (*Driver) TouchProjectUpdatedAt ¶
func (*Driver) UpdateProject ¶
func (*Driver) UpdateSystemUser ¶
func (*Driver) UpdateUser ¶
Click to show internal directories.
Click to hide internal directories.