instanceadminsvc

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: Apache-2.0 Imports: 11 Imported by: 1 module, 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

Overview

Package instanceadminsvc changes the global pre-tenant instance administrator role.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserUnverified = xerror.InvalidInput(xerror.User).Detail("user email must be verified before granting instance administrator access")
	ErrLastAdmin      = xerror.InvalidInput(xerror.User).Detail("cannot revoke the last instance administrator")
)

Functions

This section is empty.

Types

type Bootstrapper

type Bootstrapper struct {
	// contains filtered or unexported fields
}

Bootstrapper is local operator provisioning, never an HTTP registration path.

func NewBootstrapper

func NewBootstrapper(txm postgres.TransactionManager, admins instanceadmins.Repository, userRepo users.Repository, hasher crypto.Hasher) (*Bootstrapper, error)

func (*Bootstrapper) Bootstrap

func (s *Bootstrapper) Bootstrap(ctx context.Context, userSlug slug.Slug, name, email, password string) error

Bootstrap requires the database operator to have independently verified email ownership.

type Service

type Service struct {
	// contains filtered or unexported fields
}

func (*Service) Grant

func (s *Service) Grant(ctx context.Context, userSlug slug.Slug) error

func (*Service) Revoke

func (s *Service) Revoke(ctx context.Context, userSlug slug.Slug) error

Jump to

Keyboard shortcuts

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