Documentation
¶
Overview ¶
Package bootstrap implements first-boot setup-token handling.
Index ¶
- Constants
- Variables
- type Service
- func (s *Service) CreateFirstInstanceAdmin(ctx context.Context, setupTokenID uuid.UUID, email, displayName string) (uuid.UUID, error)
- func (s *Service) CreateFirstInstanceAdminWithID(ctx context.Context, adminID, setupTokenID uuid.UUID, ...) (uuid.UUID, error)
- func (s *Service) IsFirstBoot(ctx context.Context) (bool, error)
- func (s *Service) MintSetupToken(ctx context.Context) (string, error)
- func (s *Service) RedeemSetupToken(ctx context.Context, plaintext string) (uuid.UUID, error)
- func (s *Service) RevokeSetupToken(ctx context.Context) (string, error)
- func (s *Service) SetNow(now func() time.Time)
- func (s *Service) ValidateSetupToken(ctx context.Context, plaintext string) error
Constants ¶
View Source
const SetupTokenTTL = 24 * time.Hour
Variables ¶
View Source
var ( ErrInvalidSetupToken = errors.New("invalid setup token") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CreateFirstInstanceAdmin ¶
func (*Service) CreateFirstInstanceAdminWithID ¶
func (*Service) MintSetupToken ¶
func (*Service) RedeemSetupToken ¶
func (*Service) RevokeSetupToken ¶
Click to show internal directories.
Click to hide internal directories.