Versions in this module Expand all Collapse all v1 v1.0.28 Oct 13, 2026 Changes in this version + const SQLUserProjectAccessGranted + const SQLUserProjectAccessGrantedAliased + func AcceptGrantsByInviteToken(ctx context.Context, orm *bun.DB, hash, acceptedAt string) error + func BuildPostgresDSN(c *models.DriverCredentials) (string, error) + func CountUserProjects(ctx context.Context, db *bun.DB, userIDs []string) (map[string]int, error) + func DeleteUserProjectGrant(ctx context.Context, orm *bun.DB, projectID, userID string) error + func DropObsoleteTeamOrgTables(ctx context.Context, orm *bun.DB) error + func EmailEqFromParams(param *models.CommonSystemParams) string + func EnsureApitoFunctionsCompositePK(ctx context.Context, orm *bun.DB) error + func EnsureModelTypeUniqueKeysColumn(ctx context.Context, db *bun.DB) error + func EnsureProjectIconColumn(ctx context.Context, db *bun.DB) error + func EnsureProjectPlanSeedOmissionsColumn(ctx context.Context, db *bun.DB) error + func EnsureProjectPlansColumn(ctx context.Context, db *bun.DB) error + func EnsureProjectTempBannedColumn(ctx context.Context, db *bun.DB) error + func EnsureProjectTokensMetadataColumns(ctx context.Context, db *bun.DB) error + func EnsureProjectUsersOAuthSubColumn(ctx context.Context, db *bun.DB) error + func EnsureSystemUserAccessTokensColumn(ctx context.Context, db *bun.DB) error + func EnsureSystemUserIsSuperAdminColumn(ctx context.Context, db *bun.DB) error + func EnsureUserProjectInviteColumns(ctx context.Context, db *bun.DB) error + func ErrCredentialsRequired() error + func ExecAlterIgnoreDuplicate(ctx context.Context, db *bun.DB, sql string) error + func ExpireInvitesByToken(ctx context.Context, orm *bun.DB, hash, nowRFC3339 string) error + func FullAdminPermissionsJSON() string + func GetUserProjectGrant(ctx context.Context, orm *bun.DB, userID, projectID string) (*models.UserProject, error) + func IsDuplicateColumnError(err error) bool + func IsSQLUniqueViolation(err error) bool + func ListProjectMembers(ctx context.Context, orm *bun.DB, projectID string) ([]*models.SystemUser, error) + func ListUserProjects(ctx context.Context, db *bun.DB, userIDs []string) (map[string][]UserProjectRow, error) + func LookupGrantsByInviteToken(ctx context.Context, orm *bun.DB, hash string) ([]*models.UserProject, error) + func MapString(m map[string]interface{}, key string) string + func NormalizeAllProjectPlanSystemFlags(ctx context.Context, db *bun.DB) error + func NormalizeEngine(engine string) string + func NowRFC3339() string + func OpenMariaDB(cred *models.DriverCredentials) (*bun.DB, error) + func OpenMySQL(cred *models.DriverCredentials) (*bun.DB, error) + func OpenPostgres(cred *models.DriverCredentials) (*bun.DB, error) + func OpenSQLite(cfg *models.Config, cred *models.DriverCredentials) (*bun.DB, error) + func PersistProjectFunctionsTx(ctx context.Context, tx bun.Tx, projectID string, ...) error + func RegisterSystemSQLSchemaModels(orm *bun.DB) + func RetiredAddTeamMetaInfo(docs []*models.SystemUser) ([]*models.SystemUser, error) + func RetiredCreateOrganization(org *models.Organization) (*models.Organization, error) + func RetiredCreateTeam(team *models.Team) (*models.Team, error) + func RetiredFindOrganizationAdmin() (*models.SystemUser, error) + func RetiredFindUserOrganizations() ([]*models.Organization, error) + func RetiredGetOrganizations() (*models.SearchResponse[models.Organization], error) + func RetiredGetProjectTeams() (*models.Team, error) + func RetiredNoop() error + func SearchSystemUsers(ctx context.Context, db *bun.DB, param *models.CommonSystemParams) (*models.SearchResponse[models.SystemUser], error) + func SupportedEngine(engine string) bool + func SystemSQLSchemaModels() []interface + func UpsertUserProjectGrant(ctx context.Context, orm *bun.DB, req *models.TeamMemberAddRequest) error + type Base struct + Conf *models.Config + DriverCredential *models.DriverCredentials + ORM *bun.DB + func (b *Base) AcceptGrantsByInviteToken(ctx context.Context, hash, acceptedAt string) error + func (b *Base) ExpireInvitesByToken(ctx context.Context, hash, nowRFC3339 string) error + func (b *Base) FunctionLifecycleStore() interfaces.FunctionLifecycleStore + func (b *Base) GetUserProjectGrant(ctx context.Context, userID, projectID string) (*models.UserProject, error) + func (b *Base) LookupGrantsByInviteToken(ctx context.Context, hash string) ([]*models.UserProject, error) + type Driver struct + type OrganizationProjectRow struct + AssignedAt string + AssignedBy string + OrganizationID string + ProjectID string + type ProjectTeamRow struct + ProjectID string + UserID string + type RawDataRow struct + Collection string + Data string + ID string + type SQLFunctionLifecycleStore struct + func NewSQLFunctionLifecycleStore(orm *bun.DB) *SQLFunctionLifecycleStore + func (s *SQLFunctionLifecycleStore) GetRevision(ctx context.Context, projectID, revisionID string) (*models.FunctionRevision, error) + func (s *SQLFunctionLifecycleStore) ListDeployments(ctx context.Context, projectID, functionName string, limit int) ([]*models.FunctionDeployment, error) + func (s *SQLFunctionLifecycleStore) ListRevisions(ctx context.Context, projectID, functionName string, limit int) ([]*models.FunctionRevision, error) + func (s *SQLFunctionLifecycleStore) MarkDeploymentsSuperseded(ctx context.Context, projectID, functionName, exceptID string) error + func (s *SQLFunctionLifecycleStore) SaveBuild(ctx context.Context, build *models.FunctionBuild) error + func (s *SQLFunctionLifecycleStore) SaveDeployment(ctx context.Context, dep *models.FunctionDeployment) error + func (s *SQLFunctionLifecycleStore) SaveInvocation(ctx context.Context, inv *models.FunctionInvocation) error + func (s *SQLFunctionLifecycleStore) SaveRevision(ctx context.Context, rev *models.FunctionRevision) error + type TeamMetadataRow struct + Data string + ID string + type TokenBlacklistRow struct + Data string + TokenID string + type UserMetadataRow struct + Data string + ID string + type UserProjectRow struct + Name string + ProjectID string + Role string + UserID string