Documentation ¶
Index ¶
- type ClientConfig
- type Connection
- func (c *Connection) Auth(askpassword func() string, doRenew bool) error
- func (c *Connection) Get(urlEnd string) ([]byte, int, error)
- func (c *Connection) GetLifetime() int64
- func (c *Connection) GetRenew() string
- func (c *Connection) GetServer() string
- func (c *Connection) GetServerSkew() int64
- func (c *Connection) GetToken() string
- func (c *Connection) GetUsername() string
- func (c *Connection) MakeUrl(urlEnd string) string
- func (c *Connection) Post(urlEnd string, json []byte) ([]byte, int, error)
- type HeartbeatMessage
- type JSONOut
- type Login
- type PrintOptions
- func (p *PrintOptions) MarshalPrintJSON(m interface{})
- func (p *PrintOptions) MarshalPrintJSONError(m interface{}, err error) error
- func (p *PrintOptions) Print(txt string)
- func (p *PrintOptions) Printf(txt string, v ...interface{})
- func (p *PrintOptions) Println(a ...interface{})
- func (p *PrintOptions) Verbose(txt string)
- func (p *PrintOptions) Verbosef(txt string, v ...interface{})
- type ReturnStatus
- type SendID
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
type Connection ¶
type Connection struct { PrintOptions *PrintOptions // contains filtered or unexported fields }
func NewConnection ¶
func NewConnection(po *PrintOptions, server string, token string, login string, password string, ignoressc bool, renew string, lifetime int64, serverskew int64) *Connection
func NewConnectionFromCLIContext ¶
func NewConnectionFromCLIContext(po *PrintOptions, c *cli.Context) *Connection
func (*Connection) GetLifetime ¶
func (c *Connection) GetLifetime() int64
func (*Connection) GetRenew ¶
func (c *Connection) GetRenew() string
func (*Connection) GetServer ¶
func (c *Connection) GetServer() string
func (*Connection) GetServerSkew ¶
func (c *Connection) GetServerSkew() int64
func (*Connection) GetToken ¶
func (c *Connection) GetToken() string
func (*Connection) GetUsername ¶
func (c *Connection) GetUsername() string
func (*Connection) MakeUrl ¶
func (c *Connection) MakeUrl(urlEnd string) string
type HeartbeatMessage ¶
type HeartbeatMessage struct {
Status string `json:"status"`
}
type PrintOptions ¶
type PrintOptions struct { Json bool // contains filtered or unexported fields }
func NewPrintOptions ¶
func NewPrintOptions(json bool, verbose bool) PrintOptions
func NewPrintOptionsFromCLIContext ¶
func NewPrintOptionsFromCLIContext(c *cli.Context) PrintOptions
func (*PrintOptions) MarshalPrintJSON ¶
func (p *PrintOptions) MarshalPrintJSON(m interface{})
temporary, please use error pass through
func (*PrintOptions) MarshalPrintJSONError ¶
func (p *PrintOptions) MarshalPrintJSONError(m interface{}, err error) error
func (*PrintOptions) Print ¶
func (p *PrintOptions) Print(txt string)
func (*PrintOptions) Printf ¶
func (p *PrintOptions) Printf(txt string, v ...interface{})
func (*PrintOptions) Println ¶
func (p *PrintOptions) Println(a ...interface{})
func (*PrintOptions) Verbose ¶
func (p *PrintOptions) Verbose(txt string)
func (*PrintOptions) Verbosef ¶
func (p *PrintOptions) Verbosef(txt string, v ...interface{})
type ReturnStatus ¶
type ReturnStatus struct { Status string `json:"status"` Id string `json:"id,omitempty"` SubId string `json:"subid,omitempty"` }
very generic return can be used for error handling
Click to show internal directories.
Click to hide internal directories.