instanceadminsvc

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

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