Documentation
¶
Overview ¶
Package admincmd provides reusable cobra commands for self-hosted administrator helpers. Both the management and combined binaries use these commands, each providing their own opener to handle config loading and storage initialization.
Index ¶
- func CloseIDPStorage(s storage.Storage)
- func CloseStore(ctx context.Context, s store.Store)
- func NewCommands(openers Openers) *cobra.Command
- func OpenEmbeddedIDPStorage(cfg *idp.EmbeddedIdPConfig) (storage.Storage, error)
- func OpenIDPStorage(config *nbconfig.Config) (storage.Storage, string, error)
- type IDPOpener
- type Opener
- type Openers
- type Resources
- type StoreOpener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseIDPStorage ¶
CloseIDPStorage closes embedded IdP storage and logs cleanup errors at debug level.
func CloseStore ¶
CloseStore closes the management store and logs cleanup errors at debug level.
func NewCommands ¶
NewCommands creates the admin command tree with the given resource openers.
func OpenEmbeddedIDPStorage ¶
func OpenEmbeddedIDPStorage(cfg *idp.EmbeddedIdPConfig) (storage.Storage, error)
OpenEmbeddedIDPStorage opens the Dex storage configured for the embedded IdP.
Types ¶
type IDPOpener ¶
type IDPOpener func(cmd *cobra.Command, fn func(ctx context.Context, idpStorage storage.Storage, storageFile string) error) error
IDPOpener initializes only the embedded IdP storage from the command context and calls fn.
type Openers ¶
type Openers struct {
Resources Opener
Store StoreOpener
IDP IDPOpener
}
Openers contains the resource openers needed by the admin command tree.