Documentation
¶
Index ¶
- type Repo
- func (r *Repo) AcceptInvitation(ctx context.Context, invitationID, userID, email string, now time.Time) (app.Workspace, error)
- func (r *Repo) AcceptInvitationTx(ctx context.Context, tx pgx.Tx, invitationID, userID, email string, ...) (app.Workspace, error)
- func (r *Repo) CountActiveOwners(ctx context.Context, workspaceID string) (int, error)
- func (r *Repo) CountWorkspacesByUser(ctx context.Context, userID string) (int, error)
- func (r *Repo) CountWorkspacesByUserForCreateTx(ctx context.Context, tx pgx.Tx, userID string) (int, error)
- func (r *Repo) CreateInvitation(ctx context.Context, workspaceID, email, role, createdBy string, ...) (app.Invitation, error)
- func (r *Repo) CreateShareLink(ctx context.Context, workspaceID, codeHash, codePrefix, role, createdBy string, ...) (app.ShareLink, error)
- func (r *Repo) CreateWorkspaceWithOwner(ctx context.Context, slug, name, ownerUserID string, now time.Time) (app.Workspace, error)
- func (r *Repo) CreateWorkspaceWithOwnerTx(ctx context.Context, tx pgx.Tx, slug, name, ownerUserID string, now time.Time) (app.Workspace, error)
- func (r *Repo) DeclineInvitation(ctx context.Context, invitationID, email string, now time.Time) error
- func (r *Repo) DeleteRolePerms(ctx context.Context, workspaceID, role string) error
- func (r *Repo) DeleteWorkspaceCascade(ctx context.Context, tx pgx.Tx, workspaceID string) error
- func (r *Repo) FindWorkspaceIDBySlug(ctx context.Context, slug string) (string, bool, error)
- func (r *Repo) GetMember(ctx context.Context, workspaceID, userID string) (app.Member, bool, error)
- func (r *Repo) GetMemberUserStatus(ctx context.Context, workspaceID, userID string) (app.Member, string, bool, error)
- func (r *Repo) GetWorkspace(ctx context.Context, id string) (app.Workspace, bool, error)
- func (r *Repo) HasPendingInvitation(ctx context.Context, workspaceID, email string) (bool, error)
- func (r *Repo) IsMemberByEmail(ctx context.Context, workspaceID, email string) (bool, error)
- func (r *Repo) ListInvitations(ctx context.Context, workspaceID string, page, pageSize int) (app.Page[app.Invitation], error)
- func (r *Repo) ListMembers(ctx context.Context, workspaceID string, page, pageSize int) (app.Page[app.Member], error)
- func (r *Repo) ListRoleOverrides(ctx context.Context, workspaceID string) (map[string][]authz.Permission, error)
- func (r *Repo) ListShareLinks(ctx context.Context, workspaceID string, page, pageSize int) (app.Page[app.ShareLink], error)
- func (r *Repo) ListWorkspacesByUser(ctx context.Context, userID string) ([]app.WorkspaceMembership, error)
- func (r *Repo) OldestActiveOwner(ctx context.Context, workspaceID string) (app.Member, bool, error)
- func (r *Repo) PendingInvitationsByEmail(ctx context.Context, email string) ([]app.InvitationWithWorkspace, error)
- func (r *Repo) RedeemShareLink(ctx context.Context, codeHash, userID string, now time.Time) (app.Workspace, error)
- func (r *Repo) RedeemShareLinkTx(ctx context.Context, tx pgx.Tx, codeHash, userID string, now time.Time) (app.Workspace, error)
- func (r *Repo) RevokeInvitation(ctx context.Context, workspaceID, invitationID string, now time.Time) error
- func (r *Repo) RevokeShareLink(ctx context.Context, workspaceID, linkID string, now time.Time) error
- func (r *Repo) RunInTx(ctx context.Context, fn func(ctx context.Context, tx pgx.Tx) error) error
- func (r *Repo) SoftRemoveMember(ctx context.Context, workspaceID, userID, removedBy string, now time.Time) error
- func (r *Repo) TransferOwnershipTx(ctx context.Context, tx pgx.Tx, workspaceID, fromUserID, toUserID string) error
- func (r *Repo) UpdateMemberRole(ctx context.Context, workspaceID, userID, newRole string, now time.Time) error
- func (r *Repo) UpdateWorkspaceName(ctx context.Context, id, name string, now time.Time) error
- func (r *Repo) UpsertRolePerms(ctx context.Context, workspaceID, role string, perms []authz.Permission, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (*Repo) AcceptInvitation ¶
func (*Repo) AcceptInvitationTx ¶
func (*Repo) CountActiveOwners ¶
func (*Repo) CountWorkspacesByUser ¶
func (*Repo) CountWorkspacesByUserForCreateTx ¶
func (*Repo) CreateInvitation ¶
func (*Repo) CreateShareLink ¶
func (*Repo) CreateWorkspaceWithOwner ¶
func (*Repo) CreateWorkspaceWithOwnerTx ¶
func (*Repo) DeclineInvitation ¶
func (*Repo) DeleteRolePerms ¶ added in v0.4.0
func (*Repo) DeleteWorkspaceCascade ¶
func (*Repo) FindWorkspaceIDBySlug ¶
func (*Repo) GetMemberUserStatus ¶
func (*Repo) GetWorkspace ¶
func (*Repo) HasPendingInvitation ¶
func (*Repo) IsMemberByEmail ¶
func (*Repo) ListInvitations ¶
func (*Repo) ListMembers ¶
func (*Repo) ListRoleOverrides ¶ added in v0.4.0
func (*Repo) ListShareLinks ¶
func (*Repo) ListWorkspacesByUser ¶
func (*Repo) OldestActiveOwner ¶
func (*Repo) PendingInvitationsByEmail ¶
func (*Repo) RedeemShareLink ¶
func (*Repo) RedeemShareLinkTx ¶
func (*Repo) RevokeInvitation ¶
func (*Repo) RevokeShareLink ¶
func (*Repo) SoftRemoveMember ¶
func (*Repo) TransferOwnershipTx ¶
func (*Repo) UpdateMemberRole ¶
func (*Repo) UpdateWorkspaceName ¶
Click to show internal directories.
Click to hide internal directories.