reseller

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package reseller owns the node-local reseller registry. Tenant access is enabled only after panel, REST, webhook and customer-data paths enforce it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatePermissions

func ValidatePermissions(scopes []string) ([]string, error)

ValidatePermissions rejects family wildcards so a later registry addition cannot silently widen an existing reseller grant.

Types

type Account

type Account struct {
	ID          string
	Slug        string
	DisplayName string
	Permissions []string
	Enabled     bool
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type Service

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

func NewService

func NewService(db *database.DB) *Service

func (*Service) Create

func (s *Service) Create(ctx context.Context, slug, displayName string, scopes []string) (*Account, error)

func (*Service) Get

func (s *Service) Get(ctx context.Context, id string) (*Account, error)

func (*Service) List

func (s *Service) List(ctx context.Context) ([]Account, error)

func (*Service) SetEnabled

func (s *Service) SetEnabled(ctx context.Context, id string, enabled bool) error

func (*Service) SetPermissions

func (s *Service) SetPermissions(ctx context.Context, id string, scopes []string) error

func (*Service) SetTemplates added in v0.1.4

func (s *Service) SetTemplates(ctx context.Context, id string, templateIDs []string) error

SetTemplates replaces the owner's technical-template assignment atomically. An empty selection closes provisioning without altering existing subscriptions.

func (*Service) Templates added in v0.1.4

func (s *Service) Templates(ctx context.Context, id string) ([]string, error)

Jump to

Keyboard shortcuts

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