Documentation ¶
Index ¶
- Constants
- func IntermediateCRLRevoke() error
- func IntermediateCRLUnrevoke() error
- func LeafCRLExpired() error
- func LeafCRLRevoke() error
- func LeafCRLUnrevoke() error
- func UserEnv(dir string) map[string]string
- type ExecOpts
- func (opts *ExecOpts) Clear()
- func (opts *ExecOpts) Exec(args ...string) *Matcher
- func (opts *ExecOpts) ExpectBlocking() *ExecOpts
- func (opts *ExecOpts) ExpectFailure() *ExecOpts
- func (opts *ExecOpts) WithDescription(text string) *ExecOpts
- func (opts *ExecOpts) WithEnv(env map[string]string) *ExecOpts
- func (opts *ExecOpts) WithInput(r io.Reader) *ExecOpts
- func (opts *ExecOpts) WithTimeOut(timeout time.Duration) *ExecOpts
- func (opts *ExecOpts) WithWorkDir(path string) *ExecOpts
- type HostOption
- type Matcher
- func (m *Matcher) MatchContent(content string) *Matcher
- func (m *Matcher) MatchErrContent(content string) *Matcher
- func (m *Matcher) MatchErrKeyWords(keywords ...string) *Matcher
- func (m *Matcher) MatchKeyWords(keywords ...string) *Matcher
- func (m *Matcher) NoMatchErrKeyWords(keywords ...string) *Matcher
- type VirtualHost
Constants ¶
const (
DefaultTimeout = 10 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func IntermediateCRLRevoke ¶
func IntermediateCRLRevoke() error
IntermediateCRLRevoke sends http post request to http://localhost:10086/intermediate/revoke
func IntermediateCRLUnrevoke ¶
func IntermediateCRLUnrevoke() error
IntermediateCRLUnrevoke sends http post request to http://localhost:10086/intermediate/unrevoke
func LeafCRLExpired ¶
func LeafCRLExpired() error
LeafCRLExpired sends http post request to http://localhost:10086/leaf/expired
func LeafCRLRevoke ¶
func LeafCRLRevoke() error
LeafCRLRevoke sends http post request to http://localhost:10086/leaf/revoke
func LeafCRLUnrevoke ¶
func LeafCRLUnrevoke() error
LeafCRLUnrevoke sends http post request to http://localhost:10086/leaf/unrevoke
Types ¶
type ExecOpts ¶
type ExecOpts struct {
// contains filtered or unexported fields
}
ExecOpts is an option used to execute a command.
func (*ExecOpts) Clear ¶
func (opts *ExecOpts) Clear()
Clear clears the ExecOpts to get ready for the next execution.
func (*ExecOpts) ExpectBlocking ¶
ExpectBlocking consistently check if the execution is blocked.
func (*ExecOpts) ExpectFailure ¶
ExpectFailure sets failure exit code checking for the execution.
func (*ExecOpts) WithDescription ¶
WithDescription sets description text for the execution.
func (*ExecOpts) WithTimeOut ¶
WithTimeOut sets timeout for the execution.
func (*ExecOpts) WithWorkDir ¶
WithWorkDir sets working directory for the execution.
type HostOption ¶
type HostOption func(vhost *VirtualHost) error
HostOption is a function to set the host configuration.
type Matcher ¶
Matcher contains the execution result for matching.
func NewMatcher ¶
NewMatcher returns a new Matcher.
func (*Matcher) MatchContent ¶
MatchContent matches the content with the stdout.
func (*Matcher) MatchErrContent ¶
MatchErrContent matches the content with stderr.
func (*Matcher) MatchErrKeyWords ¶
MatchErrKeyWords matches given keywords with the stderr.
func (*Matcher) MatchKeyWords ¶
MatchKeyWords matches given keywords with the stdout.
func (*Matcher) NoMatchErrKeyWords ¶
NoMatchErrKeyWords guarantees that the given keywords do not match with the stderr.
type VirtualHost ¶
type VirtualHost struct { Executor *ExecOpts // contains filtered or unexported fields }
VirtualHost is a virtualized host machine isolated by environment variable.
func NewVirtualHost ¶
func NewVirtualHost(binPath string, options ...HostOption) (*VirtualHost, error)
NewVirtualHost creates a temporary user-level directory and updates the "XDG_CONFIG_HOME" environment variable for Executor of the VirtualHost.
func (*VirtualHost) AbsolutePath ¶
func (h *VirtualHost) AbsolutePath(elem ...string) string
AbsolutePath returns the absolute path for the given path elements that are relative to the user directory.
func (*VirtualHost) SetOption ¶
func (h *VirtualHost) SetOption(options ...HostOption)
SetOption sets the options for the host.
func (*VirtualHost) UpdateEnv ¶
func (h *VirtualHost) UpdateEnv(env map[string]string)
UpdateEnv updates the environment variables for the VirtualHost.