info

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(data []byte) (hub.AgentInfo, error)

Types

type Info

type Info struct {
	ID        string   `json:"id"`
	Name      string   `json:"name"`
	Tags      []string `json:"tags"`
	Auth      *bool    `json:"auth,omitempty"`
	Connected int64    `json:"connected"`
	IP        string   `json:"ip"`

	OS       string `json:"os"`
	Pwd      string `json:"pwd"`
	Arch     string `json:"arch"`
	Distro   string `json:"distro,omitempty"`
	Username string `json:"username"`
	Hostname string `json:"hostname"`
	// contains filtered or unexported fields
}

Metadata, for flatten json output Marshed by hub /api/agents/list Unmarshaled by client

func (*Info) GetArch

func (info *Info) GetArch() string

func (*Info) GetAuth

func (info *Info) GetAuth() bool

func (*Info) GetDistro

func (info *Info) GetDistro() string

func (*Info) GetHostname

func (info *Info) GetHostname() string

func (*Info) GetHtpasswd

func (info *Info) GetHtpasswd() map[string]string

func (*Info) GetID

func (info *Info) GetID() string

func (*Info) GetName

func (info *Info) GetName() string

func (*Info) GetOS

func (info *Info) GetOS() string

func (*Info) GetPwd

func (info *Info) GetPwd() string

func (*Info) GetTags

func (info *Info) GetTags() []string

func (*Info) GetUsername

func (info *Info) GetUsername() string

func (*Info) SetIP

func (info *Info) SetIP(ip string)

type Meta

type Meta struct {
	OS       string `json:"os"`
	Pwd      string `json:"pwd"`
	Arch     string `json:"arch"`
	Distro   string `json:"distro,omitempty"`
	Username string `json:"username"`
	Hostname string `json:"hostname"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳