Documentation ¶
Index ¶
- Constants
- func HashAlgorithm(alg string) hash.Hash
- func NewRepository(username, repo string) *repository
- func ParseInterfaces(iface net.InterfaceStatList, counters []net.IOCountersStat) (map[string]int, map[int]string)
- func ReadConfig(block string, flag any) error
- func Run() *cobra.Command
- type Cert
- type Df
- type Dig
- type DigList
- type Discord
- type Encode
- func (*Encode) Base32HexDecode(s string) ([]byte, error)
- func (*Encode) Base32HexEncode(i any) (string, error)
- func (*Encode) Base32StdDecode(s string) ([]byte, error)
- func (*Encode) Base32StdEncode(i any) (string, error)
- func (*Encode) Base64StdDecode(s string) ([]byte, error)
- func (*Encode) Base64StdEncode(i any) (string, error)
- func (*Encode) Base64URLDecode(s string) ([]byte, error)
- func (*Encode) Base64URLEncode(i any) (string, error)
- func (*Encode) HexDecode(s string) ([]byte, error)
- func (*Encode) HexEncode(i any) (string, error)
- func (*Encode) JSONDecode(r io.Reader, i any) (any, error)
- func (*Encode) JSONEncode(i any) (string, error)
- func (*Encode) JSONMarshaler(src, dst any) error
- func (*Encode) PemDecode(b []byte) ([]byte, error)
- func (*Encode) PemEncode(i any, t ...string) (string, error)
- func (*Encode) XMLDecode(r io.Reader, i any) (any, error)
- func (*Encode) XMLEncode(i any) (string, error)
- func (*Encode) YamlDecode(r io.Reader, i any) (any, error)
- func (*Encode) YamlEncode(i any) (string, error)
- type Encrypt
- func (*Encrypt) CheckSecret(secret string) []byte
- func (e *Encrypt) DecryptFile(secret, filename, mode string) error
- func (e *Encrypt) DecryptString(secret, text, mode string) (string, error)
- func (e *Encrypt) EncryptFile(secret, filename, mode string) error
- func (e *Encrypt) EncryptString(secret, text, mode string) (string, error)
- func (e *Encrypt) GetKey(secret, filename string, perm os.FileMode) []byte
- type FileStat
- type Free
- type GeoIP
- type Hash
- type ICMPStat
- type ICP
- type LINE
- type MTR
- type Netmask
- type OTP
- func (o *OTP) GenSecret() (string, error)
- func (o *OTP) HOTP(secret string, timeInterval int64) (string, error)
- func (o *OTP) SetAlgorithm() func() hash.Hash
- func (o *OTP) SetDigits() [2]int
- func (o *OTP) SetTimeInterval() int64
- func (o *OTP) TOTP(secret string) (string, error)
- func (o *OTP) Verify(input, secret string) (bool, error)
- type Ping
- type Ps
- func (p *Ps) CPUGuestNiceTime() string
- func (p *Ps) CPUGuestTime() string
- func (p *Ps) CPUIdleTime() string
- func (p *Ps) CPUIowaitTime() string
- func (p *Ps) CPUIrqTime() string
- func (p *Ps) CPUNiceTime() string
- func (p *Ps) CPUPercent() string
- func (p *Ps) CPUSoftirqTime() string
- func (p *Ps) CPUStealTime() string
- func (p *Ps) CPUSystemTime() string
- func (p *Ps) CPUUserTime() string
- func (p *Ps) CreateTime() string
- func (p *Ps) Data() string
- func (p *Ps) Exe(b bool) string
- func (p *Ps) HWM() string
- func (p *Ps) Locked() string
- func (p *Ps) MemPercent() string
- func (p *Ps) Nice() string
- func (p *Ps) Pid() string
- func (p *Ps) Ppid() string
- func (p *Ps) ProcessName() string
- func (p *Ps) RSS() string
- func (p *Ps) Stack() string
- func (p *Ps) Status() string
- func (*Ps) String(header []string, data [][]string)
- func (p *Ps) Swap() string
- func (p *Ps) Thread() string
- func (p *Ps) Username() string
- func (p *Ps) VMS() string
- type Random
- type RandomCharacter
- type Redis
- type SSHKeygen
- type SSL
- type Slack
- type Ss
- type System
- type TCPing
- type Telegram
- func (t Telegram) Animation(chat int64, arg, caption string) error
- func (t *Telegram) Audio(chat int64, arg, caption string) error
- func (t Telegram) ChatDescription(chat int64, arg string) error
- func (t Telegram) ChatPhoto(chat int64, arg string) error
- func (t Telegram) ChatTitle(chat int64, arg string) error
- func (t Telegram) Dice(chat int64) error
- func (t *Telegram) File(chat int64, arg, caption string) error
- func (t *Telegram) GetUpdate()
- func (t *Telegram) Init(token string) error
- func (t *Telegram) Photo(chat int64, arg, caption string) error
- func (t *Telegram) Text(chat int64, arg string) error
- func (t *Telegram) Video(chat int64, arg, caption string) error
- func (t *Telegram) Voice(chat int64, arg, caption string) error
- type Traceroute
- type Updater
- type Version
- type Whois
Constants ¶
View Source
const ( CommandArping = "arping" CommandAudio = "audio" CommandBase32 = "base32" CommandBase64 = "base64" CommandBase32Hex = CommandBase32 + CommandHex CommandBase32Std = CommandBase32 + "std" CommandBase64Std = CommandBase64 + "std" CommandBase64URL = CommandBase64 + "url" CommandBootstrap = "bootstrap-token" CommandCalculate = "calculate" CommandCert = "cert" CommandConvert = "convert" CommandCPU = "cpu" CommandCsv = "csv" CommandCsv2JSON = CommandCsv + "2" + CommandJSON CommandCsv2Toml = CommandCsv + "2" + CommandToml CommandCsv2XML = CommandCsv + "2" + CommandXML CommandCsv2Yaml = CommandCsv + "2" + CommandYaml CommandDate = "date" CommandDf = "df" CommandDig = "dig" CommandDiscord = "discord" CommandDisk = "disk" CommandDoc = "doc" CommandDos2Unix = "dos2unix" CommandEncode = "encode" CommandEncrypt = "encrypt" CommandFile = "file" CommandFree = "free" CommandGenerate = "generate" CommandGeoip = "geoip" CommandHash = "hash" CommandHex = "hex" CommandHost = "host" CommandICP = "icp" CommandID = "id" CommandIP = "ip" CommandJSON = "json" CommandJSON2Csv = CommandJSON + "2" + CommandCsv CommandJSON2Toml = CommandJSON + "2" + CommandToml CommandJSON2XML = CommandJSON + "2" + CommandXML CommandJSON2Yaml = CommandJSON + "2" + CommandYaml CommandLINE = "line" CommandLoad = "load" CommandLowercase = "lowercase" CommandMan = "man" CommandMarkdown = "markdown" CommandMemory = "memory" CommandMTR = "mtr" CommandNetmask = "netmask" CommandNetwork = "network" CommandNumber = "number" CommandOTP = "otp" CommandPhoto = "photo" CommandPing = "ping" CommandPs = "ps" CommandQrcode = "qrcode" CommandRandom = "random" CommandRead = "read" CommandReadlink = "readlink" CommandRedis = "redis" CommandReST = "rest" CommandSign = "sign" CommandSlack = "slack" CommandSs = "ss" CommandSSH = "ssh-keygen" CommandSSL = "ssl" CommandStat = "stat" CommandString = "string" CommandSymbol = "symbol" CommandSystem = "system" CommandTCPing = "tcping" CommandTelegram = "telegram" CommandText = "text" CommandToml = "toml" CommandToml2Csv = CommandToml + "2" + CommandCsv CommandToml2JSON = CommandToml + "2" + CommandJSON CommandToml2XML = CommandToml + "2" + CommandXML CommandToml2Yaml = CommandToml + "2" + CommandYaml CommandTraceroute = "traceroute" CommandTree = "tree" CommandUpdate = "update" CommandUppercase = "uppercase" CommandURL = "url" CommandVersion = "version" CommandVideo = "video" CommandVoice = "voice" CommandWhois = "whois" CommandWiFi = "wifi" CommandWsping = "wsping" CommandXML = "xml" CommandXML2Csv = CommandXML + "2" + CommandCsv CommandXML2JSON = CommandXML + "2" + CommandJSON CommandXML2Toml = CommandXML + "2" + CommandToml CommandXML2Yaml = CommandXML + "2" + CommandYaml CommandYaml = "yaml" CommandYaml2Csv = CommandYaml + "2" + CommandCsv CommandYaml2JSON = CommandYaml + "2" + CommandJSON CommandYaml2Toml = CommandYaml + "2" + CommandToml CommandYaml2XML = CommandYaml + "2" + CommandXML )
View Source
const ( EncryptModeCFB = "CFB" EncryptModeCTR = "CTR" EncryptModeGCM = "GCM" EncryptModeOFB = "OFB" )
View Source
const ( FileModeROwner fs.FileMode = 0600 FileModeRAll fs.FileMode = 0644 )
View Source
const ( HashMd5 = "md5" HashSha1 = "sha1" HashSha224 = "sha224" HashSha256 = "sha256" HashSha384 = "sha384" HashSha512 = "sha512" HashSha512_224 = "sha512_224" HashSha512_256 = "sha512_256" )
View Source
const ( TypeBinary = "binary" TypeOctal = "octal" TypeDecimal = "decimal" TypeHex = "hex" TypeCisco = "cisco" )
Variables ¶
This section is empty.
Functions ¶
func HashAlgorithm ¶ added in v0.1.4
func NewRepository ¶ added in v0.2.0
func NewRepository(username, repo string) *repository
func ParseInterfaces ¶ added in v0.3.0
func ParseInterfaces(iface net.InterfaceStatList, counters []net.IOCountersStat) (map[string]int, map[int]string)
func ReadConfig ¶ added in v0.7.2
Types ¶
type Cert ¶ added in v0.11.5
type Cert struct { ExpiryTime string `json:"expiryTime,omitempty" yaml:"expiryTime,omitempty"` Days int `json:"days,omitempty" yaml:"days,omitempty"` Issuer string `json:"issuer,omitempty" yaml:"issuer,omitempty"` ServerIP string `json:"serverIp,omitempty" yaml:"serverIp,omitempty"` DNS []string `json:"dns,omitempty" yaml:"dns,omitempty"` }
type Df ¶ added in v0.14.4
type Df struct { Filesystem string `json:"Filesystem"` Size string `json:"Size"` Used string `json:"Used"` Avail string `json:"Avail"` UsedPercent string `json:"Use%"` MountedOn string `json:"Mounted on"` Fstype string `json:"FsType"` // Opts []string `json:"Opts"` // InodesSize uint64 `json:"iSize"` InodesUsed string `json:"iUsed"` InodesFree string `json:"iFree"` InodesUsedPercent string `json:"iUse%"` }
func (Df) OutputData ¶ added in v0.14.4
func (*Df) ParseDevices ¶ added in v0.14.4
func (d *Df) ParseDevices(usage *disk.UsageStat, partition []disk.PartitionStat)
type DigList ¶ added in v0.11.6
type DigList []Dig
func (*DigList) GetLocalServer ¶ added in v0.11.6
type Encode ¶ added in v0.11.5
type Encode struct{}
var Encoder Encode
func (*Encode) Base32HexDecode ¶ added in v0.11.5
func (*Encode) Base32HexEncode ¶ added in v0.11.5
func (*Encode) Base32StdDecode ¶ added in v0.11.5
func (*Encode) Base32StdEncode ¶ added in v0.11.5
func (*Encode) Base64StdDecode ¶ added in v0.11.5
func (*Encode) Base64StdEncode ¶ added in v0.11.5
func (*Encode) Base64URLDecode ¶ added in v0.11.5
func (*Encode) Base64URLEncode ¶ added in v0.11.5
func (*Encode) JSONDecode ¶ added in v0.11.5
func (*Encode) JSONMarshaler ¶ added in v0.11.5
func (*Encode) YamlDecode ¶ added in v0.11.5
type Encrypt ¶ added in v0.11.5
type Encrypt struct{}
var Encryptor Encrypt
func (*Encrypt) CheckSecret ¶ added in v0.11.5
func (*Encrypt) DecryptFile ¶ added in v0.11.5
func (*Encrypt) DecryptString ¶ added in v0.11.5
func (*Encrypt) EncryptFile ¶ added in v0.11.5
func (*Encrypt) EncryptString ¶ added in v0.11.5
type GeoIP ¶ added in v0.11.5
type GeoIP 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"` }
type ICP ¶ added in v0.11.5
type LINE ¶ added in v0.11.6
type LINE struct { API *linebot.Client Response *linebot.BasicResponse }
type MTR ¶ added in v0.12.0
type OTP ¶ added in v0.11.5
func (*OTP) SetAlgorithm ¶ added in v0.11.5
func (*OTP) SetTimeInterval ¶ added in v0.11.5
type Ping ¶ added in v0.11.6
type Ps ¶ added in v0.14.4
func (*Ps) CPUGuestNiceTime ¶ added in v0.14.4
func (*Ps) CPUGuestTime ¶ added in v0.14.4
func (*Ps) CPUIdleTime ¶ added in v0.14.4
func (*Ps) CPUIowaitTime ¶ added in v0.14.4
func (*Ps) CPUIrqTime ¶ added in v0.14.4
func (*Ps) CPUNiceTime ¶ added in v0.14.4
func (*Ps) CPUPercent ¶ added in v0.14.4
func (*Ps) CPUSoftirqTime ¶ added in v0.14.4
func (*Ps) CPUStealTime ¶ added in v0.14.4
func (*Ps) CPUSystemTime ¶ added in v0.14.4
func (*Ps) CPUUserTime ¶ added in v0.14.4
func (*Ps) CreateTime ¶ added in v0.14.4
func (*Ps) MemPercent ¶ added in v0.14.4
func (*Ps) ProcessName ¶ added in v0.14.4
type Random ¶ added in v0.11.5
type Random []byte
var Randoms Random
func (Random) GenerateAll ¶ added in v0.11.5
func (Random) GenerateString ¶ added in v0.11.5
func (Random) GenerateString(length int, charSet RandomCharacter) Random
type RandomCharacter ¶ added in v0.1.2
type RandomCharacter string
const ( LowercaseLetters RandomCharacter = "abcdefghijklmnopqrstuvwxyz" UppercaseLetters RandomCharacter = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" Symbols RandomCharacter = "~!@#$%^&*()_+`-={}|[]\\:\"<>?,./" Numbers RandomCharacter = "0123456789" AllSet RandomCharacter = LowercaseLetters + UppercaseLetters + Symbols + Numbers )
type SSHKeygen ¶ added in v0.11.5
type SSHKeygen struct{}
type Telegram ¶ added in v0.11.6
func (Telegram) ChatDescription ¶ added in v0.11.6
type Traceroute ¶ added in v0.11.5
type Traceroute struct {
Size, TTL, Retry int
Interval, Timeout time.Duration
Connetion *icmp.PacketConn
Data icmp.Message
Host string
Target *net.IPAddr
Count int
Record bool
Stat []ICMPStat
// contains filtered or unexported fields
}
func (*Traceroute) Connect ¶ added in v0.11.5
func (t *Traceroute) Connect(ctx context.Context, reply []byte) error
func (*Traceroute) Listen ¶ added in v0.11.7
func (*Traceroute) Listen() (*icmp.PacketConn, error)
type Updater ¶ added in v0.2.0
func NewUpdater ¶ added in v0.2.0
type Version ¶ added in v0.2.0
type Whois ¶ added in v0.11.6
type Whois struct { Registrar string `json:"registrar" yaml:"registrar"` CreatedDate string `json:"createdDate" yaml:"createdDate"` ExpiresDate string `json:"expiresDate" yaml:"expiresDate"` UpdatedDate string `json:"updatedDate" yaml:"updatedDate"` RemainDays int `json:"remainDays" yaml:"remainDays"` NameServers []string `json:"nameServers" yaml:"nameServers"` }
func (*Whois) CalculateDays ¶ added in v0.11.6
Convert time to days.
Source Files ¶
- arping.go
- cert.go
- constant.go
- convert.go
- date.go
- df.go
- dig.go
- discord.go
- doc.go
- dos2unix.go
- encode.go
- encrypt.go
- free.go
- geoip.go
- hash.go
- icp.go
- ip.go
- line.go
- mtr.go
- netmask.go
- otp.go
- ping.go
- ps.go
- qrcode.go
- random.go
- readlink.go
- redis.go
- root.go
- slack.go
- ss.go
- ssh.go
- ssl.go
- stat.go
- stat_linux.go
- system.go
- tcping.go
- telegram.go
- traceroute.go
- tree.go
- update.go
- url.go
- version.go
- whois.go
- wsping.go
Click to show internal directories.
Click to hide internal directories.