cli

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

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

CLI provides a command-line interface for redactr

func New

func New(ted TokenRedacterUnredacter, execer Execer, opts ...NewOption) (*CLI, error)

New creates a new CLI

func (*CLI) Run

func (c *CLI) Run(arguments []string) error

Run runs the CLI

type Config

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

Config is used to configure a CLI

type Execer added in v0.2.0

type Execer interface {
	Exec(name string, args []string, opts ...redactr.ExecOption) error
}

An Execer can exec a shell command

type NewOption

type NewOption func(*Config)

A NewOption is used to alter a new CLI

func Commit

func Commit(v string) NewOption

Commit sets the commit of redactr, as reported by the CLI

func Date

func Date(v string) NewOption

Date sets the date of redactr, as reported by the CLI

func Version

func Version(v string) NewOption

Version sets the version of redactr, as reported by the CLI

type TokenRedacterUnredacter added in v0.2.0

type TokenRedacterUnredacter interface {
	RedactTokens(string) (string, error)
	UnredactTokens(string, ...redactr.UnredactTokensOption) (string, error)
}

A TokenRedacterUnredacter can redact and unredact tokens

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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