Documentation
¶
Overview ¶
Package commands holds types and functions common across all ACMEShell commands.
Index ¶
- Constants
- func AddCommands(shell *ishell.Shell, client *acmeclient.Client)
- func ClientTemplate(c *acmeclient.Client, input string) (string, error)
- func DirectoryAutocompleter(c *acmeclient.Client) func(args []string) []string
- func EvalTemplate(templateStr string, ctx TemplateCtx) (string, error)
- func FindAuthzURL(ctx *ishell.Context, orderURL string, identifier string) (string, error)
- func FindChallengeURL(ctx *ishell.Context, authzURL string, challType string) (string, error)
- func FindOrderURL(ctx *ishell.Context, leftovers []string, orderIndex int) (string, error)
- func FindURL(c *acmeclient.Client, leftovers []string) (string, error)
- func GetClient(c shellContext) *acmeclient.Client
- func OkURL(urlStr string) bool
- func PickAuthz(c *ishell.Context, order *resources.Order) (*resources.Authorization, error)
- func PickAuthzURL(c *ishell.Context, order *resources.Order) (string, error)
- func PickChall(c *ishell.Context, authz *resources.Authorization) (*resources.Challenge, error)
- func PickOrder(c *ishell.Context) (*resources.Order, error)
- func PickOrderURL(c *ishell.Context) (string, error)
- func PrintJSON(ob interface{}) (string, error)
- func ReadJSON(c *ishell.Context) string
- func RegisterCommand(cmd *ishell.Cmd, completerFunc NewCommandAutocompleter, ...)
- type ChallengeServer
- type NewCommandAutocompleter
- type NewCommandHandler
- type TemplateCtx
Constants ¶
View Source
const ( // The base prompt used for shell commands BasePrompt = "[ ACME ] > " // The ishell context key that we store a client instance under. ClientKey = "client" // The ishell context key that we store a challenge response server instance // under. ChallSrvKey = "challsrv" )
Variables ¶
This section is empty.
Functions ¶
func AddCommands ¶
func AddCommands(shell *ishell.Shell, client *acmeclient.Client)
func ClientTemplate ¶
func ClientTemplate(c *acmeclient.Client, input string) (string, error)
func DirectoryAutocompleter ¶
func DirectoryAutocompleter(c *acmeclient.Client) func(args []string) []string
func EvalTemplate ¶
func EvalTemplate(templateStr string, ctx TemplateCtx) (string, error)
func FindAuthzURL ¶
func FindChallengeURL ¶
func FindOrderURL ¶
func GetClient ¶
func GetClient(c shellContext) *acmeclient.Client
GetClient reads a *acmeclient.Client from the shellContext or panics.
func RegisterCommand ¶
func RegisterCommand( cmd *ishell.Cmd, completerFunc NewCommandAutocompleter, handler NewCommandHandler, flags *flag.FlagSet)
Types ¶
type ChallengeServer ¶
type ChallengeServer interface {
// Start/stop the challenge server
Run()
Shutdown()
// HTTP-01 challenge add/remove
AddHTTPOneChallenge(token string, keyAuth string)
DeleteHTTPOneChallenge(token string)
// DNS-01 challenge add/remove
AddDNSOneChallenge(host string, keyAuth string)
DeleteDNSOneChallenge(host string)
// TLS-ALPN-01 challenge add/remove
AddTLSALPNChallenge(host string, keyAuth string)
DeleteTLSALPNChallenge(host string)
// Default IPv4/IPv6
SetDefaultDNSIPv4(addr string)
SetDefaultDNSIPv6(addr string)
// Mock DNS A records
AddDNSARecord(host string, addresses []string)
DeleteDNSARecord(host string)
// Mock DNS AAAA records
AddDNSAAAARecord(host string, addresses []string)
DeleteDNSAAAARecord(host string)
}
ChallengeServer is an interface for the parts of github.com/letsencrypt/challtestsrv.ChallengeServer that acmeshell uses.
func GetChallSrv ¶
func GetChallSrv(c shellContext) ChallengeServer
GetChallSrv reads a challengeServer from the shellContext or panics.
func NewRemoteChallengeServer ¶
func NewRemoteChallengeServer(addr string) (ChallengeServer, error)
type NewCommandAutocompleter ¶
type NewCommandAutocompleter func(c *acmeclient.Client) func(args []string) []string
type NewCommandHandler ¶
type TemplateCtx ¶
type TemplateCtx struct {
Acct *resources.Account
Client *acmeclient.Client
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package post implements an ACMEShell command for POSTing requests to an ACME server.
|
Package post implements an ACMEShell command for POSTing requests to an ACME server. |
Click to show internal directories.
Click to hide internal directories.