shell

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: MPL-2.0 Imports: 40 Imported by: 0

Documentation

Overview

Package shell provides an interactive command shell and the associated acmeshell commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACMEShell

type ACMEShell struct {
	*ishell.Shell
}

ACMEShell is an ishell.Shell instance tailored for ACME. At its core an ACMEShell is a github.com/cpu/acmeshell/acme/client.Client instance with an associated github.com/letsencrypt/challtestsrv.ChallengeTestSrv instance.

func NewACMEShell

func NewACMEShell(opts *ACMEShellOptions) *ACMEShell

NewACMEShell creates an ACMEShell instance by building an *ishell.Shell instance, a *challtestsrv.ChallengeTestSrv instance, and a *acme/client.Client instance. The latter two are stored in the shell instance for access by commands. Important: The *ACMEShell and its associated challenge test server will not be started until the Run() function of the ACMEShell instance is called.

func (*ACMEShell) Run

func (shell *ACMEShell) Run()

Run starts the ACMEShell, dropping into an interactive session that blocks on user input until it is time to exit. The ACMEShell's challenge server will be started before starting the shell, and shut down after the shell session ends.

type ACMEShellOptions

type ACMEShellOptions struct {
	acmeclient.ClientConfig
	// API address for an external pebble-challtestsrv instance. If not-empty this
	// precludes using the internal challenge test server and the
	// `HTTPPort`,`TLSPort`, and `DNSPort` options.
	ChallSrv string
	// Port number the ACME server validates HTTP-01 challenges over.
	HTTPPort int
	// Port number the ACME server validates TLS-ALPN-01 challenges over.
	TLSPort int
	// Port number the ACME server validates DNS-01 challenges over.
	DNSPort int
}

ACMEShellOptions allows specifying options for creating an ACME shell. This includes all of the acmeclient.ClientConfig options in addition to challenge server response ports for HTTP-01, TLS-ALPN-01 and DNS-01 challenges.

Directories

Path Synopsis
Package commands holds types and functions common across all ACMEShell commands.
Package commands holds types and functions common across all ACMEShell commands.
csr
get
post
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.

Jump to

Keyboard shortcuts

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