cmd

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2022 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DocTypeMan      = "man"
	DocTypeMarkdown = "markdown"
	DocTypeReST     = "rest"
	DocTypeYaml     = "yaml"
)
View Source
const (
	FileTypeJSON     = "json"
	FileTypeMarkdown = "md"
	FileTypeTOML     = "toml"
	FileTypeYAML     = "yaml"
)
View Source
const (
	ImTypeAudio = "audio"
	ImTypeFile  = "file"
	ImTypeID    = "id"
	ImTypePhoto = "photo"
	ImTypeText  = "text"
	ImTypeVideo = "video"
	ImTypeVoice = "voice"
)

Variables

This section is empty.

Functions

func Config added in v0.0.12

func Config(subFn configSelector)

func Examples added in v0.0.9

func Examples(s string) string

Print examples with color.

func Execute

func Execute()

func OutputDefaultJSON added in v0.0.12

func OutputDefaultJSON(r rootOutput)

func OutputDefaultString added in v0.0.12

func OutputDefaultString(r rootOutput)

func OutputDefaultYAML added in v0.0.12

func OutputDefaultYAML(r rootOutput)

func PrintJSON added in v0.0.12

func PrintJSON(i interface{})

func PrintYAML added in v0.0.12

func PrintYAML(i interface{})

func ValidDomain added in v0.0.12

func ValidDomain(i interface{}) bool

If i is a domain return true.

func ValidFile added in v0.0.12

func ValidFile(f string) bool

If f is a valid path return true.

func ValidURL added in v0.0.12

func ValidURL(u string) bool

If u is a valid url return true.

Types

type GeoIPBatch added in v0.0.7

type GeoIPBatch []GeoIPSingle

func (GeoIPBatch) JSON added in v0.0.11

func (g GeoIPBatch) JSON()

func (GeoIPBatch) Request added in v0.0.10

func (GeoIPBatch) Request(geoipBatch []string) (*GeoIPBatch, error)

func (GeoIPBatch) String added in v0.0.10

func (g GeoIPBatch) String()

func (GeoIPBatch) YAML added in v0.0.11

func (g GeoIPBatch) YAML()

type GeoIPSingle added in v0.0.7

type GeoIPSingle struct {
	Continent   string `json:"continent"`
	Country     string `json:"country"`
	CountryCode string `json:"countryCode"`
	RegionName  string `json:"regionName"`
	City        string `json:"city"`
	District    string `json:"district"`
	Timezone    string `json:"timezone"`
	Currency    string `json:"currency"`
	ISP         string `json:"isp"`
	Org         string `json:"org"`
	As          string `json:"as"`
	Asname      string `json:"asname"`
	Mobile      bool   `json:"mobile"`
	Proxy       bool   `json:"proxy"`
	Hosting     bool   `json:"hosting"`
	Query       string `json:"query"`
}

func (GeoIPSingle) JSON added in v0.0.11

func (g GeoIPSingle) JSON()

func (GeoIPSingle) Request added in v0.0.10

func (GeoIPSingle) Request(geoipInput string) (*GeoIPSingle, error)

func (GeoIPSingle) String added in v0.0.10

func (g GeoIPSingle) String()

func (GeoIPSingle) YAML added in v0.0.11

func (g GeoIPSingle) YAML()

Jump to

Keyboard shortcuts

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