Go · 989 bytes Raw Blame History
1 // Code generated by sqlc. DO NOT EDIT.
2 // versions:
3 // sqlc v1.31.1
4
5 package policydb
6
7 import (
8 "context"
9 )
10
11 type Querier interface {
12 // SPDX-License-Identifier: AGPL-3.0-or-later
13 //
14 // Query surface for the policy package. The policy code reads roles to
15 // decide; admin/settings UIs (S32) write through these as well.
16 // Returns the collaborator role for (repo_id, user_id), or pgx.ErrNoRows
17 // when the user is not a collaborator on this repo.
18 GetCollabRole(ctx context.Context, db DBTX, arg GetCollabRoleParams) (CollabRole, error)
19 // Used by the repo settings page (S32) and tests.
20 ListCollabs(ctx context.Context, db DBTX, repoID int64) ([]ListCollabsRow, error)
21 RemoveCollab(ctx context.Context, db DBTX, arg RemoveCollabParams) error
22 // Insert or upgrade a collaborator's role. added_by_user_id records who
23 // granted the role for the audit trail.
24 UpsertCollabRole(ctx context.Context, db DBTX, arg UpsertCollabRoleParams) error
25 }
26
27 var _ Querier = (*Queries)(nil)
28