cli

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package cli takes user input form cli

Package cli outputs messages to stdout

Index

Constants

View Source
const (
	// AppName the application name
	AppName = "ObjectMap"
)

Variables

This section is empty.

Functions

func NewOutput

func NewOutput() *logrus.Logger

NewOutput creates and returns a new logger instance that logs data to std out

Types

type Input

type Input struct {
	App                *cli.App
	URL                *url.URL
	URLScheme          string
	Method             string
	Body               io.ReadCloser
	RequestFile        string
	Request            *http.Request
	RequestRetries     int
	ConcurrentRequests int
	FollowRedirect     bool
	Timeout            int64
	UserAgent          string
	RandomUserAgent    bool
	Packages           bool
	PackagesRop        bool
	Banner             bool
	Verbosity          int
}

Input keeps console input variables and the cli app instance

func NewInput

func NewInput() (ci Input, err error)

NewInput creates a new ConsoleIn object

type Validator

type Validator struct{}

Validator handle

func (Validator) HTTPMethod

func (v Validator) HTTPMethod(method string) error

HTTPMethod validator

func (Validator) URL

func (v Validator) URL(u string) error

URL validator

func (Validator) VerboseLevel

func (v Validator) VerboseLevel(level int) error

VerboseLevel validator

Jump to

Keyboard shortcuts

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