Versions in this module Expand all Collapse all v0 v0.0.6 Sep 13, 2021 Changes in this version + func CreateClearRevokeUserCmd() *cobra.Command + func CreateRevokeListUsersCmd() *cobra.Command + func CreateRevokeUserCmd() *cobra.Command v0.0.5 Sep 11, 2021 v0.0.4 Sep 11, 2021 Changes in this version + func CreateEditOperatorCmd() *cobra.Command v0.0.3 Sep 10, 2021 Changes in this version + func CreateAddOperatorCmd() *cobra.Command v0.0.2 Sep 10, 2021 Changes in this version + func CreatePushCmd() *cobra.Command v0.0.1 Sep 10, 2021 Changes in this version + const EnvOperatorPrefix + const EnvOperatorSuffix + const NscCwdOnlyEnv + const NscHomeEnv + const NscNoGitIgnoreEnv + const NscRootCasNatsEnv + const NscTlsCertNatsEnv + const NscTlsKeyNatsEnv + const TestEnv + var ErrNoOperator = errors.New("set an operator -- 'nsc env -o operatorName'") + var InteractiveFlag bool + var Json bool + var JsonPath string + var KeyPathFlag string + var NscCwdOnly bool + var Raw bool + var Wide = noopNameFilter + var WideFlag bool + func AbbrevHomePaths(fp string) string + func AccountJwtURL(oc *jwt.OperatorClaims, ac *jwt.AccountClaims) (string, error) + func AccountJwtURLFromString(asu string, accountSubject string) (string, error) + func AddLimits(table *tablewriter.Table, lim jwt.Limits) + func AddListValues(table *tablewriter.Table, label string, values []string) + func AddPermissions(table *tablewriter.Table, u jwt.Permissions) + func AddStandardClaimInfo(table *tablewriter.Table, claims jwt.Claims) + func CreateAddAccountCmd() *cobra.Command + func CreateAddUserCmd() *cobra.Command + func CreateDeleteUserCmd() *cobra.Command + func CreateDescribeUserCmd() *cobra.Command + func CreateEditUserCmd() *cobra.Command + func CreateListUsersCmd() *cobra.Command + func Decrypt(pk string, data []byte) ([]byte, error) + func DiffAccountLimits(a *jwt.AccountClaims, b *jwt.AccountClaims) store.Status + func Encrypt(pk string, data []byte) ([]byte, error) + func EncryptKV(pk string, data []byte) ([]byte, error) + func EnterQuietMode() + func Execute() + func ExecuteWithWriter(out io.Writer) error + func Expand(s string) (string, error) + func GenerateConfig(s *store.Store, account string, user string, userKey nkeys.KeyPair) ([]byte, error) + func GetField(data []byte, jp string) ([]byte, error) + func GetLastRandomName() string + func GetOperatorName(name string, asu string) string + func GetOperatorSigners(ctx ActionCtx) ([]string, error) + func GetOutput(fp string) (*os.File, error) + func GetRandomName(retry int) string + func GetRootCmd() *cobra.Command + func GetStore() (*store.Store, error) + func GetStoreForOperator(operator string) (*store.Store, error) + func GetToolName() string + func HoistRootFlags(cmd *cobra.Command) *cobra.Command + func HumanizedDate(d int64) string + func IsAccountAvailable(status int) bool + func IsAccountPending(status int) bool + func IsNatsUrl(url string) bool + func IsStdOut(fp string) bool + func IsURL(v string) bool + func IsValidDir(dir string) error + func JWTUpgradeBannerJWT(ver int) error + func LatencyMetricsSubjectValidator(s string) error + func LoadFromFileOrURL(v string) ([]byte, error) + func LoadFromURL(url string) ([]byte, error) + func MaxArgs(max int) cobra.PositionalArgs + func MaybeMakeDir(dir string) error + func NKeyValidator(kind nkeys.PrefixByte) cli.Validator + func NameFlagOrArgument(name string, ctx ActionCtx) string + func OperatorJwtURL(oc *jwt.OperatorClaims) (string, error) + func OperatorJwtURLFromString(asu string) (string, error) + func OperatorNameValidator(v string) error + func ParseExpiry(s string) (int64, error) + func ParseNumber(s string) (int64, error) + func PushAccount(u string, accountjwt []byte) (int, []byte, error) + func QuietMode() bool + func Read(fp string) ([]byte, error) + func ReadJson(fp string, v interface{}) error + func RenderDate(d int64) string + func ResolveKeyFlag() (nkeys.KeyPair, error) + func ResolvePath(defaultPath string, varName string) string + func RunAction(cmd *cobra.Command, args []string, action interface{}) error + func RunMaybeStorelessAction(cmd *cobra.Command, args []string, action interface{}) error + func RunStoreLessAction(cmd *cobra.Command, args []string, action interface{}) error + func SamplingValidator(s string) error + func SeedNKeyValidatorMatching(pukeys []string, kinds ...nkeys.PrefixByte) cli.Validator + func SetEnvOptions() + func SetQuietMode(tf bool) + func SetToolName(name string) + func StoreAccountAndUpdateStatus(ctx ActionCtx, token string, status *store.Report) + func UnixToDate(d int64) string + func ValidSigner(kp nkeys.KeyPair, signers []string) (bool, error) + func Write(fp string, data []byte) error + func WriteJson(fp string, v interface{}) error + type AccountContextParams struct + Name string + func (p *AccountContextParams) BindFlags(cmd *cobra.Command) + func (p *AccountContextParams) Edit(ctx ActionCtx) error + func (p *AccountContextParams) SetDefaults(ctx ActionCtx) error + func (p *AccountContextParams) Validate(ctx ActionCtx) error + type AccountDescriber struct + func NewAccountDescriber(ac jwt.AccountClaims) *AccountDescriber + func (a *AccountDescriber) Describe() string + type AccountExport struct + OperatorName string + func GetAllExports() ([]AccountExport, error) + func (ae *AccountExport) Choices() []AccountExportChoice + type AccountExportChoice struct + Selection *jwt.Export + func GetAccountExports(ac *jwt.AccountClaims) ([]AccountExportChoice, error) + func (aec *AccountExportChoice) String() string + type AccountExportChoices []AccountExportChoice + func (aes AccountExportChoices) String() []string + type AccountImport struct + ID string + Name string + type AccountImportChoice struct + Selection *jwt.Import + func (aec *AccountImportChoice) String() string + type AccountImportChoices []AccountImportChoice + func GetAccountImports(ac *jwt.AccountClaims) (AccountImportChoices, error) + func (aes AccountImportChoices) String() []string + type AccountUserContextParams struct + func (p *AccountUserContextParams) BindFlags(cmd *cobra.Command) + func (p *AccountUserContextParams) Edit(ctx ActionCtx) error + func (p *AccountUserContextParams) SetDefaults(ctx ActionCtx) error + func (p *AccountUserContextParams) Validate(ctx ActionCtx) error + type Action interface + Load func(ctx ActionCtx) error + PostInteractive func(ctx ActionCtx) error + PreInteractive func(ctx ActionCtx) error + Run func(ctx ActionCtx) (store.Status, error) + SetDefaults func(ctx ActionCtx) error + Validate func(ctx ActionCtx) error + type ActionCtx interface + AllSet func(flagNames ...string) bool + AnySet func(flagNames ...string) bool + Args func() []string + CountSet func(flagNames ...string) int + CurrentCmd func() *cobra.Command + NothingToDo func(flagNames ...string) bool + StoreCtx func() *store.Context + func NewActx(cmd *cobra.Command, args []string) (ActionCtx, error) + func NewStoreLessActx(cmd *cobra.Command, args []string) (ActionCtx, error) + type ActionFn func(ctx ActionCtx) error + type ActionRunFn func(ctx ActionCtx) (store.Status, error) + type ActivationDescriber struct + func NewActivationDescriber(a jwt.ActivationClaims) *ActivationDescriber + func (c *ActivationDescriber) Describe() string + type Actx struct + func (c *Actx) AllSet(flagNames ...string) bool + func (c *Actx) AnySet(flagNames ...string) bool + func (c *Actx) Args() []string + func (c *Actx) CountSet(flagNames ...string) int + func (c *Actx) CurrentCmd() *cobra.Command + func (c *Actx) NothingToDo(flagNames ...string) bool + func (c *Actx) StoreCtx() *store.Context + type AddAccountParams struct + func (p *AddAccountParams) Load(ctx ActionCtx) error + func (p *AddAccountParams) PostInteractive(ctx ActionCtx) error + func (p *AddAccountParams) PreInteractive(ctx ActionCtx) error + func (p *AddAccountParams) Run(ctx ActionCtx) (store.Status, error) + func (p *AddAccountParams) SetDefaults(ctx ActionCtx) error + func (p *AddAccountParams) Validate(ctx ActionCtx) error + type AddExportParams struct + func (p *AddExportParams) Load(ctx ActionCtx) error + func (p *AddExportParams) PostInteractive(_ ActionCtx) error + func (p *AddExportParams) PreInteractive(ctx ActionCtx) error + func (p *AddExportParams) Run(ctx ActionCtx) (store.Status, error) + func (p *AddExportParams) SetDefaults(ctx ActionCtx) error + func (p *AddExportParams) Validate(ctx ActionCtx) error + type AddImportParams struct + func (p *AddImportParams) Load(ctx ActionCtx) error + func (p *AddImportParams) PostInteractive(ctx ActionCtx) error + func (p *AddImportParams) PreInteractive(ctx ActionCtx) error + func (p *AddImportParams) Run(ctx ActionCtx) (store.Status, error) + func (p *AddImportParams) SetDefaults(ctx ActionCtx) error + func (p *AddImportParams) Validate(ctx ActionCtx) error + type AddMappingParams struct + func (p *AddMappingParams) Load(ctx ActionCtx) error + func (p *AddMappingParams) PostInteractive(_ ActionCtx) error + func (p *AddMappingParams) PreInteractive(ctx ActionCtx) error + func (p *AddMappingParams) Run(ctx ActionCtx) (store.Status, error) + func (p *AddMappingParams) SetDefaults(ctx ActionCtx) error + func (p *AddMappingParams) Validate(ctx ActionCtx) error + type AddOperatorParams struct + func (p *AddOperatorParams) Load(ctx ActionCtx) error + func (p *AddOperatorParams) PostInteractive(ctx ActionCtx) error + func (p *AddOperatorParams) PreInteractive(ctx ActionCtx) error + func (p *AddOperatorParams) Run(ctx ActionCtx) (store.Status, error) + func (p *AddOperatorParams) SetDefaults(ctx ActionCtx) error + func (p *AddOperatorParams) Validate(ctx ActionCtx) error + type AddUserParams struct + func (p *AddUserParams) Load(_ ActionCtx) error + func (p *AddUserParams) PostInteractive(_ ActionCtx) error + func (p *AddUserParams) PreInteractive(ctx ActionCtx) error + func (p *AddUserParams) Run(ctx ActionCtx) (store.Status, error) + func (p *AddUserParams) SetDefaults(ctx ActionCtx) error + func (p *AddUserParams) Validate(ctx ActionCtx) error + type Arg string + type ByAccountName []AccountExport + func (a ByAccountName) Len() int + func (a ByAccountName) Less(i, j int) bool + func (a ByAccountName) Swap(i, j int) + type ClearRevokeUserParams struct + func (p *ClearRevokeUserParams) Load(ctx ActionCtx) error + func (p *ClearRevokeUserParams) PostInteractive(ctx ActionCtx) error + func (p *ClearRevokeUserParams) PreInteractive(ctx ActionCtx) error + func (p *ClearRevokeUserParams) Run(ctx ActionCtx) (store.Status, error) + func (p *ClearRevokeUserParams) SetDefaults(ctx ActionCtx) error + func (p *ClearRevokeUserParams) Validate(ctx ActionCtx) error + type ContextConfig struct + Account string + Operator string + StoreRoot string + func GetCwdCtx() *ContextConfig + func NewContextConfig(storeRoot string) (*ContextConfig, error) + func (c *ContextConfig) ListAccounts() ([]string, error) + func (c *ContextConfig) ListOperators() []string + func (c *ContextConfig) LoadStore(operatorName string) (*store.Store, error) + func (c *ContextConfig) SetAccount(account string) error + func (c *ContextConfig) SetAccountTemp(account string) error + func (c *ContextConfig) SetDefaults() + func (c *ContextConfig) SetOperator(operator string) error + func (c *ContextConfig) Update(root string, operator string, account string) error + type DeleteAccountParams struct + func (p *DeleteAccountParams) Load(ctx ActionCtx) error + func (p *DeleteAccountParams) PostInteractive(ctx ActionCtx) error + func (p *DeleteAccountParams) PreInteractive(ctx ActionCtx) error + func (p *DeleteAccountParams) Run(ctx ActionCtx) (store.Status, error) + func (p *DeleteAccountParams) SetDefaults(ctx ActionCtx) error + func (p *DeleteAccountParams) Validate(ctx ActionCtx) error + type DeleteExportParams struct + func (p *DeleteExportParams) Load(ctx ActionCtx) error + func (p *DeleteExportParams) PostInteractive(ctx ActionCtx) error + func (p *DeleteExportParams) PreInteractive(ctx ActionCtx) error + func (p *DeleteExportParams) Run(ctx ActionCtx) (store.Status, error) + func (p *DeleteExportParams) SetDefaults(ctx ActionCtx) error + func (p *DeleteExportParams) Validate(ctx ActionCtx) error + type DeleteImportParams struct + func (p *DeleteImportParams) Load(ctx ActionCtx) error + func (p *DeleteImportParams) PostInteractive(ctx ActionCtx) error + func (p *DeleteImportParams) PreInteractive(ctx ActionCtx) error + func (p *DeleteImportParams) Run(ctx ActionCtx) (store.Status, error) + func (p *DeleteImportParams) SetDefaults(ctx ActionCtx) error + func (p *DeleteImportParams) Validate(ctx ActionCtx) error + type DeleteMappingParams struct + func (p *DeleteMappingParams) Load(ctx ActionCtx) error + func (p *DeleteMappingParams) PostInteractive(ctx ActionCtx) error + func (p *DeleteMappingParams) PreInteractive(ctx ActionCtx) error + func (p *DeleteMappingParams) Run(ctx ActionCtx) (store.Status, error) + func (p *DeleteMappingParams) SetDefaults(ctx ActionCtx) error + func (p *DeleteMappingParams) Validate(ctx ActionCtx) error + type DeleteUserParams struct + func (p *DeleteUserParams) Load(ctx ActionCtx) error + func (p *DeleteUserParams) PostInteractive(ctx ActionCtx) error + func (p *DeleteUserParams) PreInteractive(ctx ActionCtx) error + func (p *DeleteUserParams) Run(ctx ActionCtx) (store.Status, error) + func (p *DeleteUserParams) SetDefaults(ctx ActionCtx) error + func (p *DeleteUserParams) Validate(ctx ActionCtx) error + type DescribeAccountParams struct + func (p *DescribeAccountParams) Load(ctx ActionCtx) error + func (p *DescribeAccountParams) PostInteractive(_ ActionCtx) error + func (p *DescribeAccountParams) PreInteractive(ctx ActionCtx) error + func (p *DescribeAccountParams) Run(_ ActionCtx) (store.Status, error) + func (p *DescribeAccountParams) SetDefaults(ctx ActionCtx) error + func (p *DescribeAccountParams) Validate(_ ActionCtx) error + type DescribeFile struct + func (p *DescribeFile) Load(ctx ActionCtx) error + func (p *DescribeFile) PostInteractive(ctx ActionCtx) error + func (p *DescribeFile) PreInteractive(ctx ActionCtx) error + func (p *DescribeFile) Run(ctx ActionCtx) (store.Status, error) + func (p *DescribeFile) SetDefaults(ctx ActionCtx) error + func (p *DescribeFile) Validate(ctx ActionCtx) error + type DescribeOperatorParams struct + func (p *DescribeOperatorParams) Load(ctx ActionCtx) error + func (p *DescribeOperatorParams) PostInteractive(_ ActionCtx) error + func (p *DescribeOperatorParams) PreInteractive(_ ActionCtx) error + func (p *DescribeOperatorParams) Run(_ ActionCtx) (store.Status, error) + func (p *DescribeOperatorParams) SetDefaults(ctx ActionCtx) error + func (p *DescribeOperatorParams) Validate(_ ActionCtx) error + type DescribeUserParams struct + func (p *DescribeUserParams) Load(ctx ActionCtx) error + func (p *DescribeUserParams) PostInteractive(_ ActionCtx) error + func (p *DescribeUserParams) PreInteractive(ctx ActionCtx) error + func (p *DescribeUserParams) Run(ctx ActionCtx) (store.Status, error) + func (p *DescribeUserParams) SetDefaults(ctx ActionCtx) error + func (p *DescribeUserParams) Validate(_ ActionCtx) error + type Describer interface + Describe func() string + type Details struct + Key string + Name string + Seed string + Service []string + type EditAccountParams struct + func (p *EditAccountParams) Load(ctx ActionCtx) error + func (p *EditAccountParams) PostInteractive(ctx ActionCtx) error + func (p *EditAccountParams) PreInteractive(ctx ActionCtx) error + func (p *EditAccountParams) Run(ctx ActionCtx) (store.Status, error) + func (p *EditAccountParams) SetDefaults(ctx ActionCtx) error + func (p *EditAccountParams) Validate(ctx ActionCtx) error + type EditExportParams struct + func (p *EditExportParams) Load(ctx ActionCtx) error + func (p *EditExportParams) PostInteractive(ctx ActionCtx) error + func (p *EditExportParams) PreInteractive(ctx ActionCtx) error + func (p *EditExportParams) Run(ctx ActionCtx) (store.Status, error) + func (p *EditExportParams) SetDefaults(ctx ActionCtx) error + func (p *EditExportParams) Validate(ctx ActionCtx) error + type EditOperatorParams struct + func (p *EditOperatorParams) Load(ctx ActionCtx) error + func (p *EditOperatorParams) PostInteractive(ctx ActionCtx) error + func (p *EditOperatorParams) PreInteractive(ctx ActionCtx) error + func (p *EditOperatorParams) Run(ctx ActionCtx) (store.Status, error) + func (p *EditOperatorParams) SetDefaults(ctx ActionCtx) error + func (p *EditOperatorParams) Validate(ctx ActionCtx) error + type EditScopedSkParams struct + func (p *EditScopedSkParams) Load(ctx ActionCtx) error + func (p *EditScopedSkParams) PostInteractive(ctx ActionCtx) error + func (p *EditScopedSkParams) PreInteractive(ctx ActionCtx) error + func (p *EditScopedSkParams) Run(ctx ActionCtx) (store.Status, error) + func (p *EditScopedSkParams) SetDefaults(ctx ActionCtx) error + func (p *EditScopedSkParams) Validate(ctx ActionCtx) error + type EditUserParams struct + func (p *EditUserParams) Load(ctx ActionCtx) error + func (p *EditUserParams) PostInteractive(ctx ActionCtx) error + func (p *EditUserParams) PreInteractive(ctx ActionCtx) error + func (p *EditUserParams) Run(ctx ActionCtx) (store.Status, error) + func (p *EditUserParams) SetDefaults(ctx ActionCtx) error + func (p *EditUserParams) Validate(ctx ActionCtx) error + type EntryInfo struct + Claims jwt.Claims + Err error + Name string + func ListAccounts(s *store.Store) ([]*EntryInfo, error) + func ListUsers(s *store.Store, accountName string) ([]*EntryInfo, error) + type ExportJob struct + type ExportKeysParams struct + Dir string + Force bool + Remove bool + func (p *ExportKeysParams) Load(ctx ActionCtx) error + func (p *ExportKeysParams) PostInteractive(ctx ActionCtx) error + func (p *ExportKeysParams) PreInteractive(ctx ActionCtx) error + func (p *ExportKeysParams) Run(ctx ActionCtx) (store.Status, error) + func (p *ExportKeysParams) SetDefaults(ctx ActionCtx) error + func (p *ExportKeysParams) Validate(ctx ActionCtx) error + type ExportsDescriber struct + func NewExportsDescriber(exports jwt.Exports) *ExportsDescriber + func (e *ExportsDescriber) Describe() string + type FixCmd struct + KeyToPrincipalKey map[string]string + Keys map[string]string + Operators map[string]*OT + func (p *FixCmd) Load(ctx ActionCtx) error + func (p *FixCmd) LoadAccounts(ctx ActionCtx) (*store.Report, error) + func (p *FixCmd) LoadCreds(ctx ActionCtx) (*store.Report, error) + func (p *FixCmd) LoadNKey(fp string) error + func (p *FixCmd) LoadNKeys(ctx ActionCtx) (*store.Report, error) + func (p *FixCmd) LoadOperators(ctx ActionCtx) (*store.Report, error) + func (p *FixCmd) LoadUsers(ctx ActionCtx) (*store.Report, error) + func (p *FixCmd) PostInteractive(ctx ActionCtx) error + func (p *FixCmd) PreInteractive(ctx ActionCtx) error + func (p *FixCmd) ReadAccountJwt(fp string) (*jwt.AccountClaims, string, error) + func (p *FixCmd) ReadGenericJwt(fp string) (*jwt.GenericClaims, error) + func (p *FixCmd) ReadOperatorJwt(fp string) (*jwt.OperatorClaims, string, error) + func (p *FixCmd) ReadUserJwt(fp string) (*jwt.UserClaims, string, error) + func (p *FixCmd) Regenerate(rr *store.Report) error + func (p *FixCmd) Run(ctx ActionCtx) (store.Status, error) + func (p *FixCmd) SetDefaults(ctx ActionCtx) error + func (p *FixCmd) Validate(ctx ActionCtx) error + type GenerateActivationParams struct + func (p *GenerateActivationParams) Load(ctx ActionCtx) error + func (p *GenerateActivationParams) PostInteractive(ctx ActionCtx) error + func (p *GenerateActivationParams) PreInteractive(ctx ActionCtx) error + func (p *GenerateActivationParams) Run(ctx ActionCtx) (store.Status, error) + func (p *GenerateActivationParams) SetDefaults(ctx ActionCtx) error + func (p *GenerateActivationParams) Token() string + func (p *GenerateActivationParams) Validate(ctx ActionCtx) error + type GenerateCredsParams struct + func (p *GenerateCredsParams) Load(ctx ActionCtx) error + func (p *GenerateCredsParams) PostInteractive(ctx ActionCtx) error + func (p *GenerateCredsParams) PreInteractive(ctx ActionCtx) error + func (p *GenerateCredsParams) Run(ctx ActionCtx) (store.Status, error) + func (p *GenerateCredsParams) SetDefaults(ctx ActionCtx) error + func (p *GenerateCredsParams) Validate(ctx ActionCtx) error + type GenerateNKeysParam struct + func (p *GenerateNKeysParam) Load(ctx ActionCtx) error + func (p *GenerateNKeysParam) PostInteractive(ctx ActionCtx) error + func (p *GenerateNKeysParam) PreInteractive(ctx ActionCtx) error + func (p *GenerateNKeysParam) Run(ctx ActionCtx) (store.Status, error) + func (p *GenerateNKeysParam) SetDefaults(ctx ActionCtx) error + func (p *GenerateNKeysParam) Validate(ctx ActionCtx) error + type GenerateServerConfigParams struct + func (p *GenerateServerConfigParams) Load(ctx ActionCtx) error + func (p *GenerateServerConfigParams) PostInteractive(ctx ActionCtx) error + func (p *GenerateServerConfigParams) PreInteractive(ctx ActionCtx) error + func (p *GenerateServerConfigParams) Run(ctx ActionCtx) (store.Status, error) + func (p *GenerateServerConfigParams) SetDefaults(ctx ActionCtx) error + func (p *GenerateServerConfigParams) Validate(ctx ActionCtx) error + type GenericClaimsParams struct + func (sp *GenericClaimsParams) Edit(current []string) error + func (sp *GenericClaimsParams) Run(ctx ActionCtx, claim jwt.Claims, r *store.Report) error + func (sp *GenericClaimsParams) Valid() error + type ImportAccount struct + func (p *ImportAccount) Load(ctx ActionCtx) (err error) + func (p *ImportAccount) PostInteractive(ctx ActionCtx) (err error) + func (p *ImportAccount) PreInteractive(ctx ActionCtx) (err error) + func (p *ImportAccount) Run(ctx ActionCtx) (store.Status, error) + func (p *ImportAccount) SetDefaults(ctx ActionCtx) error + func (p *ImportAccount) Validate(ctx ActionCtx) error + type ImportDescriber struct + func NewImportDescriber(im jwt.Import) *ImportDescriber + func (i *ImportDescriber) Brief(table *tablewriter.Table) + func (i *ImportDescriber) IsRemoteImport() bool + func (i *ImportDescriber) LoadActivation() (*jwt.ActivationClaims, error) + type ImportKeysParams struct + Dir string + Recurse bool + func (p *ImportKeysParams) Load(ctx ActionCtx) error + func (p *ImportKeysParams) PostInteractive(ctx ActionCtx) error + func (p *ImportKeysParams) PreInteractive(ctx ActionCtx) error + func (p *ImportKeysParams) Run(ctx ActionCtx) (store.Status, error) + func (p *ImportKeysParams) SetDefaults(ctx ActionCtx) error + func (p *ImportKeysParams) Validate(ctx ActionCtx) error + type ImportNKeyJob struct + type ImportUser struct + func (p *ImportUser) Load(ctx ActionCtx) (err error) + func (p *ImportUser) PostInteractive(ctx ActionCtx) (err error) + func (p *ImportUser) PreInteractive(ctx ActionCtx) (err error) + func (p *ImportUser) Run(ctx ActionCtx) (store.Status, error) + func (p *ImportUser) SetDefaults(ctx ActionCtx) error + func (p *ImportUser) Validate(ctx ActionCtx) error + type ImportsDescriber struct + func NewImportsDescriber(imports jwt.Imports) *ImportsDescriber + func (i *ImportsDescriber) Describe() string + type InitCmdParams struct + Account keys + AccountServerURL string + CreateOperator bool + DebugOperatorURL string + Dir string + ManagedOperatorName string + Name string + Operator keys + OperatorJwtURL string + Prompt bool + PushMessage []byte + PushStatus int + PushURL string + ServiceURLs jwt.StringList + Store *store.Store + SystemAccount keys + SystemUser keys + User keys + func (p *InitCmdParams) Load(ctx ActionCtx) error + func (p *InitCmdParams) PostInteractive(ctx ActionCtx) error + func (p *InitCmdParams) PreInteractive(ctx ActionCtx) error + func (p *InitCmdParams) Run(ctx ActionCtx) (store.Status, error) + func (p *InitCmdParams) SetDefaults(ctx ActionCtx) error + func (p *InitCmdParams) Validate(ctx ActionCtx) error + type InterceptorFn func(ctx ActionCtx, params interface{}) error + type KP struct + func (e *KP) Generate() error + func (e *KP) String(pubOnly bool) string + type Key struct + ExpectedKind nkeys.PrefixByte + Invalid bool + KeyPath string + Name string + Parent string + Pub string + Signing bool + func (k *Key) HasKey() bool + func (k *Key) Resolve(ks store.KeyStore) + type KeyCollectorParams struct + Account string + Accounts bool + All bool + Filter string + Operator bool + Unreferenced bool + User string + Users bool + func (p *KeyCollectorParams) Run(ctx ActionCtx) (KeyList, error) + func (p *KeyCollectorParams) SetDefaults(ctx ActionCtx) error + type KeyList []*Key + func (ks KeyList) Code() store.StatusCode + func (ks KeyList) Len() int + func (ks KeyList) Less(i, j int) bool + func (ks KeyList) Swap(i, j int) + type Keys struct + MessageFn func(ks Keys) string + func (keys Keys) Message() string + type KnownOperator struct + AccountServerURL string + Name string + URL string + func FindKnownOperator(name string) (*KnownOperator, error) + type KnownOperators []KnownOperator + func GetWellKnownOperators() (KnownOperators, error) + type ListEditorParam struct + AddMessage string + FlagName string + PromptMessage string + ValidatorFn cli.Validator + Values []string + func (e *ListEditorParam) Edit() error + func (e *ListEditorParam) GetValues() []string + func (e *ListEditorParam) Valid() error + type ListKeysParams struct + KS store.KeyStore + Seeds bool + func (p *ListKeysParams) Load(ctx ActionCtx) error + func (p *ListKeysParams) PostInteractive(ctx ActionCtx) error + func (p *ListKeysParams) PreInteractive(ctx ActionCtx) error + func (p *ListKeysParams) Report(ks Keys) string + func (p *ListKeysParams) ReportSeeds(ks Keys) string + func (p *ListKeysParams) Run(ctx ActionCtx) (store.Status, error) + func (p *ListKeysParams) SetDefaults(ctx ActionCtx) error + func (p *ListKeysParams) Validate(ctx ActionCtx) error + type MappingsDescriber jwt.Mapping + func NewMappingsDescriber(m jwt.Mapping) *MappingsDescriber + func (i *MappingsDescriber) Describe() string + type MemResolverConfigBuilder struct + func NewMemResolverConfigBuilder() *MemResolverConfigBuilder + func (cb *MemResolverConfigBuilder) Add(rawClaim []byte) error + func (cb *MemResolverConfigBuilder) Generate() ([]byte, error) + func (cb *MemResolverConfigBuilder) GenerateConfig() ([]byte, error) + func (cb *MemResolverConfigBuilder) GenerateDir() ([]byte, error) + func (cb *MemResolverConfigBuilder) SetOutputDir(fp string) error + func (cb *MemResolverConfigBuilder) SetSystemAccount(id string) error + type MigrateCmdParams struct + Jobs []*MigrateJob + func (p *MigrateCmdParams) Load(ctx ActionCtx) error + func (p *MigrateCmdParams) PostInteractive(ctx ActionCtx) error + func (p *MigrateCmdParams) PreInteractive(ctx ActionCtx) error + func (p *MigrateCmdParams) Run(ctx ActionCtx) (store.Status, error) + func (p *MigrateCmdParams) SetDefaults(ctx ActionCtx) error + func (p *MigrateCmdParams) Validate(ctx ActionCtx) error + type MigrateJob struct + func NewMigrateJob(url string, overwrite bool) MigrateJob + func (j *MigrateJob) Load(ctx ActionCtx) + func (j *MigrateJob) OK() bool + func (j *MigrateJob) PostInteractive(ctx ActionCtx) + func (j *MigrateJob) Run(ctx ActionCtx) + func (j *MigrateJob) Validate(ctx ActionCtx) + type NKeyConfigBuilder struct + func NewNKeyConfigBuilder() *NKeyConfigBuilder + func (cb *NKeyConfigBuilder) Add(rawClaim []byte) error + func (cb *NKeyConfigBuilder) AddClaim(c jwt.Claims) + func (cb *NKeyConfigBuilder) Generate() ([]byte, error) + func (cb *NKeyConfigBuilder) SetOutputDir(fp string) error + func (cb *NKeyConfigBuilder) SetSystemAccount(id string) error + type NatsResolverConfigBuilder struct + func NewNatsResolverConfigBuilder() *NatsResolverConfigBuilder + func (cb *NatsResolverConfigBuilder) Add(rawClaim []byte) error + func (cb *NatsResolverConfigBuilder) Generate() ([]byte, error) + func (cb *NatsResolverConfigBuilder) SetOutputDir(fp string) error + func (cb *NatsResolverConfigBuilder) SetSystemAccount(id string) error + type NscURL struct + func ParseNscURL(u string) (*NscURL, error) + type NumberParams int64 + func (e *NumberParams) Edit(prompt string) error + func (e *NumberParams) Int64() int64 + func (e *NumberParams) Set(s string) error + func (e *NumberParams) String() string + func (e *NumberParams) Type() string + func (e *NumberParams) Valid() error + type OT struct + Accounts map[string]*jwt.AccountClaims + ActToUsers map[string]jwt.StringList + Jwts map[string]string + OC jwt.OperatorClaims + func NewOT() *OT + type OperatorDescriber struct + func NewOperatorDescriber(o jwt.OperatorClaims) *OperatorDescriber + func (o *OperatorDescriber) Describe() string + type PermissionsParams struct + func (p *PermissionsParams) Edit(hasPerm bool) error + func (p *PermissionsParams) Run(perms *jwt.Permissions, ctx ActionCtx) (*store.Report, error) + func (p *PermissionsParams) Validate() error + type Profile struct + Account *Details + Operator *Details + User *Details + UserCreds string + type ProfileCmdParams struct + func (p *ProfileCmdParams) Load(_ ActionCtx) error + func (p *ProfileCmdParams) PostInteractive(_ ActionCtx) error + func (p *ProfileCmdParams) PreInteractive(_ ActionCtx) error + func (p *ProfileCmdParams) Run(ctx ActionCtx) (store.Status, error) + func (p *ProfileCmdParams) SetDefaults(_ ActionCtx) error + func (p *ProfileCmdParams) Validate(ctx ActionCtx) error + type PubKeyChoice struct + Key string + Label string + type PubKeyParams struct + AllowWildcard bool + func (e *PubKeyParams) BindFlags(flagName string, shorthand string, kind nkeys.PrefixByte, cmd *cobra.Command) + func (e *PubKeyParams) Edit() error + func (e *PubKeyParams) Select(label string, choices ...PubKeyChoice) error + func (e *PubKeyParams) Valid() error + type PubParams struct + func (p *PubParams) Load(ctx ActionCtx) error + func (p *PubParams) PostInteractive(ctx ActionCtx) error + func (p *PubParams) PreInteractive(ctx ActionCtx) error + func (p *PubParams) Run(ctx ActionCtx) (store.Status, error) + func (p *PubParams) SetDefaults(ctx ActionCtx) error + func (p *PubParams) Validate(ctx ActionCtx) error + type PullJob struct + ASU string + Err error + LocalClaim jwt.Claims + Name string + PullStatus *store.Report + StoreErr error + func (j *PullJob) Run() + func (j *PullJob) Token() (string, error) + type PullJobs []*PullJob + type PullParams struct + All bool + Jobs PullJobs + Overwrite bool + func (p *PullParams) Load(ctx ActionCtx) error + func (p *PullParams) PostInteractive(ctx ActionCtx) error + func (p *PullParams) PreInteractive(ctx ActionCtx) error + func (p *PullParams) Run(ctx ActionCtx) (store.Status, error) + func (p *PullParams) SetDefaults(ctx ActionCtx) error + func (p *PullParams) Validate(ctx ActionCtx) error + type PushCmdParams struct + ASU string + func (p *PushCmdParams) Load(ctx ActionCtx) error + func (p *PushCmdParams) PostInteractive(_ ActionCtx) error + func (p *PushCmdParams) PreInteractive(ctx ActionCtx) error + func (p *PushCmdParams) Run(ctx ActionCtx) (store.Status, error) + func (p *PushCmdParams) SetDefaults(ctx ActionCtx) error + func (p *PushCmdParams) Validate(ctx ActionCtx) error + type RenameAccountParams struct + func (p *RenameAccountParams) Load(ctx ActionCtx) error + func (p *RenameAccountParams) PostInteractive(ctx ActionCtx) error + func (p *RenameAccountParams) PreInteractive(ctx ActionCtx) error + func (p *RenameAccountParams) Run(ctx ActionCtx) (store.Status, error) + func (p *RenameAccountParams) SetDefaults(ctx ActionCtx) error + func (p *RenameAccountParams) Validate(ctx ActionCtx) error + type RepParams struct + func (p *RepParams) Load(ctx ActionCtx) error + func (p *RepParams) PostInteractive(ctx ActionCtx) error + func (p *RepParams) PreInteractive(ctx ActionCtx) error + func (p *RepParams) Run(ctx ActionCtx) (store.Status, error) + func (p *RepParams) SetDefaults(ctx ActionCtx) error + func (p *RepParams) Validate(ctx ActionCtx) error + type ReqParams struct + func (p *ReqParams) Load(ctx ActionCtx) error + func (p *ReqParams) PostInteractive(ctx ActionCtx) error + func (p *ReqParams) PreInteractive(ctx ActionCtx) error + func (p *ReqParams) Run(ctx ActionCtx) (store.Status, error) + func (p *ReqParams) SetDefaults(ctx ActionCtx) error + func (p *ReqParams) Validate(ctx ActionCtx) error + type RevokeActivationParams struct + func (p *RevokeActivationParams) Load(ctx ActionCtx) error + func (p *RevokeActivationParams) PostInteractive(ctx ActionCtx) error + func (p *RevokeActivationParams) PreInteractive(ctx ActionCtx) error + func (p *RevokeActivationParams) Run(ctx ActionCtx) (store.Status, error) + func (p *RevokeActivationParams) SetDefaults(ctx ActionCtx) error + func (p *RevokeActivationParams) Validate(ctx ActionCtx) error + type RevokeClearActivationParams struct + func (p *RevokeClearActivationParams) Load(ctx ActionCtx) error + func (p *RevokeClearActivationParams) PostInteractive(ctx ActionCtx) error + func (p *RevokeClearActivationParams) PreInteractive(ctx ActionCtx) error + func (p *RevokeClearActivationParams) Run(ctx ActionCtx) (store.Status, error) + func (p *RevokeClearActivationParams) SetDefaults(ctx ActionCtx) error + func (p *RevokeClearActivationParams) Validate(ctx ActionCtx) error + type RevokeListActivationParams struct + func (p *RevokeListActivationParams) Load(ctx ActionCtx) error + func (p *RevokeListActivationParams) PostInteractive(ctx ActionCtx) error + func (p *RevokeListActivationParams) PreInteractive(ctx ActionCtx) error + func (p *RevokeListActivationParams) Run(ctx ActionCtx) (store.Status, error) + func (p *RevokeListActivationParams) SetDefaults(ctx ActionCtx) error + func (p *RevokeListActivationParams) Validate(ctx ActionCtx) error + type RevokeListUserParams struct + func (p *RevokeListUserParams) Load(ctx ActionCtx) error + func (p *RevokeListUserParams) PostInteractive(ctx ActionCtx) error + func (p *RevokeListUserParams) PreInteractive(ctx ActionCtx) error + func (p *RevokeListUserParams) Run(ctx ActionCtx) (store.Status, error) + func (p *RevokeListUserParams) SetDefaults(ctx ActionCtx) error + func (p *RevokeListUserParams) Validate(ctx ActionCtx) error + type RevokeUserParams struct + func (p *RevokeUserParams) Load(ctx ActionCtx) error + func (p *RevokeUserParams) PostInteractive(ctx ActionCtx) error + func (p *RevokeUserParams) PreInteractive(ctx ActionCtx) error + func (p *RevokeUserParams) Run(ctx ActionCtx) (store.Status, error) + func (p *RevokeUserParams) SetDefaults(ctx ActionCtx) error + func (p *RevokeUserParams) Validate(ctx ActionCtx) error + type RttParams struct + func (p *RttParams) Load(ctx ActionCtx) error + func (p *RttParams) PostInteractive(ctx ActionCtx) error + func (p *RttParams) PreInteractive(ctx ActionCtx) error + func (p *RttParams) Run(ctx ActionCtx) (store.Status, error) + func (p *RttParams) SetDefaults(ctx ActionCtx) error + func (p *RttParams) Validate(ctx ActionCtx) error + type ScopedSkDescriber jwt.UserScope + func NewScopedSkDescriber(m *jwt.UserScope) *ScopedSkDescriber + func (s *ScopedSkDescriber) Describe() string + type SelfUpdate struct + func NewSelfUpdate() (*SelfUpdate, error) + func (u *SelfUpdate) Run() (*semver.Version, error) + type ServerConfigGenerator interface + Add func(rawClaim []byte) error + Generate func() ([]byte, error) + SetOutputDir func(fp string) error + SetSystemAccount func(pubkey string) error + type SetContextParams struct + Account string + Operator string + StoreRoot string + func (p *SetContextParams) PrintEnv(cmd *cobra.Command) + func (p *SetContextParams) Run(cmd *cobra.Command) error + type SignerParams struct + func (p *SignerParams) Edit(ctx ActionCtx) error + func (p *SignerParams) ForceManagedAccountKey(ctx ActionCtx, kp nkeys.KeyPair) + func (p *SignerParams) Resolve(ctx ActionCtx) error + func (p *SignerParams) ResolveWithPriority(ctx ActionCtx, preferKey string) error + func (p *SignerParams) SelectFromSigners(ctx ActionCtx, signers []string) error + func (p *SignerParams) SetDefaults(kind nkeys.PrefixByte, allowManaged bool, ctx ActionCtx) + func (p *SignerParams) SetPrompt(message string) + type SigningKeysParams struct + func (e *SigningKeysParams) BindFlags(flagName string, shorthand string, kind nkeys.PrefixByte, cmd *cobra.Command) + func (e *SigningKeysParams) Edit() error + func (e *SigningKeysParams) PublicKeys() ([]string, error) + func (e *SigningKeysParams) Valid() error + type Stack struct + func (s *Stack) Pop() *cobra.Command + func (s *Stack) Push(v *cobra.Command) + type SubParams struct + func (p *SubParams) Load(ctx ActionCtx) error + func (p *SubParams) PostInteractive(ctx ActionCtx) error + func (p *SubParams) PreInteractive(ctx ActionCtx) error + func (p *SubParams) Run(ctx ActionCtx) (store.Status, error) + func (p *SubParams) SetDefaults(ctx ActionCtx) error + func (p *SubParams) Validate(ctx ActionCtx) error + type TimeParams struct + Expiry string + Start string + func (p *TimeParams) BindFlags(cmd *cobra.Command) + func (p *TimeParams) Edit() error + func (p *TimeParams) ExpiryDate() (int64, error) + func (p *TimeParams) IsExpiryChanged() bool + func (p *TimeParams) IsStartChanged() bool + func (p *TimeParams) StartDate() (int64, error) + func (p *TimeParams) Validate() error + func (p *TimeParams) ValidateExpiry() error + func (p *TimeParams) ValidateStart() error + type ToolConfig struct + GithubUpdates string + LastUpdate int64 + func GetConfig() *ToolConfig + func LoadOrInit(github string, toolHomeEnvName string) (*ToolConfig, error) + func (d *ToolConfig) Save() error + func (d *ToolConfig) SetVersion(version string) + type UpdateCheckFn func(slug string, wantVer string) (*selfupdate.Release, bool, error) + type UpdateFn func(want *selfupdate.Release, cmdPath string) error + type UserContextParams struct + Name string + func (p *UserContextParams) BindFlags(cmd *cobra.Command) + func (p *UserContextParams) Edit(ctx ActionCtx) error + func (p *UserContextParams) SetDefaults(ctx ActionCtx) error + func (p *UserContextParams) Validate(ctx ActionCtx) error + type UserDescriber struct + func NewUserDescriber(u jwt.UserClaims) *UserDescriber + func (u *UserDescriber) Describe() string + type UserPermissionLimits struct + func (p *UserPermissionLimits) BindFlags(cmd *cobra.Command) + func (p *UserPermissionLimits) Load(ctx ActionCtx, u jwt.UserPermissionLimits) error + func (p *UserPermissionLimits) PostInteractive(_ ActionCtx) error + func (p *UserPermissionLimits) Run(ctx ActionCtx, claim *jwt.UserPermissionLimits) (*store.Report, error) + func (p *UserPermissionLimits) Validate(ctx ActionCtx) error + type ValidateCmdParams struct + func (p *ValidateCmdParams) Load(ctx ActionCtx) error + func (p *ValidateCmdParams) PostInteractive(ctx ActionCtx) error + func (p *ValidateCmdParams) PreInteractive(ctx ActionCtx) error + func (p *ValidateCmdParams) Run(ctx ActionCtx) (store.Status, error) + func (p *ValidateCmdParams) SetDefaults(ctx ActionCtx) error + func (p *ValidateCmdParams) Validate(ctx ActionCtx) error + type WideFun = func(a string) string