cmd

package
v2.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 42 Imported by: 2

Documentation

Index

Constants

View Source
const EnvOperatorPrefix = "NSC_"
View Source
const EnvOperatorSuffix = "_OPERATOR"
View Source
const NscCwdOnlyEnv = "NSC_CWD_ONLY"
View Source
const NscHomeEnv = "NSC_HOME"

NscHomeEnv the folder for the config file

View Source
const NscNoGitIgnoreEnv = "NSC_NO_GIT_IGNORE"
View Source
const NscRootCasNatsEnv = "NATS_CA"
View Source
const NscTlsCertNatsEnv = "NATS_CERT"
View Source
const NscTlsKeyNatsEnv = "NATS_KEY"

Variables

View Source
var (
	ConfigDirFlag   string
	KeysDirFlag     string
	DataDirFlag     string
	AllDirFlag      string
	KeyPathFlag     string
	InteractiveFlag bool
)
View Source
var ErrNoOperator = errors.New("set an operator -- 'nsc env -o operatorName'")
View Source
var Json bool
View Source
var JsonPath string
View Source
var NscCwdOnly bool
View Source
var Raw bool
View Source
var Wide = noopNameFilter
View Source
var WideFlag bool

Functions

func AbbrevHomePaths

func AbbrevHomePaths(fp string) string

func AccountJwtURL

func AccountJwtURL(oc *jwt.OperatorClaims, ac *jwt.AccountClaims) (string, error)

func AccountJwtURLFromString

func AccountJwtURLFromString(asu string, accountSubject string) (string, error)

func AddLimits

func AddLimits(table *tablewriter.Table, lim jwt.Limits)

func AddListValues

func AddListValues(table *tablewriter.Table, label string, values []string)

func AddPermissions

func AddPermissions(table *tablewriter.Table, u jwt.Permissions)

func AddStandardClaimInfo

func AddStandardClaimInfo(table *tablewriter.Table, claims jwt.Claims)

func CreateAddAccountCmd

func CreateAddAccountCmd() *cobra.Command

func CreateAddUserCmd

func CreateAddUserCmd() *cobra.Command

func Debug

func Debug(label string, v interface{})

func Decrypt

func Decrypt(pk string, data []byte) ([]byte, error)

func DiffAccountLimits

func DiffAccountLimits(a *jwt.AccountClaims, b *jwt.AccountClaims) store.Status

func Encrypt

func Encrypt(pk string, data []byte) ([]byte, error)

func EncryptKV

func EncryptKV(pk string, data []byte) ([]byte, error)

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ExecuteWithWriter

func ExecuteWithWriter(out io.Writer) error

ExecuteWithWriter adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd. But writer is decided by the caller function returns error than os.Exit(1)

func Expand

func Expand(s string) (string, error)

ExpandPath expands the specified path calls. Resolves ~/ and ./.. paths.

func GenerateConfig

func GenerateConfig(s *store.Store, account string, user string, userKey nkeys.KeyPair) ([]byte, error)

func GetConfigDir

func GetConfigDir() string

func GetField

func GetField(data []byte, jp string) ([]byte, error)

Extracts a value from a JSON path - keys can be "name" or "person.name" or "persons[0].name"

func GetLastRandomName

func GetLastRandomName() string

GetLastRandomName returns the last generated name, useful for testing

func GetOperatorName

func GetOperatorName(name string, asu string) string

func GetOperatorSigners

func GetOperatorSigners(ctx ActionCtx) ([]string, error)

func GetOutput

func GetOutput(fp string) (*os.File, error)

func GetRandomName

func GetRandomName(retry int) string

GetRandomName generates a random name from the list of adjectives and surnames in this package formatted as "adjective_surname". For example 'focused_turing'. If retry is non-zero, a random integer between 0 and 10 will be added to the end of the name, e.g `focused_turing3`

func GetRootCmd

func GetRootCmd() *cobra.Command

func GetStore

func GetStore() (*store.Store, error)

func GetStoreForOperator

func GetStoreForOperator(operator string) (*store.Store, error)

func GetToolName

func GetToolName() string

func HoistRootFlags

func HoistRootFlags(cmd *cobra.Command) *cobra.Command

HoistRootFlags adds persistent flags that would be added by the cobra framework but are not because the unit tests are testing the command directly

func HumanizedDate

func HumanizedDate(d int64) string

func IsAccountAvailable

func IsAccountAvailable(status int) bool

func IsAccountPending

func IsAccountPending(status int) bool

func IsAccountServerURL added in v2.8.3

func IsAccountServerURL(u string) bool

func IsNatsUrl

func IsNatsUrl(url string) bool

func IsResolverURL added in v2.8.3

func IsResolverURL(u string) bool

func IsStdOut

func IsStdOut(fp string) bool

func IsURL

func IsURL(v string) bool

func IsValidDir

func IsValidDir(dir string) error

func JWTUpgradeBannerJWT

func JWTUpgradeBannerJWT(ver int) error

func LatencyMetricsSubjectValidator

func LatencyMetricsSubjectValidator(s string) error

func LoadFromFileOrURL

func LoadFromFileOrURL(v string) ([]byte, error)

func LoadFromURL

func LoadFromURL(url string) ([]byte, error)

func MaxArgs

func MaxArgs(max int) cobra.PositionalArgs

func MaybeMakeDir

func MaybeMakeDir(dir string) error

func NKeyValidator

func NKeyValidator(kind nkeys.PrefixByte) cli.Validator

func NameFlagOrArgument

func NameFlagOrArgument(name string, ctx ActionCtx) string

func OperatorJwtURL

func OperatorJwtURL(oc *jwt.OperatorClaims) (string, error)

func OperatorJwtURLFromString

func OperatorJwtURLFromString(asu string) (string, error)

func OperatorNameValidator

func OperatorNameValidator(v string) error

Validate an operator name

func ParseExpiry

func ParseExpiry(s string) (int64, error)

parse expiration argument - supported are YYYY-MM-DD for absolute, and relative (m)inute, (h)our, (d)ay, (w)week, (M)onth, (y)ear expressions

func ParseNumber

func ParseNumber(s string) (int64, error)

func PickAccount added in v2.8.5

func PickAccount(ctx *store.Context, name string) (string, error)

func PickUser added in v2.8.5

func PickUser(ctx *store.Context, accountName string) (string, error)

func PushAccount

func PushAccount(u string, accountjwt []byte) (int, []byte, error)

func Read

func Read(fp string) ([]byte, error)

func ReadJson

func ReadJson(fp string, v interface{}) error

func RenderDate

func RenderDate(d int64) string

func ResolveKeyFlag

func ResolveKeyFlag() (nkeys.KeyPair, error)

func ResolvePath

func ResolvePath(defaultPath string, varName string) string

ResolvePath resolves a directory/file from an environment variable if not set defaultPath is returned

func RunAction

func RunAction(cmd *cobra.Command, args []string, action interface{}) error

func RunMaybeStorelessAction

func RunMaybeStorelessAction(cmd *cobra.Command, args []string, action interface{}) error

func RunStoreLessAction

func RunStoreLessAction(cmd *cobra.Command, args []string, action interface{}) error

func SamplingValidator

func SamplingValidator(s string) error

func SeedNKeyValidatorMatching

func SeedNKeyValidatorMatching(pukeys []string, kinds ...nkeys.PrefixByte) cli.Validator

func SetEnvOptions

func SetEnvOptions()

func SetVersion

func SetVersion(version string)

func StoreAccountAndUpdateStatus

func StoreAccountAndUpdateStatus(ctx ActionCtx, token string, status *store.Report)

func TitleCase

func TitleCase(s string) string

func UnixToDate

func UnixToDate(d int64) string

func ValidSigner

func ValidSigner(kp nkeys.KeyPair, signers []string) (bool, error)

func Write

func Write(fp string, data []byte) error

func WriteJson

func WriteJson(fp string, v interface{}) error

Types

type AccountContextParams

type AccountContextParams struct {
	Name string
}

func (*AccountContextParams) BindFlags

func (p *AccountContextParams) BindFlags(cmd *cobra.Command)

func (*AccountContextParams) Edit

func (p *AccountContextParams) Edit(ctx ActionCtx) error

func (*AccountContextParams) SetDefaults

func (p *AccountContextParams) SetDefaults(ctx ActionCtx) error

func (*AccountContextParams) Validate

func (p *AccountContextParams) Validate(ctx ActionCtx) error

type AccountDescriber

type AccountDescriber struct {
	jwt.AccountClaims
}

func NewAccountDescriber

func NewAccountDescriber(ac jwt.AccountClaims) *AccountDescriber

func (*AccountDescriber) Describe

func (a *AccountDescriber) Describe() string

type AccountExport

type AccountExport struct {
	OperatorName string
	jwt.AccountClaims
}

func GetAllExports

func GetAllExports() ([]AccountExport, error)

func (*AccountExport) Choices

func (ae *AccountExport) Choices() []AccountExportChoice

type AccountExportChoice

type AccountExportChoice struct {
	AccountExport
	Selection *jwt.Export
}

func GetAccountExports

func GetAccountExports(ac *jwt.AccountClaims) ([]AccountExportChoice, error)

func (*AccountExportChoice) String

func (aec *AccountExportChoice) String() string

type AccountExportChoices

type AccountExportChoices []AccountExportChoice

func (AccountExportChoices) String

func (aes AccountExportChoices) String() []string

type AccountImport

type AccountImport struct {
	Name string
	ID   string
}

type AccountImportChoice

type AccountImportChoice struct {
	AccountImport
	Selection *jwt.Import
}

func (*AccountImportChoice) String

func (aec *AccountImportChoice) String() string

type AccountImportChoices

type AccountImportChoices []AccountImportChoice

func GetAccountImports

func GetAccountImports(ac *jwt.AccountClaims) (AccountImportChoices, error)

func (AccountImportChoices) String

func (aes AccountImportChoices) String() []string

type AccountUserContextParams

type AccountUserContextParams struct {
	AccountContextParams
	UserContextParams
}

func (*AccountUserContextParams) BindFlags

func (p *AccountUserContextParams) BindFlags(cmd *cobra.Command)

func (*AccountUserContextParams) Edit

func (*AccountUserContextParams) SetDefaults

func (p *AccountUserContextParams) SetDefaults(ctx ActionCtx) error

func (*AccountUserContextParams) Validate

func (p *AccountUserContextParams) Validate(ctx ActionCtx) error

type Action

type Action interface {
	// SetDefaults that can be derived from cmd flags
	SetDefaults(ctx ActionCtx) error
	// PreInteractive ask user for values
	PreInteractive(ctx ActionCtx) error
	// Load any data needed for the Run
	Load(ctx ActionCtx) error
	// PostInteractive ask user for values related to the action
	PostInteractive(ctx ActionCtx) error
	// Validate the action
	Validate(ctx ActionCtx) error
	// Run the action
	Run(ctx ActionCtx) (store.Status, error)
}

type ActionCtx

type ActionCtx interface {
	StoreCtx() *store.Context
	CurrentCmd() *cobra.Command
	Args() []string
	NothingToDo(flagNames ...string) bool
	AllSet(flagNames ...string) bool
	AnySet(flagNames ...string) bool
	CountSet(flagNames ...string) int
}

func NewActx

func NewActx(cmd *cobra.Command, args []string) (ActionCtx, error)

func NewStoreLessActx

func NewStoreLessActx(cmd *cobra.Command, args []string) (ActionCtx, error)

type ActionFn

type ActionFn func(ctx ActionCtx) error

type ActionRunFn

type ActionRunFn func(ctx ActionCtx) (store.Status, error)

type ActivationDescriber

type ActivationDescriber struct {
	jwt.ActivationClaims
}

func NewActivationDescriber

func NewActivationDescriber(a jwt.ActivationClaims) *ActivationDescriber

func (*ActivationDescriber) Describe

func (c *ActivationDescriber) Describe() string

type Actx

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

func (*Actx) AllSet

func (c *Actx) AllSet(flagNames ...string) bool

AllSet returns true if all flags are set

func (*Actx) AnySet

func (c *Actx) AnySet(flagNames ...string) bool

AnySet returns true if any of the flags are set

func (*Actx) Args

func (c *Actx) Args() []string

func (*Actx) CountSet

func (c *Actx) CountSet(flagNames ...string) int

func (*Actx) CurrentCmd

func (c *Actx) CurrentCmd() *cobra.Command

func (*Actx) NothingToDo

func (c *Actx) NothingToDo(flagNames ...string) bool

func (*Actx) StoreCtx

func (c *Actx) StoreCtx() *store.Context

type AddAccountParams

type AddAccountParams struct {
	SignerParams
	TimeParams
	PermissionsParams
	// contains filtered or unexported fields
}

func (*AddAccountParams) Load

func (p *AddAccountParams) Load(ctx ActionCtx) error

func (*AddAccountParams) PostInteractive

func (p *AddAccountParams) PostInteractive(ctx ActionCtx) error

func (*AddAccountParams) PreInteractive

func (p *AddAccountParams) PreInteractive(ctx ActionCtx) error

func (*AddAccountParams) Run

func (p *AddAccountParams) Run(ctx ActionCtx) (store.Status, error)

func (*AddAccountParams) SetDefaults

func (p *AddAccountParams) SetDefaults(ctx ActionCtx) error

func (*AddAccountParams) Validate

func (p *AddAccountParams) Validate(ctx ActionCtx) error

type AddExportParams

type AddExportParams struct {
	AccountContextParams
	SignerParams
	// contains filtered or unexported fields
}

func (*AddExportParams) Load

func (p *AddExportParams) Load(ctx ActionCtx) error

func (*AddExportParams) PostInteractive

func (p *AddExportParams) PostInteractive(_ ActionCtx) error

func (*AddExportParams) PreInteractive

func (p *AddExportParams) PreInteractive(ctx ActionCtx) error

func (*AddExportParams) Run

func (p *AddExportParams) Run(ctx ActionCtx) (store.Status, error)

func (*AddExportParams) SetDefaults

func (p *AddExportParams) SetDefaults(ctx ActionCtx) error

func (*AddExportParams) Validate

func (p *AddExportParams) Validate(ctx ActionCtx) error

type AddImportParams

type AddImportParams struct {
	AccountContextParams
	SignerParams
	// contains filtered or unexported fields
}

func (*AddImportParams) Load

func (p *AddImportParams) Load(ctx ActionCtx) error

func (*AddImportParams) PostInteractive

func (p *AddImportParams) PostInteractive(ctx ActionCtx) error

func (*AddImportParams) PreInteractive

func (p *AddImportParams) PreInteractive(ctx ActionCtx) error

func (*AddImportParams) Run

func (p *AddImportParams) Run(ctx ActionCtx) (store.Status, error)

func (*AddImportParams) SetDefaults

func (p *AddImportParams) SetDefaults(ctx ActionCtx) error

func (*AddImportParams) Validate

func (p *AddImportParams) Validate(ctx ActionCtx) error

type AddMappingParams

type AddMappingParams struct {
	AccountContextParams
	SignerParams
	// contains filtered or unexported fields
}

func (*AddMappingParams) Load

func (p *AddMappingParams) Load(ctx ActionCtx) error

func (*AddMappingParams) PostInteractive

func (p *AddMappingParams) PostInteractive(_ ActionCtx) error

func (*AddMappingParams) PreInteractive

func (p *AddMappingParams) PreInteractive(ctx ActionCtx) error

func (*AddMappingParams) Run

func (p *AddMappingParams) Run(ctx ActionCtx) (store.Status, error)

func (*AddMappingParams) SetDefaults

func (p *AddMappingParams) SetDefaults(ctx ActionCtx) error

func (*AddMappingParams) Validate

func (p *AddMappingParams) Validate(ctx ActionCtx) error

type AddOperatorParams

type AddOperatorParams struct {
	SignerParams
	TimeParams
	// contains filtered or unexported fields
}

func (*AddOperatorParams) Load

func (p *AddOperatorParams) Load(ctx ActionCtx) error

func (*AddOperatorParams) PostInteractive

func (p *AddOperatorParams) PostInteractive(ctx ActionCtx) error

func (*AddOperatorParams) PreInteractive

func (p *AddOperatorParams) PreInteractive(ctx ActionCtx) error

func (*AddOperatorParams) Run

func (p *AddOperatorParams) Run(ctx ActionCtx) (store.Status, error)

func (*AddOperatorParams) SetDefaults

func (p *AddOperatorParams) SetDefaults(ctx ActionCtx) error

func (*AddOperatorParams) Validate

func (p *AddOperatorParams) Validate(ctx ActionCtx) error

type AddUserParams

type AddUserParams struct {
	AccountContextParams
	SignerParams
	TimeParams
	PermissionsParams
	// contains filtered or unexported fields
}

func (*AddUserParams) Load

func (p *AddUserParams) Load(_ ActionCtx) error

func (*AddUserParams) PostInteractive

func (p *AddUserParams) PostInteractive(_ ActionCtx) error

func (*AddUserParams) PreInteractive

func (p *AddUserParams) PreInteractive(ctx ActionCtx) error

func (*AddUserParams) Run

func (p *AddUserParams) Run(ctx ActionCtx) (store.Status, error)

func (*AddUserParams) SetDefaults

func (p *AddUserParams) SetDefaults(ctx ActionCtx) error

func (*AddUserParams) Validate

func (p *AddUserParams) Validate(ctx ActionCtx) error

type Arg

type Arg string

type ByAccountName

type ByAccountName []AccountExport

func (ByAccountName) Len

func (a ByAccountName) Len() int

func (ByAccountName) Less

func (a ByAccountName) Less(i, j int) bool

func (ByAccountName) Swap

func (a ByAccountName) Swap(i, j int)

type ClearRevokeUserParams

type ClearRevokeUserParams struct {
	AccountContextParams

	SignerParams
	// contains filtered or unexported fields
}

ClearRevokeUserParams hold the info necessary to add a user to the revocation list in an account

func (*ClearRevokeUserParams) Load

func (p *ClearRevokeUserParams) Load(ctx ActionCtx) error

func (*ClearRevokeUserParams) PostInteractive

func (p *ClearRevokeUserParams) PostInteractive(ctx ActionCtx) error

func (*ClearRevokeUserParams) PreInteractive

func (p *ClearRevokeUserParams) PreInteractive(ctx ActionCtx) error

func (*ClearRevokeUserParams) Run

func (*ClearRevokeUserParams) SetDefaults

func (p *ClearRevokeUserParams) SetDefaults(ctx ActionCtx) error

func (*ClearRevokeUserParams) Validate

func (p *ClearRevokeUserParams) Validate(ctx ActionCtx) error

type ContextConfig

type ContextConfig struct {
	StoreRoot string `json:"store_root"` // where the projects are
	Operator  string `json:"operator"`
	Account   string `json:"account"`
}

func GetCwdCtx

func GetCwdCtx() *ContextConfig

func NewContextConfig

func NewContextConfig(storeRoot string) (*ContextConfig, error)

func (*ContextConfig) ListAccounts

func (c *ContextConfig) ListAccounts() ([]string, error)

func (*ContextConfig) ListOperators

func (c *ContextConfig) ListOperators() []string

func (*ContextConfig) LoadStore

func (c *ContextConfig) LoadStore(operatorName string) (*store.Store, error)

func (*ContextConfig) SetAccount

func (c *ContextConfig) SetAccount(account string) error

func (*ContextConfig) SetAccountTemp

func (c *ContextConfig) SetAccountTemp(account string) error

func (*ContextConfig) SetDefaults

func (c *ContextConfig) SetDefaults()

deduce as much context as possible

func (*ContextConfig) SetOperator

func (c *ContextConfig) SetOperator(operator string) error

func (*ContextConfig) Update

func (c *ContextConfig) Update(root string, operator string, account string) error

type DeleteAccountParams

type DeleteAccountParams struct {
	AccountContextParams
	SignerParams
	// contains filtered or unexported fields
}

func (*DeleteAccountParams) Load

func (p *DeleteAccountParams) Load(ctx ActionCtx) error

func (*DeleteAccountParams) PostInteractive

func (p *DeleteAccountParams) PostInteractive(ctx ActionCtx) error

func (*DeleteAccountParams) PreInteractive

func (p *DeleteAccountParams) PreInteractive(ctx ActionCtx) error

func (*DeleteAccountParams) Run

func (*DeleteAccountParams) SetDefaults

func (p *DeleteAccountParams) SetDefaults(ctx ActionCtx) error

func (*DeleteAccountParams) Validate

func (p *DeleteAccountParams) Validate(ctx ActionCtx) error

type DeleteExportParams

type DeleteExportParams struct {
	AccountContextParams
	SignerParams
	// contains filtered or unexported fields
}

func (*DeleteExportParams) Load

func (p *DeleteExportParams) Load(ctx ActionCtx) error

func (*DeleteExportParams) PostInteractive

func (p *DeleteExportParams) PostInteractive(ctx ActionCtx) error

func (*DeleteExportParams) PreInteractive

func (p *DeleteExportParams) PreInteractive(ctx ActionCtx) error

func (*DeleteExportParams) Run

func (*DeleteExportParams) SetDefaults

func (p *DeleteExportParams) SetDefaults(ctx ActionCtx) error

func (*DeleteExportParams) Validate

func (p *DeleteExportParams) Validate(ctx ActionCtx) error

type DeleteImportParams

type DeleteImportParams struct {
	AccountContextParams
	SignerParams
	// contains filtered or unexported fields
}

func (*DeleteImportParams) Load

func (p *DeleteImportParams) Load(ctx ActionCtx) error

func (*DeleteImportParams) PostInteractive

func (p *DeleteImportParams) PostInteractive(ctx ActionCtx) error

func (*DeleteImportParams) PreInteractive

func (p *DeleteImportParams) PreInteractive(ctx ActionCtx) error

func (*DeleteImportParams) Run

func (*DeleteImportParams) SetDefaults

func (p *DeleteImportParams) SetDefaults(ctx ActionCtx) error

func (*DeleteImportParams) Validate

func (p *DeleteImportParams) Validate(ctx ActionCtx) error

type DeleteMappingParams

type DeleteMappingParams struct {
	AccountContextParams
	SignerParams
	// contains filtered or unexported fields
}

func (*DeleteMappingParams) Load

func (p *DeleteMappingParams) Load(ctx ActionCtx) error

func (*DeleteMappingParams) PostInteractive

func (p *DeleteMappingParams) PostInteractive(ctx ActionCtx) error

func (*DeleteMappingParams) PreInteractive

func (p *DeleteMappingParams) PreInteractive(ctx ActionCtx) error

func (*DeleteMappingParams) Run

func (*DeleteMappingParams) SetDefaults

func (p *DeleteMappingParams) SetDefaults(ctx ActionCtx) error

func (*DeleteMappingParams) Validate

func (p *DeleteMappingParams) Validate(ctx ActionCtx) error

type DeleteUserParams

type DeleteUserParams struct {
	AccountContextParams
	SignerParams
	// contains filtered or unexported fields
}

func (*DeleteUserParams) Load

func (p *DeleteUserParams) Load(ctx ActionCtx) error

func (*DeleteUserParams) PostInteractive

func (p *DeleteUserParams) PostInteractive(ctx ActionCtx) error

func (*DeleteUserParams) PreInteractive

func (p *DeleteUserParams) PreInteractive(ctx ActionCtx) error

func (*DeleteUserParams) Run

func (p *DeleteUserParams) Run(ctx ActionCtx) (store.Status, error)

func (*DeleteUserParams) SetDefaults

func (p *DeleteUserParams) SetDefaults(ctx ActionCtx) error

func (*DeleteUserParams) Validate

func (p *DeleteUserParams) Validate(ctx ActionCtx) error

type DescribeAccountParams

type DescribeAccountParams struct {
	AccountContextParams
	jwt.AccountClaims
	// contains filtered or unexported fields
}

func (*DescribeAccountParams) Load

func (p *DescribeAccountParams) Load(ctx ActionCtx) error

func (*DescribeAccountParams) PostInteractive

func (p *DescribeAccountParams) PostInteractive(_ ActionCtx) error

func (*DescribeAccountParams) PreInteractive

func (p *DescribeAccountParams) PreInteractive(ctx ActionCtx) error

func (*DescribeAccountParams) Run

func (*DescribeAccountParams) SetDefaults

func (p *DescribeAccountParams) SetDefaults(ctx ActionCtx) error

func (*DescribeAccountParams) Validate

func (p *DescribeAccountParams) Validate(_ ActionCtx) error

type DescribeFile

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

func (*DescribeFile) Load

func (p *DescribeFile) Load(ctx ActionCtx) error

func (*DescribeFile) PostInteractive

func (p *DescribeFile) PostInteractive(ctx ActionCtx) error

func (*DescribeFile) PreInteractive

func (p *DescribeFile) PreInteractive(ctx ActionCtx) error

func (*DescribeFile) Run

func (p *DescribeFile) Run(ctx ActionCtx) (store.Status, error)

func (*DescribeFile) SetDefaults

func (p *DescribeFile) SetDefaults(ctx ActionCtx) error

func (*DescribeFile) Validate

func (p *DescribeFile) Validate(ctx ActionCtx) error

type DescribeOperatorParams

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

func (*DescribeOperatorParams) Load

func (p *DescribeOperatorParams) Load(ctx ActionCtx) error

func (*DescribeOperatorParams) PostInteractive

func (p *DescribeOperatorParams) PostInteractive(_ ActionCtx) error

func (*DescribeOperatorParams) PreInteractive

func (p *DescribeOperatorParams) PreInteractive(_ ActionCtx) error

func (*DescribeOperatorParams) Run

func (*DescribeOperatorParams) SetDefaults

func (p *DescribeOperatorParams) SetDefaults(ctx ActionCtx) error

func (*DescribeOperatorParams) Validate

func (p *DescribeOperatorParams) Validate(_ ActionCtx) error

type DescribeUserParams

type DescribeUserParams struct {
	AccountContextParams
	jwt.UserClaims
	// contains filtered or unexported fields
}

func (*DescribeUserParams) Load

func (p *DescribeUserParams) Load(ctx ActionCtx) error

func (*DescribeUserParams) PostInteractive

func (p *DescribeUserParams) PostInteractive(_ ActionCtx) error

func (*DescribeUserParams) PreInteractive

func (p *DescribeUserParams) PreInteractive(ctx ActionCtx) error

func (*DescribeUserParams) Run

func (*DescribeUserParams) SetDefaults

func (p *DescribeUserParams) SetDefaults(ctx ActionCtx) error

func (*DescribeUserParams) Validate

func (p *DescribeUserParams) Validate(_ ActionCtx) error

type Describer

type Describer interface {
	Describe() string
}

type Details

type Details struct {
	Service []string `json:"service,omitempty"`
	Name    string   `json:"name,omitempty"`
	Seed    string   `json:"seed,omitempty"`
	Key     string   `json:"id,omitempty"`
}

type EditAccountCalloutParams

type EditAccountCalloutParams struct {
	AccountContextParams
	SignerParams

	AuthUsers         []string
	AllowedAccounts   []string
	RmAuthUsers       []string
	RmAllowedAccounts []string
	XKey              SigningKeysParams
	RmXKey            bool
	// contains filtered or unexported fields
}

func (*EditAccountCalloutParams) Load

func (*EditAccountCalloutParams) PostInteractive

func (p *EditAccountCalloutParams) PostInteractive(_ ActionCtx) error

func (*EditAccountCalloutParams) PreInteractive

func (p *EditAccountCalloutParams) PreInteractive(_ ActionCtx) error

func (*EditAccountCalloutParams) Run

func (*EditAccountCalloutParams) SetDefaults

func (p *EditAccountCalloutParams) SetDefaults(ctx ActionCtx) error

func (*EditAccountCalloutParams) Validate

func (p *EditAccountCalloutParams) Validate(ctx ActionCtx) error

type EditAccountParams

type EditAccountParams struct {
	AccountContextParams
	SignerParams
	GenericClaimsParams
	PermissionsParams
	JetStreamLimitParams
	// contains filtered or unexported fields
}

func (*EditAccountParams) Load

func (p *EditAccountParams) Load(ctx ActionCtx) error

func (*EditAccountParams) PostInteractive

func (p *EditAccountParams) PostInteractive(ctx ActionCtx) error

func (*EditAccountParams) PostInteractiveTier

func (p *EditAccountParams) PostInteractiveTier(_ctx ActionCtx) error

func (*EditAccountParams) PreInteractive

func (p *EditAccountParams) PreInteractive(ctx ActionCtx) error

func (*EditAccountParams) Run

func (p *EditAccountParams) Run(ctx ActionCtx) (store.Status, error)

func (*EditAccountParams) SetDefaults

func (p *EditAccountParams) SetDefaults(ctx ActionCtx) error

func (*EditAccountParams) Validate

func (p *EditAccountParams) Validate(ctx ActionCtx) error

type EditExportParams

type EditExportParams struct {
	AccountContextParams
	SignerParams
	// contains filtered or unexported fields
}

func (*EditExportParams) Load

func (p *EditExportParams) Load(ctx ActionCtx) error

func (*EditExportParams) PostInteractive

func (p *EditExportParams) PostInteractive(ctx ActionCtx) error

func (*EditExportParams) PreInteractive

func (p *EditExportParams) PreInteractive(ctx ActionCtx) error

func (*EditExportParams) Run

func (p *EditExportParams) Run(ctx ActionCtx) (store.Status, error)

func (*EditExportParams) SetDefaults

func (p *EditExportParams) SetDefaults(ctx ActionCtx) error

func (*EditExportParams) Validate

func (p *EditExportParams) Validate(ctx ActionCtx) error

type EditOperatorParams

type EditOperatorParams struct {
	SignerParams
	GenericClaimsParams
	// contains filtered or unexported fields
}

func (*EditOperatorParams) Load

func (p *EditOperatorParams) Load(ctx ActionCtx) error

func (*EditOperatorParams) PostInteractive

func (p *EditOperatorParams) PostInteractive(ctx ActionCtx) error

func (*EditOperatorParams) PreInteractive

func (p *EditOperatorParams) PreInteractive(ctx ActionCtx) error

func (*EditOperatorParams) Run

func (*EditOperatorParams) SetDefaults

func (p *EditOperatorParams) SetDefaults(ctx ActionCtx) error

func (*EditOperatorParams) Validate

func (p *EditOperatorParams) Validate(ctx ActionCtx) error

type EditScopedSkParams

type EditScopedSkParams struct {
	UserPermissionLimits
	AccountContextParams
	SignerParams
	// contains filtered or unexported fields
}

func (*EditScopedSkParams) Load

func (p *EditScopedSkParams) Load(ctx ActionCtx) error

func (*EditScopedSkParams) PostInteractive

func (p *EditScopedSkParams) PostInteractive(ctx ActionCtx) error

func (*EditScopedSkParams) PreInteractive

func (p *EditScopedSkParams) PreInteractive(ctx ActionCtx) error

func (*EditScopedSkParams) Run

func (*EditScopedSkParams) SetDefaults

func (p *EditScopedSkParams) SetDefaults(ctx ActionCtx) error

func (*EditScopedSkParams) Validate

func (p *EditScopedSkParams) Validate(ctx ActionCtx) error

type EditUserParams

type EditUserParams struct {
	AccountContextParams
	SignerParams
	GenericClaimsParams

	UserPermissionLimits
	// contains filtered or unexported fields
}

func (*EditUserParams) Load

func (p *EditUserParams) Load(ctx ActionCtx) error

func (*EditUserParams) PostInteractive

func (p *EditUserParams) PostInteractive(ctx ActionCtx) error

func (*EditUserParams) PreInteractive

func (p *EditUserParams) PreInteractive(ctx ActionCtx) error

func (*EditUserParams) Run

func (p *EditUserParams) Run(ctx ActionCtx) (store.Status, error)

func (*EditUserParams) SetDefaults

func (p *EditUserParams) SetDefaults(ctx ActionCtx) error

func (*EditUserParams) Validate

func (p *EditUserParams) Validate(ctx ActionCtx) error

type EntryInfo

type EntryInfo struct {
	Name   string
	Claims jwt.Claims
	Err    error
}

func ListAccounts

func ListAccounts(s *store.Store) ([]*EntryInfo, error)

func ListUsers

func ListUsers(s *store.Store, accountName string) ([]*EntryInfo, error)

type EnvMigrateParams

type EnvMigrateParams struct {
	Dir string
}

type ExpirationReport added in v2.8.2

type ExpirationReport struct {
	Resource       string `json:"resource"`
	ID             string `json:"id"`
	When           string `json:"when"`
	Expiry         int64  `json:"expiry"`
	ExpirationDate string `json:"expiration_date"`
	ExpiresSoon    bool   `json:"expires_soon"`
	Expired        bool   `json:"expired"`
}

type ExpirationReportJSON added in v2.8.2

type ExpirationReportJSON struct {
	ExpirationThreshold string              `json:"expiration_threshold"`
	Report              []*ExpirationReport `json:"report"`
}

type ExpirationsParams added in v2.8.2

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

func (*ExpirationsParams) Load added in v2.8.2

func (p *ExpirationsParams) Load(ctx ActionCtx) error

func (*ExpirationsParams) PostInteractive added in v2.8.2

func (p *ExpirationsParams) PostInteractive(ctx ActionCtx) error

func (*ExpirationsParams) PreInteractive added in v2.8.2

func (p *ExpirationsParams) PreInteractive(ctx ActionCtx) error

func (*ExpirationsParams) Run added in v2.8.2

func (p *ExpirationsParams) Run(ctx ActionCtx) (store.Status, error)

func (*ExpirationsParams) SetDefaults added in v2.8.2

func (p *ExpirationsParams) SetDefaults(ctx ActionCtx) error

func (*ExpirationsParams) Validate added in v2.8.2

func (p *ExpirationsParams) Validate(ctx ActionCtx) error

type ExportJob

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

type ExportKeysParams

type ExportKeysParams struct {
	Force       bool
	Remove      bool
	Dir         string
	IncludeJwts bool
	KeyCollectorParams
}

func (*ExportKeysParams) Load

func (p *ExportKeysParams) Load(ctx ActionCtx) error

func (*ExportKeysParams) PostInteractive

func (p *ExportKeysParams) PostInteractive(ctx ActionCtx) error

func (*ExportKeysParams) PreInteractive

func (p *ExportKeysParams) PreInteractive(ctx ActionCtx) error

func (*ExportKeysParams) Run

func (p *ExportKeysParams) Run(ctx ActionCtx) (store.Status, error)

func (*ExportKeysParams) SetDefaults

func (p *ExportKeysParams) SetDefaults(ctx ActionCtx) error

func (*ExportKeysParams) Validate

func (p *ExportKeysParams) Validate(ctx ActionCtx) error

type ExportsDescriber

type ExportsDescriber struct {
	jwt.Exports
}

func NewExportsDescriber

func NewExportsDescriber(exports jwt.Exports) *ExportsDescriber

func (*ExportsDescriber) Describe

func (e *ExportsDescriber) Describe() string

type FixCmd

type FixCmd struct {
	Keys              map[string]string
	KeyToPrincipalKey map[string]string
	Operators         map[string]*OT
	// contains filtered or unexported fields
}

func (*FixCmd) Load

func (p *FixCmd) Load(ctx ActionCtx) error

func (*FixCmd) LoadAccounts

func (p *FixCmd) LoadAccounts(ctx ActionCtx) (*store.Report, error)

func (*FixCmd) LoadCreds

func (p *FixCmd) LoadCreds(ctx ActionCtx) (*store.Report, error)

func (*FixCmd) LoadNKey

func (p *FixCmd) LoadNKey(fp string) error

func (*FixCmd) LoadNKeys

func (p *FixCmd) LoadNKeys(ctx ActionCtx) (*store.Report, error)

func (*FixCmd) LoadOperators

func (p *FixCmd) LoadOperators(ctx ActionCtx) (*store.Report, error)

func (*FixCmd) LoadUsers

func (p *FixCmd) LoadUsers(ctx ActionCtx) (*store.Report, error)

func (*FixCmd) PostInteractive

func (p *FixCmd) PostInteractive(ctx ActionCtx) error

func (*FixCmd) PreInteractive

func (p *FixCmd) PreInteractive(ctx ActionCtx) error

func (*FixCmd) ReadAccountJwt

func (p *FixCmd) ReadAccountJwt(fp string) (*jwt.AccountClaims, string, error)

func (*FixCmd) ReadGenericJwt

func (p *FixCmd) ReadGenericJwt(fp string) (*jwt.GenericClaims, error)

func (*FixCmd) ReadOperatorJwt

func (p *FixCmd) ReadOperatorJwt(fp string) (*jwt.OperatorClaims, string, error)

func (*FixCmd) ReadUserJwt

func (p *FixCmd) ReadUserJwt(fp string) (*jwt.UserClaims, string, error)

func (*FixCmd) Regenerate

func (p *FixCmd) Regenerate(rr *store.Report) error

func (*FixCmd) Run

func (p *FixCmd) Run(ctx ActionCtx) (store.Status, error)

func (*FixCmd) SetDefaults

func (p *FixCmd) SetDefaults(ctx ActionCtx) error

func (*FixCmd) Validate

func (p *FixCmd) Validate(ctx ActionCtx) error

type GenerateActivationParams

type GenerateActivationParams struct {
	AccountContextParams
	SignerParams
	// contains filtered or unexported fields
}

func (*GenerateActivationParams) Load

func (*GenerateActivationParams) PostInteractive

func (p *GenerateActivationParams) PostInteractive(ctx ActionCtx) error

func (*GenerateActivationParams) PreInteractive

func (p *GenerateActivationParams) PreInteractive(ctx ActionCtx) error

func (*GenerateActivationParams) Run

func (*GenerateActivationParams) SetDefaults

func (p *GenerateActivationParams) SetDefaults(ctx ActionCtx) error

func (*GenerateActivationParams) Token

func (p *GenerateActivationParams) Token() string

func (*GenerateActivationParams) Validate

func (p *GenerateActivationParams) Validate(ctx ActionCtx) error

type GenerateContextParams added in v2.8.0

type GenerateContextParams struct {
	AccountContextParams
	// contains filtered or unexported fields
}

func (*GenerateContextParams) Load added in v2.8.0

func (p *GenerateContextParams) Load(ctx ActionCtx) error

func (*GenerateContextParams) PostInteractive added in v2.8.0

func (p *GenerateContextParams) PostInteractive(_ ActionCtx) error

func (*GenerateContextParams) PreInteractive added in v2.8.0

func (p *GenerateContextParams) PreInteractive(_ ActionCtx) error

func (*GenerateContextParams) Run added in v2.8.0

func (*GenerateContextParams) SetDefaults added in v2.8.0

func (p *GenerateContextParams) SetDefaults(ctx ActionCtx) error

func (*GenerateContextParams) Validate added in v2.8.0

func (p *GenerateContextParams) Validate(ctx ActionCtx) error

type GenerateCredsParams

type GenerateCredsParams struct {
	AccountContextParams
	// contains filtered or unexported fields
}

func (*GenerateCredsParams) Load

func (p *GenerateCredsParams) Load(ctx ActionCtx) error

func (*GenerateCredsParams) PostInteractive

func (p *GenerateCredsParams) PostInteractive(ctx ActionCtx) error

func (*GenerateCredsParams) PreInteractive

func (p *GenerateCredsParams) PreInteractive(ctx ActionCtx) error

func (*GenerateCredsParams) Run

func (*GenerateCredsParams) SetDefaults

func (p *GenerateCredsParams) SetDefaults(ctx ActionCtx) error

func (*GenerateCredsParams) Validate

func (p *GenerateCredsParams) Validate(ctx ActionCtx) error

type GenerateNKeysParam

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

func (*GenerateNKeysParam) Load

func (p *GenerateNKeysParam) Load(ctx ActionCtx) error

func (*GenerateNKeysParam) PostInteractive

func (p *GenerateNKeysParam) PostInteractive(ctx ActionCtx) error

func (*GenerateNKeysParam) PreInteractive

func (p *GenerateNKeysParam) PreInteractive(ctx ActionCtx) error

func (*GenerateNKeysParam) Run

func (*GenerateNKeysParam) SetDefaults

func (p *GenerateNKeysParam) SetDefaults(ctx ActionCtx) error

func (*GenerateNKeysParam) Validate

func (p *GenerateNKeysParam) Validate(ctx ActionCtx) error

type GenerateServerConfigParams

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

func (*GenerateServerConfigParams) Load

func (*GenerateServerConfigParams) PostInteractive

func (p *GenerateServerConfigParams) PostInteractive(ctx ActionCtx) error

func (*GenerateServerConfigParams) PreInteractive

func (p *GenerateServerConfigParams) PreInteractive(ctx ActionCtx) error

func (*GenerateServerConfigParams) Run

func (*GenerateServerConfigParams) SetDefaults

func (p *GenerateServerConfigParams) SetDefaults(ctx ActionCtx) error

func (*GenerateServerConfigParams) Validate

func (p *GenerateServerConfigParams) Validate(ctx ActionCtx) error

type GenericClaimsParams

type GenericClaimsParams struct {
	TimeParams
	// contains filtered or unexported fields
}

GenericClaimsParams - TimeParams and tags

func (*GenericClaimsParams) Edit

func (sp *GenericClaimsParams) Edit(current []string) error

func (*GenericClaimsParams) Run

func (sp *GenericClaimsParams) Run(ctx ActionCtx, claim jwt.Claims, r *store.Report) error

func (*GenericClaimsParams) Valid

func (sp *GenericClaimsParams) Valid() error

type ImportAccount

type ImportAccount struct {
	SignerParams
	// contains filtered or unexported fields
}

func (*ImportAccount) Load

func (p *ImportAccount) Load(ctx ActionCtx) (err error)

func (*ImportAccount) PostInteractive

func (p *ImportAccount) PostInteractive(ctx ActionCtx) (err error)

func (*ImportAccount) PreInteractive

func (p *ImportAccount) PreInteractive(ctx ActionCtx) (err error)

func (*ImportAccount) Run

func (p *ImportAccount) Run(ctx ActionCtx) (store.Status, error)

func (*ImportAccount) SetDefaults

func (p *ImportAccount) SetDefaults(ctx ActionCtx) error

func (*ImportAccount) Validate

func (p *ImportAccount) Validate(ctx ActionCtx) error

type ImportDescriber

type ImportDescriber struct {
	jwt.Import
}

func NewImportDescriber

func NewImportDescriber(im jwt.Import) *ImportDescriber

func (*ImportDescriber) Brief

func (i *ImportDescriber) Brief(table *tablewriter.Table)

func (*ImportDescriber) IsRemoteImport

func (i *ImportDescriber) IsRemoteImport() bool

func (*ImportDescriber) LoadActivation

func (i *ImportDescriber) LoadActivation() (*jwt.ActivationClaims, error)

type ImportKeysParams

type ImportKeysParams struct {
	Dir     string
	Recurse bool
}

func (*ImportKeysParams) Load

func (p *ImportKeysParams) Load(ctx ActionCtx) error

func (*ImportKeysParams) PostInteractive

func (p *ImportKeysParams) PostInteractive(ctx ActionCtx) error

func (*ImportKeysParams) PreInteractive

func (p *ImportKeysParams) PreInteractive(ctx ActionCtx) error

func (*ImportKeysParams) Run

func (p *ImportKeysParams) Run(ctx ActionCtx) (store.Status, error)

func (*ImportKeysParams) SetDefaults

func (p *ImportKeysParams) SetDefaults(ctx ActionCtx) error

func (*ImportKeysParams) Validate

func (p *ImportKeysParams) Validate(ctx ActionCtx) error

type ImportNKeyJob

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

type ImportUser

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

func (*ImportUser) Load

func (p *ImportUser) Load(ctx ActionCtx) (err error)

func (*ImportUser) PostInteractive

func (p *ImportUser) PostInteractive(ctx ActionCtx) (err error)

func (*ImportUser) PreInteractive

func (p *ImportUser) PreInteractive(ctx ActionCtx) (err error)

func (*ImportUser) Run

func (p *ImportUser) Run(ctx ActionCtx) (store.Status, error)

func (*ImportUser) SetDefaults

func (p *ImportUser) SetDefaults(_ctx ActionCtx) error

func (*ImportUser) Validate

func (p *ImportUser) Validate(ctx ActionCtx) error

type ImportsDescriber

type ImportsDescriber struct {
	jwt.Imports
}

func NewImportsDescriber

func NewImportsDescriber(imports jwt.Imports) *ImportsDescriber

func (*ImportsDescriber) Describe

func (i *ImportsDescriber) Describe() string

type InitCmdParams

type InitCmdParams struct {
	Prompt              bool
	Dir                 string
	Name                string
	ManagedOperatorName string
	CreateOperator      bool
	Operator            keys
	SystemAccount       keys
	SystemUser          keys
	Account             keys
	User                keys
	OperatorJwtURL      string
	AccountServerURL    string

	PushURL          string
	PushStatus       int
	PushMessage      []byte
	Store            *store.Store
	ServiceURLs      jwt.StringList
	DebugOperatorURL string
}

func (*InitCmdParams) Load

func (p *InitCmdParams) Load(ctx ActionCtx) error

func (*InitCmdParams) PostInteractive

func (p *InitCmdParams) PostInteractive(ctx ActionCtx) error

func (*InitCmdParams) PreInteractive

func (p *InitCmdParams) PreInteractive(ctx ActionCtx) error

func (*InitCmdParams) Run

func (p *InitCmdParams) Run(ctx ActionCtx) (store.Status, error)

func (*InitCmdParams) SetDefaults

func (p *InitCmdParams) SetDefaults(ctx ActionCtx) error

func (*InitCmdParams) Validate

func (p *InitCmdParams) Validate(ctx ActionCtx) error

type InterceptorFn

type InterceptorFn func(ctx ActionCtx, params interface{}) error

type JetStreamLimitParams

type JetStreamLimitParams struct {
	Tier               int
	DeleteTier         int
	MemStorage         NumberParams
	DiskStorage        NumberParams
	Streams            NumberParams
	Consumer           NumberParams
	MemMaxStreamBytes  NumberParams
	DiskMaxStreamBytes NumberParams
	MaxBytesRequired   bool
	MaxAckPending      NumberParams
	// contains filtered or unexported fields
}

type KP

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

func (*KP) Generate

func (e *KP) Generate() error

func (*KP) String

func (e *KP) String(pubOnly bool) string

type Key

type Key struct {
	Name         string
	Pub          string
	Parent       string
	ExpectedKind nkeys.PrefixByte
	Signing      bool
	Curve        bool
	KeyPath      string
	Invalid      bool
	Jwt          []byte
}

func (*Key) HasKey

func (k *Key) HasKey() bool

func (*Key) Resolve

func (k *Key) Resolve(ks store.KeyStore)

type KeyCollectorParams

type KeyCollectorParams struct {
	Operator     bool
	Accounts     bool
	Users        bool
	Curves       bool
	All          bool
	Unreferenced bool
	Account      string
	User         string
	Curve        string
	Filter       string
}

func (*KeyCollectorParams) Run

func (p *KeyCollectorParams) Run(ctx ActionCtx) (KeyList, error)

func (*KeyCollectorParams) SetDefaults

func (p *KeyCollectorParams) SetDefaults(ctx ActionCtx) error

type KeyList

type KeyList []*Key

func (KeyList) Code

func (ks KeyList) Code() store.StatusCode

func (KeyList) Len

func (ks KeyList) Len() int

func (KeyList) Less

func (ks KeyList) Less(i, j int) bool

func (KeyList) Swap

func (ks KeyList) Swap(i, j int)

type Keys

type Keys struct {
	KeyList
	MessageFn func(ks Keys) string
}

func (Keys) Message

func (keys Keys) Message() string

type KnownOperator

type KnownOperator struct {
	Name             string `json:"name"`
	URL              string `json:"url"`
	AccountServerURL string `json:"account_server_url"`
}

func FindKnownOperator

func FindKnownOperator(name string) (*KnownOperator, error)

type KnownOperators

type KnownOperators []KnownOperator

func GetWellKnownOperators

func GetWellKnownOperators() (KnownOperators, error)

type ListEditorParam

type ListEditorParam struct {
	PromptMessage string
	AddMessage    string
	FlagName      string
	Values        []string
	ValidatorFn   cli.Validator
}

func (*ListEditorParam) Edit

func (e *ListEditorParam) Edit() error

func (*ListEditorParam) GetValues

func (e *ListEditorParam) GetValues() []string

func (*ListEditorParam) Valid

func (e *ListEditorParam) Valid() error

type ListKeysParams

type ListKeysParams struct {
	Seeds bool
	KeyCollectorParams
	KS store.KeyStore
}

func (*ListKeysParams) Load

func (p *ListKeysParams) Load(ctx ActionCtx) error

func (*ListKeysParams) PostInteractive

func (p *ListKeysParams) PostInteractive(ctx ActionCtx) error

func (*ListKeysParams) PreInteractive

func (p *ListKeysParams) PreInteractive(ctx ActionCtx) error

func (*ListKeysParams) Report

func (p *ListKeysParams) Report(ks Keys) string

func (*ListKeysParams) ReportSeeds

func (p *ListKeysParams) ReportSeeds(ks Keys) string

func (*ListKeysParams) Run

func (p *ListKeysParams) Run(ctx ActionCtx) (store.Status, error)

func (*ListKeysParams) SetDefaults

func (p *ListKeysParams) SetDefaults(ctx ActionCtx) error

func (*ListKeysParams) Validate

func (p *ListKeysParams) Validate(ctx ActionCtx) error

type LoadParams

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

LoadParams prepares an NSC environment and NATS Cli context based on the URL of and Account seed. Requires NATS CLI to be in PATH to complete the setup of a user profile.

func (*LoadParams) Load

func (p *LoadParams) Load(ctx ActionCtx) error

func (*LoadParams) PostInteractive

func (p *LoadParams) PostInteractive(ctx ActionCtx) error

func (*LoadParams) PreInteractive

func (p *LoadParams) PreInteractive(ctx ActionCtx) error

func (*LoadParams) Run

func (p *LoadParams) Run(ctx ActionCtx) (store.Status, error)

Run executes the load profile command.

func (*LoadParams) SetDefaults

func (p *LoadParams) SetDefaults(ctx ActionCtx) error

func (*LoadParams) Validate

func (p *LoadParams) Validate(ctx ActionCtx) error

type MappingsDescriber

type MappingsDescriber jwt.Mapping

func NewMappingsDescriber

func NewMappingsDescriber(m jwt.Mapping) *MappingsDescriber

func (*MappingsDescriber) Describe

func (i *MappingsDescriber) Describe() string

type MemResolverConfigBuilder

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

func NewMemResolverConfigBuilder

func NewMemResolverConfigBuilder() *MemResolverConfigBuilder

func (*MemResolverConfigBuilder) Add

func (cb *MemResolverConfigBuilder) Add(rawClaim []byte) error

func (*MemResolverConfigBuilder) Generate

func (cb *MemResolverConfigBuilder) Generate() ([]byte, error)

func (*MemResolverConfigBuilder) GenerateConfig

func (cb *MemResolverConfigBuilder) GenerateConfig() ([]byte, error)

func (*MemResolverConfigBuilder) GenerateDir

func (cb *MemResolverConfigBuilder) GenerateDir() ([]byte, error)

func (*MemResolverConfigBuilder) SetOutputDir

func (cb *MemResolverConfigBuilder) SetOutputDir(fp string) error

func (*MemResolverConfigBuilder) SetSystemAccount

func (cb *MemResolverConfigBuilder) SetSystemAccount(id string) error

type MigrateCmdParams

type MigrateCmdParams struct {
	Jobs []*MigrateJob
	// contains filtered or unexported fields
}

func (*MigrateCmdParams) Load

func (p *MigrateCmdParams) Load(ctx ActionCtx) error

func (*MigrateCmdParams) PostInteractive

func (p *MigrateCmdParams) PostInteractive(ctx ActionCtx) error

func (*MigrateCmdParams) PreInteractive

func (p *MigrateCmdParams) PreInteractive(ctx ActionCtx) error

func (*MigrateCmdParams) Run

func (p *MigrateCmdParams) Run(ctx ActionCtx) (store.Status, error)

func (*MigrateCmdParams) SetDefaults

func (p *MigrateCmdParams) SetDefaults(ctx ActionCtx) error

func (*MigrateCmdParams) Validate

func (p *MigrateCmdParams) Validate(ctx ActionCtx) error

type MigrateJob

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

func NewMigrateJob

func NewMigrateJob(url string, overwrite bool) MigrateJob

func (*MigrateJob) Load

func (j *MigrateJob) Load(ctx ActionCtx)

func (*MigrateJob) OK

func (j *MigrateJob) OK() bool

func (*MigrateJob) PostInteractive

func (j *MigrateJob) PostInteractive(ctx ActionCtx)

func (*MigrateJob) Run

func (j *MigrateJob) Run(ctx ActionCtx)

func (*MigrateJob) Validate

func (j *MigrateJob) Validate(ctx ActionCtx)

type NKeyConfigBuilder

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

func NewNKeyConfigBuilder

func NewNKeyConfigBuilder() *NKeyConfigBuilder

func (*NKeyConfigBuilder) Add

func (cb *NKeyConfigBuilder) Add(rawClaim []byte) error

func (*NKeyConfigBuilder) AddClaim

func (cb *NKeyConfigBuilder) AddClaim(c jwt.Claims)

func (*NKeyConfigBuilder) Generate

func (cb *NKeyConfigBuilder) Generate() ([]byte, error)

func (*NKeyConfigBuilder) SetOutputDir

func (cb *NKeyConfigBuilder) SetOutputDir(fp string) error

func (*NKeyConfigBuilder) SetSystemAccount

func (cb *NKeyConfigBuilder) SetSystemAccount(id string) error

type NatsResolverConfigBuilder

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

func NewNatsResolverConfigBuilder

func NewNatsResolverConfigBuilder(cache bool) *NatsResolverConfigBuilder

func (*NatsResolverConfigBuilder) Add

func (cb *NatsResolverConfigBuilder) Add(rawClaim []byte) error

func (*NatsResolverConfigBuilder) Generate

func (cb *NatsResolverConfigBuilder) Generate() ([]byte, error)

func (*NatsResolverConfigBuilder) SetOutputDir

func (cb *NatsResolverConfigBuilder) SetOutputDir(fp string) error

func (*NatsResolverConfigBuilder) SetSystemAccount

func (cb *NatsResolverConfigBuilder) SetSystemAccount(id string) error

type NscURL

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

func ParseNscURL

func ParseNscURL(u string) (*NscURL, error)

type NumberParams

type NumberParams int64

func (*NumberParams) Edit

func (e *NumberParams) Edit(prompt string) error

func (*NumberParams) Int64

func (e *NumberParams) Int64() int64

func (*NumberParams) Set

func (e *NumberParams) Set(s string) error

func (*NumberParams) String

func (e *NumberParams) String() string

func (*NumberParams) Type

func (e *NumberParams) Type() string

func (*NumberParams) Valid

func (e *NumberParams) Valid() error

type OT

type OT struct {
	OC         jwt.OperatorClaims
	Jwts       map[string]string
	Accounts   map[string]*jwt.AccountClaims
	ActToUsers map[string]jwt.StringList
}

func NewOT

func NewOT() *OT

type OperatorDescriber

type OperatorDescriber struct {
	jwt.OperatorClaims
}

func NewOperatorDescriber

func NewOperatorDescriber(o jwt.OperatorClaims) *OperatorDescriber

func (*OperatorDescriber) Describe

func (o *OperatorDescriber) Describe() string

type PermissionsParams

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

func (*PermissionsParams) Edit

func (p *PermissionsParams) Edit(hasPerm bool) error

func (*PermissionsParams) Run

func (p *PermissionsParams) Run(perms *jwt.Permissions, ctx ActionCtx) (*store.Report, error)

func (*PermissionsParams) Validate

func (p *PermissionsParams) Validate() error

type Profile

type Profile struct {
	UserCreds string   `json:"user_creds,omitempty"`
	Operator  *Details `json:"operator,omitempty"`
	Account   *Details `json:"account,omitempty"`
	User      *Details `json:"user,omitempty"`
}

type ProfileCmdParams

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

func (*ProfileCmdParams) Load

func (p *ProfileCmdParams) Load(_ ActionCtx) error

func (*ProfileCmdParams) PostInteractive

func (p *ProfileCmdParams) PostInteractive(_ ActionCtx) error

func (*ProfileCmdParams) PreInteractive

func (p *ProfileCmdParams) PreInteractive(_ ActionCtx) error

func (*ProfileCmdParams) Run

func (p *ProfileCmdParams) Run(ctx ActionCtx) (store.Status, error)

func (*ProfileCmdParams) SetDefaults

func (p *ProfileCmdParams) SetDefaults(_ ActionCtx) error

func (*ProfileCmdParams) Validate

func (p *ProfileCmdParams) Validate(ctx ActionCtx) error

type PubKeyChoice

type PubKeyChoice struct {
	Label string
	Key   string
}

type PubKeyParams

type PubKeyParams struct {
	AllowWildcard bool
	// contains filtered or unexported fields
}

func (*PubKeyParams) BindFlags

func (e *PubKeyParams) BindFlags(flagName string, shorthand string, kind nkeys.PrefixByte, cmd *cobra.Command)

func (*PubKeyParams) Edit

func (e *PubKeyParams) Edit() error

func (*PubKeyParams) Select

func (e *PubKeyParams) Select(label string, choices ...PubKeyChoice) error

func (*PubKeyParams) SetDefaults

func (e *PubKeyParams) SetDefaults(ctx ActionCtx) error

func (*PubKeyParams) Valid

func (e *PubKeyParams) Valid() error

type PubParams

type PubParams struct {
	AccountUserContextParams
	// contains filtered or unexported fields
}

ToolPubParams is the driving struct for the list plans action

func (*PubParams) Load

func (p *PubParams) Load(ctx ActionCtx) error

func (*PubParams) PostInteractive

func (p *PubParams) PostInteractive(ctx ActionCtx) error

func (*PubParams) PreInteractive

func (p *PubParams) PreInteractive(ctx ActionCtx) error

func (*PubParams) Run

func (p *PubParams) Run(ctx ActionCtx) (store.Status, error)

func (*PubParams) SetDefaults

func (p *PubParams) SetDefaults(ctx ActionCtx) error

func (*PubParams) Validate

func (p *PubParams) Validate(ctx ActionCtx) error

type PullJob

type PullJob struct {
	Name       string
	ASU        string
	Err        error
	StoreErr   error
	LocalClaim jwt.Claims

	PullStatus *store.Report
}

func (*PullJob) Run

func (j *PullJob) Run()

func (*PullJob) Token

func (j *PullJob) Token() (string, error)

type PullJobs

type PullJobs []*PullJob

type PullParams

type PullParams struct {
	AccountContextParams
	All       bool
	Jobs      PullJobs
	Overwrite bool
	// contains filtered or unexported fields
}

func (*PullParams) Load

func (p *PullParams) Load(ctx ActionCtx) error

func (*PullParams) PostInteractive

func (p *PullParams) PostInteractive(ctx ActionCtx) error

func (*PullParams) PreInteractive

func (p *PullParams) PreInteractive(ctx ActionCtx) error

func (*PullParams) Run

func (p *PullParams) Run(ctx ActionCtx) (store.Status, error)

func (*PullParams) SetDefaults

func (p *PullParams) SetDefaults(ctx ActionCtx) error

func (*PullParams) Validate

func (p *PullParams) Validate(ctx ActionCtx) error

type PushCmdParams

type PushCmdParams struct {
	AccountContextParams
	ASU string
	// contains filtered or unexported fields
}

func (*PushCmdParams) Load

func (p *PushCmdParams) Load(ctx ActionCtx) error

func (*PushCmdParams) PostInteractive

func (p *PushCmdParams) PostInteractive(_ ActionCtx) error

func (*PushCmdParams) PreInteractive

func (p *PushCmdParams) PreInteractive(ctx ActionCtx) error

func (*PushCmdParams) Run

func (p *PushCmdParams) Run(ctx ActionCtx) (store.Status, error)

func (*PushCmdParams) SetDefaults

func (p *PushCmdParams) SetDefaults(ctx ActionCtx) error

func (*PushCmdParams) Validate

func (p *PushCmdParams) Validate(ctx ActionCtx) error

type RenameAccountParams

type RenameAccountParams struct {
	SignerParams
	// contains filtered or unexported fields
}

func (*RenameAccountParams) Load

func (p *RenameAccountParams) Load(ctx ActionCtx) error

func (*RenameAccountParams) PostInteractive

func (p *RenameAccountParams) PostInteractive(ctx ActionCtx) error

func (*RenameAccountParams) PreInteractive

func (p *RenameAccountParams) PreInteractive(ctx ActionCtx) error

func (*RenameAccountParams) Run

func (*RenameAccountParams) SetDefaults

func (p *RenameAccountParams) SetDefaults(ctx ActionCtx) error

func (*RenameAccountParams) Validate

func (p *RenameAccountParams) Validate(ctx ActionCtx) error

type RepParams

type RepParams struct {
	AccountUserContextParams
	// contains filtered or unexported fields
}

func (*RepParams) Load

func (p *RepParams) Load(ctx ActionCtx) error

func (*RepParams) PostInteractive

func (p *RepParams) PostInteractive(ctx ActionCtx) error

func (*RepParams) PreInteractive

func (p *RepParams) PreInteractive(ctx ActionCtx) error

func (*RepParams) Run

func (p *RepParams) Run(ctx ActionCtx) (store.Status, error)

func (*RepParams) SetDefaults

func (p *RepParams) SetDefaults(ctx ActionCtx) error

func (*RepParams) Validate

func (p *RepParams) Validate(ctx ActionCtx) error

type ReqParams

type ReqParams struct {
	AccountUserContextParams
	// contains filtered or unexported fields
}

func (*ReqParams) Load

func (p *ReqParams) Load(ctx ActionCtx) error

func (*ReqParams) PostInteractive

func (p *ReqParams) PostInteractive(ctx ActionCtx) error

func (*ReqParams) PreInteractive

func (p *ReqParams) PreInteractive(ctx ActionCtx) error

func (*ReqParams) Run

func (p *ReqParams) Run(ctx ActionCtx) (store.Status, error)

func (*ReqParams) SetDefaults

func (p *ReqParams) SetDefaults(ctx ActionCtx) error

func (*ReqParams) Validate

func (p *ReqParams) Validate(ctx ActionCtx) error

type RevokeActivationParams

type RevokeActivationParams struct {
	AccountContextParams
	SignerParams
	// contains filtered or unexported fields
}

RevokeActivationParams hold the info necessary to add a user to the revocation list in an account

func (*RevokeActivationParams) Load

func (p *RevokeActivationParams) Load(ctx ActionCtx) error

func (*RevokeActivationParams) PostInteractive

func (p *RevokeActivationParams) PostInteractive(ctx ActionCtx) error

func (*RevokeActivationParams) PreInteractive

func (p *RevokeActivationParams) PreInteractive(ctx ActionCtx) error

func (*RevokeActivationParams) Run

func (*RevokeActivationParams) SetDefaults

func (p *RevokeActivationParams) SetDefaults(ctx ActionCtx) error

func (*RevokeActivationParams) Validate

func (p *RevokeActivationParams) Validate(ctx ActionCtx) error

type RevokeClearActivationParams

type RevokeClearActivationParams struct {
	AccountContextParams
	SignerParams
	// contains filtered or unexported fields
}

RevokeClearActivationParams hold the info necessary to add a user to the revocation list in an account

func (*RevokeClearActivationParams) Load

func (*RevokeClearActivationParams) PostInteractive

func (p *RevokeClearActivationParams) PostInteractive(ctx ActionCtx) error

func (*RevokeClearActivationParams) PreInteractive

func (p *RevokeClearActivationParams) PreInteractive(ctx ActionCtx) error

func (*RevokeClearActivationParams) Run

func (*RevokeClearActivationParams) SetDefaults

func (p *RevokeClearActivationParams) SetDefaults(ctx ActionCtx) error

func (*RevokeClearActivationParams) Validate

func (p *RevokeClearActivationParams) Validate(ctx ActionCtx) error

type RevokeListActivationParams

type RevokeListActivationParams struct {
	AccountContextParams
	SignerParams
	// contains filtered or unexported fields
}

RevokeListActivationParams hold the info necessary to add a user to the revocation list in an account

func (*RevokeListActivationParams) Load

func (*RevokeListActivationParams) PostInteractive

func (p *RevokeListActivationParams) PostInteractive(ctx ActionCtx) error

func (*RevokeListActivationParams) PreInteractive

func (p *RevokeListActivationParams) PreInteractive(ctx ActionCtx) error

func (*RevokeListActivationParams) Run

func (*RevokeListActivationParams) SetDefaults

func (p *RevokeListActivationParams) SetDefaults(ctx ActionCtx) error

func (*RevokeListActivationParams) Validate

func (p *RevokeListActivationParams) Validate(ctx ActionCtx) error

type RevokeListUserParams

type RevokeListUserParams struct {
	AccountContextParams
	// contains filtered or unexported fields
}

RevokeListUserParams hold the info necessary to add a user to the revocation list in an account

func (*RevokeListUserParams) Load

func (p *RevokeListUserParams) Load(ctx ActionCtx) error

func (*RevokeListUserParams) PostInteractive

func (p *RevokeListUserParams) PostInteractive(ctx ActionCtx) error

func (*RevokeListUserParams) PreInteractive

func (p *RevokeListUserParams) PreInteractive(ctx ActionCtx) error

func (*RevokeListUserParams) Run

func (*RevokeListUserParams) SetDefaults

func (p *RevokeListUserParams) SetDefaults(ctx ActionCtx) error

func (*RevokeListUserParams) Validate

func (p *RevokeListUserParams) Validate(ctx ActionCtx) error

type RevokeUserParams

type RevokeUserParams struct {
	AccountContextParams

	SignerParams
	// contains filtered or unexported fields
}

RevokeUserParams hold the info necessary to add a user to the revocation list in an account

func (*RevokeUserParams) Load

func (p *RevokeUserParams) Load(ctx ActionCtx) error

func (*RevokeUserParams) PostInteractive

func (p *RevokeUserParams) PostInteractive(ctx ActionCtx) error

func (*RevokeUserParams) PreInteractive

func (p *RevokeUserParams) PreInteractive(ctx ActionCtx) error

func (*RevokeUserParams) Run

func (p *RevokeUserParams) Run(ctx ActionCtx) (store.Status, error)

func (*RevokeUserParams) SetDefaults

func (p *RevokeUserParams) SetDefaults(ctx ActionCtx) error

func (*RevokeUserParams) Validate

func (p *RevokeUserParams) Validate(ctx ActionCtx) error

type RttParams

type RttParams struct {
	AccountUserContextParams
	// contains filtered or unexported fields
}

func (*RttParams) Load

func (p *RttParams) Load(ctx ActionCtx) error

func (*RttParams) PostInteractive

func (p *RttParams) PostInteractive(ctx ActionCtx) error

func (*RttParams) PreInteractive

func (p *RttParams) PreInteractive(ctx ActionCtx) error

func (*RttParams) Run

func (p *RttParams) Run(ctx ActionCtx) (store.Status, error)

func (*RttParams) SetDefaults

func (p *RttParams) SetDefaults(ctx ActionCtx) error

func (*RttParams) Validate

func (p *RttParams) Validate(ctx ActionCtx) error

type ScopedSkDescriber

type ScopedSkDescriber jwt.UserScope

func NewScopedSkDescriber

func NewScopedSkDescriber(m *jwt.UserScope) *ScopedSkDescriber

func (*ScopedSkDescriber) Describe

func (s *ScopedSkDescriber) Describe() string

type SelfUpdate

type SelfUpdate struct {
}

func NewSelfUpdate

func NewSelfUpdate() (*SelfUpdate, error)

NewSelfUpdate creates a new self update object

func (*SelfUpdate) Run

func (u *SelfUpdate) Run() (*semver.Version, error)

type ServerConfigGenerator

type ServerConfigGenerator interface {
	Add(rawClaim []byte) error
	Generate() ([]byte, error)
	SetOutputDir(fp string) error
	SetSystemAccount(pubkey string) error
}

type SetContextParams

type SetContextParams struct {
	StoreRoot string
	Operator  string
	Account   string
}

func (*SetContextParams) PrintEnv

func (p *SetContextParams) PrintEnv(cmd *cobra.Command)

func (*SetContextParams) Run

func (p *SetContextParams) Run(cmd *cobra.Command) error

type SignerParams

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

SignerParams is shared UI for a signer (-K flag). The key for a signer is never generated and must be provided

func (*SignerParams) Edit

func (p *SignerParams) Edit(ctx ActionCtx) error

func (*SignerParams) ForceManagedAccountKey

func (p *SignerParams) ForceManagedAccountKey(ctx ActionCtx, kp nkeys.KeyPair)

func (*SignerParams) Resolve

func (p *SignerParams) Resolve(ctx ActionCtx) error

func (*SignerParams) ResolveWithPriority

func (p *SignerParams) ResolveWithPriority(ctx ActionCtx, preferKey string) error

func (*SignerParams) SelectFromSigners

func (p *SignerParams) SelectFromSigners(ctx ActionCtx, signers []string) error

func (*SignerParams) SetDefaults

func (p *SignerParams) SetDefaults(kind nkeys.PrefixByte, allowManaged bool, ctx ActionCtx)

func (*SignerParams) SetPrompt

func (p *SignerParams) SetPrompt(message string)

type SigningKeysParams

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

func (*SigningKeysParams) BindFlags

func (e *SigningKeysParams) BindFlags(flagName string, shorthand string, kind nkeys.PrefixByte, cmd *cobra.Command)

func (*SigningKeysParams) BindFlagsForOne added in v2.8.6

func (e *SigningKeysParams) BindFlagsForOne(flagName string, shorthand string, kind nkeys.PrefixByte, cmd *cobra.Command)

func (*SigningKeysParams) Edit

func (e *SigningKeysParams) Edit() error

func (*SigningKeysParams) Empty added in v2.8.6

func (e *SigningKeysParams) Empty() bool

func (*SigningKeysParams) PublicKeys

func (e *SigningKeysParams) PublicKeys() ([]string, error)

func (*SigningKeysParams) Valid

func (e *SigningKeysParams) Valid() error

type Stack

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

func (*Stack) Pop

func (s *Stack) Pop() *cobra.Command

func (*Stack) Push

func (s *Stack) Push(v *cobra.Command)

type SubParams

type SubParams struct {
	AccountUserContextParams
	// contains filtered or unexported fields
}

func (*SubParams) Load

func (p *SubParams) Load(ctx ActionCtx) error

func (*SubParams) PostInteractive

func (p *SubParams) PostInteractive(ctx ActionCtx) error

func (*SubParams) PreInteractive

func (p *SubParams) PreInteractive(ctx ActionCtx) error

func (*SubParams) Run

func (p *SubParams) Run(ctx ActionCtx) (store.Status, error)

func (*SubParams) SetDefaults

func (p *SubParams) SetDefaults(ctx ActionCtx) error

func (*SubParams) Validate

func (p *SubParams) Validate(ctx ActionCtx) error

type TimeParams

type TimeParams struct {
	Start  string
	Expiry string
}

func (*TimeParams) BindFlags

func (p *TimeParams) BindFlags(cmd *cobra.Command)

func (*TimeParams) Edit

func (p *TimeParams) Edit() error

func (*TimeParams) ExpiryDate

func (p *TimeParams) ExpiryDate() (int64, error)

func (*TimeParams) IsExpiryChanged

func (p *TimeParams) IsExpiryChanged() bool

func (*TimeParams) IsStartChanged

func (p *TimeParams) IsStartChanged() bool

func (*TimeParams) StartDate

func (p *TimeParams) StartDate() (int64, error)

func (*TimeParams) Validate

func (p *TimeParams) Validate() error

func (*TimeParams) ValidateExpiry

func (p *TimeParams) ValidateExpiry() error

func (*TimeParams) ValidateStart

func (p *TimeParams) ValidateStart() error

type ToolConfig

type ToolConfig struct {
	ContextConfig
	GithubUpdates string `json:"github_updates"` // git hub repo
	LastUpdate    int64  `json:"last_update"`
}

func GetConfig

func GetConfig() *ToolConfig

GetConfig returns the global config

func LoadOrInit

func LoadOrInit(configDir string, dataDir string, keystoreDir string) (*ToolConfig, error)

func (*ToolConfig) Save

func (d *ToolConfig) Save() error

func (*ToolConfig) SetVersion

func (d *ToolConfig) SetVersion(version string)

type UpdateCheckFn

type UpdateCheckFn func(slug string, wantVer string) (*selfupdate.Release, bool, error)

type UpdateFn

type UpdateFn func(want *selfupdate.Release, cmdPath string) error

type UserContextParams

type UserContextParams struct {
	Name string
}

func (*UserContextParams) BindFlags

func (p *UserContextParams) BindFlags(cmd *cobra.Command)

func (*UserContextParams) Edit

func (p *UserContextParams) Edit(ctx ActionCtx) error

func (*UserContextParams) SetDefaults

func (p *UserContextParams) SetDefaults(ctx ActionCtx) error

func (*UserContextParams) Validate

func (p *UserContextParams) Validate(ctx ActionCtx) error

type UserDescriber

type UserDescriber struct {
	jwt.UserClaims
}

func NewUserDescriber

func NewUserDescriber(u jwt.UserClaims) *UserDescriber

func (*UserDescriber) Describe

func (u *UserDescriber) Describe() string

type UserPermissionLimits

type UserPermissionLimits struct {
	PermissionsParams
	// contains filtered or unexported fields
}

func (*UserPermissionLimits) BindFlags

func (p *UserPermissionLimits) BindFlags(cmd *cobra.Command)

func (*UserPermissionLimits) Load

func (p *UserPermissionLimits) Load(ctx ActionCtx, u jwt.UserPermissionLimits) error

func (*UserPermissionLimits) PostInteractive

func (p *UserPermissionLimits) PostInteractive(_ ActionCtx) error

func (*UserPermissionLimits) Run

func (p *UserPermissionLimits) Run(ctx ActionCtx, claim *jwt.UserPermissionLimits) (*store.Report, error)

func (*UserPermissionLimits) Validate

func (p *UserPermissionLimits) Validate(ctx ActionCtx) error

type ValidateCmdParams

type ValidateCmdParams struct {
	AccountContextParams
	// contains filtered or unexported fields
}

func (*ValidateCmdParams) Load

func (p *ValidateCmdParams) Load(ctx ActionCtx) error

func (*ValidateCmdParams) PostInteractive

func (p *ValidateCmdParams) PostInteractive(ctx ActionCtx) error

func (*ValidateCmdParams) PreInteractive

func (p *ValidateCmdParams) PreInteractive(ctx ActionCtx) error

func (*ValidateCmdParams) Run

func (p *ValidateCmdParams) Run(ctx ActionCtx) (store.Status, error)

func (*ValidateCmdParams) SetDefaults

func (p *ValidateCmdParams) SetDefaults(ctx ActionCtx) error

func (*ValidateCmdParams) Validate

func (p *ValidateCmdParams) Validate(ctx ActionCtx) error

type WideFun

type WideFun = func(a string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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