Documentation
¶
Overview ¶
Package cmds provides the implementation backing token-forge's cli. This section of the cmds package holds implementation agnostic things used in other sections of the cmds package.
Package cmds provides the implementation backing token-forge's cli. This section of the cmds package holds the implementation for the disect command.
Package cmds provides the implementation backing token-forge's cli. This section of the cmds package hold the implementation for the generate command.
Package cmds provides the implementation backing token-forge's cli. This section of the cmds package holds the implementation for the login command.
Package cmds provides the implementation backing token-forge's cli. This section of the cmds package hold the implementation for the generate command.
Package cmds provides the implementation backing token-forge's cli. This section of the cmds package holds the implementation for the login command.
Package cmds provides the implementation backing token-forge's cli. This section of the cmds package holds the implementation for the login command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenGhTokenFunc ¶
GenGhTokenFunc returns a token generation function based on the provided token prefix; if an empty string is provided, the returned function will generate tokens with a randomly selected prefix; if a non-empty string is provided, then the returned function will generate all tokens w/ the given prefix. This does not check the validity of the provided token prefix.
Types ¶
type DisectCmd ¶
type DisectCmd struct {
Globals
TokenSourceArgs
TokenParams
}
DisectCmd represents the disect tokens cli command.
type GenCmd ¶
type GenCmd struct {
Globals
TokenParams
}
GenCmd represents the generate tokens cli command.
type GhUserInfo ¶
GhUserInfo holds GitHub user information along with the token used to get the information.
type Globals ¶
type Globals struct {
Debug bool `help:"Enable debug mode"`
}
Globals represents globally shared flags for cli commands.
type LocalCmd ¶
type LocalCmd struct {
Globals
TokenParams
NumTests uint64 `short:"t" default:"1" help:"Number of tokens to load into the test token database."`
}
LocalCmd represents the local collision test cli command.
type LoginCmd ¶
type LoginCmd struct {
Globals
TokenSourceArgs
TokenParams
ProxyConfig
ForceCheck bool `short:"c" help:"Force a check of the logged in user so the rate limit is decremented."`
Host string `help:"The GitHub Enterprise hostname to interact with; if not specified, github.com is assumed."`
}
LoginCmd represents the login w/ token(s) cli command.
type ProxyConfig ¶
type ProxyConfig struct {
Proxy string `help:"Proxy to use for outbound connections." group:"Proxy Config"`
}
ProxyConfig represents parameters for setting a proxy.
type TokenParams ¶
type TokenParams struct {
BatchSize int `short:"b" default:"1000" help:"When testing for collisions, the number of tokens to test concurrently." group:"Token Params"`
NumTokens uint64 `short:"n" default:"1" help:"Number of tokens to test." group:"Token Params"` // max = 18446744073709551615`
Prefix string `` /* 178-byte string literal not displayed */
}
TokenParams represents parameters for token generation.
type TokenSourceArgs ¶
type TokenSourceArgs struct {
Token string `short:"t" help:"Token to use." required:"" xor:"source" group:"Source"`
File string `short:"f" help:"Path to file with tokens." type:"existingfile" required:"" xor:"source" group:"Source"`
Generated bool `short:"g" help:"Use one or more generated tokens." required:"" xor:"source" group:"Source"`
NoAuth bool `` /* 126-byte string literal not displayed */
}
TokenSourceArgs represents a source of tokens.