cloudflared1

package
v1.0.35 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 12 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 Driver

type Driver struct {
	Conf             *models.Config
	DriverCredential *models.DriverCredentials
	DB               *cfd1.DB
}

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 (d *Driver) AddATeamMemberToProject(ctx context.Context, req *models.TeamMemberAddRequest) error

func (*Driver) AddTeamMetaInfo

func (d *Driver) AddTeamMetaInfo(ctx context.Context, docs []*models.SystemUser) ([]*models.SystemUser, error)

func (*Driver) AddWebhookToProject

func (d *Driver) AddWebhookToProject(ctx context.Context, doc *models.Webhook) (*models.Webhook, error)

func (*Driver) AssignProjectToOrganization

func (d *Driver) AssignProjectToOrganization(ctx context.Context, orgId, userId, projectId string) error

func (*Driver) AssignTeamToOrganization

func (d *Driver) AssignTeamToOrganization(ctx context.Context, orgId, userId, teamId string) error

func (*Driver) BlacklistAToken

func (d *Driver) BlacklistAToken(ctx context.Context, token map[string]interface{}) error

func (*Driver) CheckProjectName

func (d *Driver) CheckProjectName(ctx context.Context, name string) error

CheckProjectName reports ae.ErrProjectNameTaken when name is already used in SYSTEM_D1.

func (*Driver) CheckProjectWithRoles

func (d *Driver) CheckProjectWithRoles(ctx context.Context, userId, projectId string) (*models.ProjectWithRoles, error)

func (*Driver) CheckTokenBlacklisted

func (d *Driver) CheckTokenBlacklisted(ctx context.Context, tokenId string) error

func (*Driver) Close

func (d *Driver) Close() error

func (*Driver) CountProjectUsersByRole

func (d *Driver) CountProjectUsersByRole(ctx context.Context, projectID string) (map[string]int, error)

func (*Driver) CreateOrganization

func (d *Driver) CreateOrganization(ctx context.Context, org *models.Organization) (*models.Organization, error)

func (*Driver) CreateProject

func (d *Driver) CreateProject(ctx context.Context, userId string, project *models.Project) (*models.Project, error)

func (*Driver) CreateSystemUser

func (d *Driver) CreateSystemUser(ctx context.Context, user *models.SystemUser) (*models.SystemUser, error)

func (*Driver) CreateTeam

func (d *Driver) CreateTeam(ctx context.Context, team *models.Team) (*models.Team, error)

func (*Driver) CreateUser

func (d *Driver) CreateUser(ctx context.Context, user *models.User) (*models.User, error)

func (*Driver) DeleteModelType

func (d *Driver) DeleteModelType(ctx context.Context, projectID, modelName string) error

func (*Driver) DeletePaymentProviderEvent added in v1.0.31

func (d *Driver) DeletePaymentProviderEvent(ctx context.Context, projectID, provider, eventID string) error

func (*Driver) DeleteProjectFromSystem

func (d *Driver) DeleteProjectFromSystem(ctx context.Context, projectId string) error

DeleteProjectFromSystem removes catalog rows for a project from the system database.

func (*Driver) DeleteSystemUser

func (d *Driver) DeleteSystemUser(ctx context.Context, id string) error

func (*Driver) DeleteUser

func (d *Driver) DeleteUser(ctx context.Context, projectID, userID string) error

func (*Driver) DeleteWebhook

func (d *Driver) DeleteWebhook(ctx context.Context, projectId, hookId string) error

func (*Driver) EnsureSystemBootstrap

func (d *Driver) EnsureSystemBootstrap(ctx context.Context) error

func (*Driver) FindOrganizationAdmin

func (d *Driver) FindOrganizationAdmin(ctx context.Context, orgId string) (*models.SystemUser, error)

func (*Driver) FindPaymentSubscriptionByProviderRef added in v1.0.31

func (d *Driver) FindPaymentSubscriptionByProviderRef(ctx context.Context, projectID, provider, providerSubscriptionID string) (*models.PaymentSubscription, error)

func (*Driver) FindPaymentTransactionByClientRef added in v1.0.31

func (d *Driver) FindPaymentTransactionByClientRef(ctx context.Context, projectID, provider, clientRef string) (*models.PaymentTransaction, error)

func (*Driver) FindPaymentTransactionByIdempotency added in v1.0.31

func (d *Driver) FindPaymentTransactionByIdempotency(ctx context.Context, projectID, key string) (*models.PaymentTransaction, error)

func (*Driver) FindUserOrganizations

func (d *Driver) FindUserOrganizations(ctx context.Context, userId string) ([]*models.Organization, error)

func (*Driver) FindUserProjects

func (d *Driver) FindUserProjects(ctx context.Context, userId string) ([]*models.Project, error)

func (*Driver) FindUserProjectsWithRoles

func (d *Driver) FindUserProjectsWithRoles(ctx context.Context, userId string) ([]*models.ProjectWithRoles, error)

func (*Driver) GetOrganizations

func (d *Driver) GetOrganizations(ctx context.Context, userId string) (*models.SearchResponse[models.Organization], error)

func (*Driver) GetPaymentSubscription added in v1.0.31

func (d *Driver) GetPaymentSubscription(ctx context.Context, projectID, id string) (*models.PaymentSubscription, error)

func (*Driver) GetPaymentTransaction added in v1.0.31

func (d *Driver) GetPaymentTransaction(ctx context.Context, projectID, id string) (*models.PaymentTransaction, error)

func (*Driver) GetProject

func (d *Driver) GetProject(ctx context.Context, id string) (*models.Project, error)

func (*Driver) GetProjectTeams

func (d *Driver) GetProjectTeams(ctx context.Context, projectId string) (*models.Team, error)

func (*Driver) GetProjects

func (d *Driver) GetProjects(ctx context.Context, keys []string) ([]*models.Project, error)

func (*Driver) GetSystemUser

func (d *Driver) GetSystemUser(ctx context.Context, id string) (*models.SystemUser, error)

func (*Driver) GetSystemUserByEmail

func (d *Driver) GetSystemUserByEmail(ctx context.Context, email string) (*models.SystemUser, error)

func (*Driver) GetSystemUsers

func (d *Driver) GetSystemUsers(ctx context.Context, keys []string) ([]*models.SystemUser, error)

func (*Driver) GetTeams

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

func (*Driver) GetTeamsMembers

func (d *Driver) GetTeamsMembers(ctx context.Context, projectId string) ([]*models.SystemUser, error)

func (*Driver) GetUser

func (d *Driver) GetUser(ctx context.Context, projectID, userID string) (*models.User, error)

func (*Driver) GetUserByUsername

func (d *Driver) GetUserByUsername(ctx context.Context, projectID, username string) (*models.User, error)

func (*Driver) GetWebHook

func (d *Driver) GetWebHook(ctx context.Context, projectId, hookId string) (*models.Webhook, error)

func (*Driver) InsertPaymentProviderEvent added in v1.0.31

func (d *Driver) InsertPaymentProviderEvent(ctx context.Context, row *models.PaymentProviderEvent) (bool, error)

func (*Driver) ListPaymentTransactions added in v1.0.31

func (d *Driver) ListPaymentTransactions(ctx context.Context, filter interfaces.PaymentListFilter) ([]*models.PaymentTransaction, error)

func (*Driver) ListUsersByEmail

func (d *Driver) ListUsersByEmail(ctx context.Context, projectID, email string) ([]*models.User, error)

func (*Driver) ListUsersByGoogleSub

func (d *Driver) ListUsersByGoogleSub(ctx context.Context, projectID, googleSub string) ([]*models.User, error)

func (*Driver) ListUsersByPhone

func (d *Driver) ListUsersByPhone(ctx context.Context, projectID, phone string) ([]*models.User, error)

func (*Driver) PersistProjectModelTypes

func (d *Driver) PersistProjectModelTypes(ctx context.Context, projectID string, schemaModels []*models.ModelType) error

func (*Driver) Ping

func (d *Driver) Ping(ctx context.Context) error

func (*Driver) RemoveATeamFromOrganization

func (d *Driver) RemoveATeamFromOrganization(ctx context.Context, orgId, userId, teamId string) error

func (*Driver) RemoveATeamMemberFromProject

func (d *Driver) RemoveATeamMemberFromProject(ctx context.Context, projectId string, userId string) error

func (*Driver) RemoveProjectFromOrganization

func (d *Driver) RemoveProjectFromOrganization(ctx context.Context, orgId, userId, projectId string) error

func (*Driver) RunMigration

func (d *Driver) RunMigration(ctx context.Context) error

func (*Driver) SaveAuditLog

func (d *Driver) SaveAuditLog(ctx context.Context, auditLog *models.AuditLogs) error

func (*Driver) SaveProjectAuthenticationSettings

func (d *Driver) SaveProjectAuthenticationSettings(ctx context.Context, projectID string, auth *models.AuthenticationSettings) error

func (*Driver) SaveProjectStorageSettings

func (d *Driver) SaveProjectStorageSettings(ctx context.Context, projectID string, storage *models.StorageSettings) error

func (*Driver) SaveRawData

func (d *Driver) SaveRawData(ctx context.Context, collection string, data map[string]interface{}) error

func (*Driver) SearchAuditLogs

func (*Driver) SearchFunctions

func (*Driver) SearchProjectUsers

func (d *Driver) SearchProjectUsers(ctx context.Context, projectID, q string, limit, offset int) ([]*models.User, int, error)

func (*Driver) SearchProjects

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 (*Driver) TouchProjectUpdatedAt

func (d *Driver) TouchProjectUpdatedAt(ctx context.Context, projectID string) error

func (*Driver) UpdateProject

func (d *Driver) UpdateProject(ctx context.Context, project *models.Project, replace bool) error

func (*Driver) UpdateSystemUser

func (d *Driver) UpdateSystemUser(ctx context.Context, user *models.SystemUser, replace bool) error

func (*Driver) UpdateUser

func (d *Driver) UpdateUser(ctx context.Context, user *models.User) error

func (*Driver) UpsertModelType

func (d *Driver) UpsertModelType(ctx context.Context, projectID string, m *models.ModelType) error

func (*Driver) UpsertPaymentSubscription added in v1.0.31

func (d *Driver) UpsertPaymentSubscription(ctx context.Context, row *models.PaymentSubscription) error

func (*Driver) UpsertPaymentTransaction added in v1.0.31

func (d *Driver) UpsertPaymentTransaction(ctx context.Context, row *models.PaymentTransaction) error

Jump to

Keyboard shortcuts

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