client

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(address string, logger *logrus.Logger, notification func(title, text string))

func NewConfigurationFile

func NewConfigurationFile() error

func NewNotification

func NewNotification(sendNotification bool, log *logrus.Logger) func(string, string)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewHttpClient

func NewHttpClient(r *common.Request) *Client

func (*Client) CreateRequest

func (c *Client) CreateRequest(method string) (*http.Request, error)

func (*Client) SendRequest

func (c *Client) SendRequest() error

type Configuration

type Configuration struct {
	Username string       `json:"username"`
	Routes   []RouteTable `json:"routes"`
}

func GetConfiguration

func GetConfiguration() (*Configuration, error)

func (*Configuration) AddRouteCallback

func (c *Configuration) AddRouteCallback(route, callback string)

func (*Configuration) Close

func (c *Configuration) Close()

func (*Configuration) Save

func (c *Configuration) Save() error

type Error

type Error struct {
	// contains filtered or unexported fields
}

func (*Error) Error

func (c *Error) Error() string

type RouteTable

type RouteTable struct {
	Route    string
	Callback string
}

Jump to

Keyboard shortcuts

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