Documentation ¶
Index ¶
- func Debug(msg string, params ...interface{})
- func Error(msg string, params ...interface{})
- func Fatal(msg string, params ...interface{})
- func InitSyslog() (err error)
- func SetLevel(l Level)
- type Etcd
- func (e *Etcd) Connect(address []string, dialTimeout int) error
- func (e *Etcd) Delete(ctx context.Context, key string) *clientv3.DeleteResponse
- func (e *Etcd) Disconnect()
- func (e *Etcd) Get(ctx context.Context, key string) *clientv3.GetResponse
- func (e *Etcd) Put(ctx context.Context, key, value string) *clientv3.PutResponse
- type FileSystem
- type HTTPClient
- func (h *HTTPClient) BuildData(parameters map[string]string) string
- func (h *HTTPClient) BuildParameters(endpoint string, parameters map[string]string) (string, error)
- func (h *HTTPClient) Delete(endpoint string, parameters map[string]string, headers map[string]string) (*http.Response, error)
- func (h *HTTPClient) Get(endpoint string, parameters map[string]string, headers map[string]string) (*http.Response, error)
- func (h *HTTPClient) GetStatusCode(response *http.Response) int
- func (h *HTTPClient) Post(endpoint string, data string, parameters map[string]string, ...) (*http.Response, error)
- func (h *HTTPClient) Put(endpoint string, data string, parameters map[string]string, ...) (*http.Response, error)
- func (h *HTTPClient) ToString(response *http.Response) (string, error)
- type Level
- type Rabbitmq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(msg string, params ...interface{})
Debug prints a debug message. If syslog is enabled then LOG_NOTICE is used
Types ¶
type Etcd ¶
Etcd struct
type FileSystem ¶
type FileSystem struct{}
FileSystem struct
func (*FileSystem) DirExists ¶
func (fs *FileSystem) DirExists(path string) bool
DirExists reports whether the dir exists
func (*FileSystem) EnsureDir ¶
func (fs *FileSystem) EnsureDir(dirName string, mode int) (bool, error)
EnsureDir ensures that directory exists
func (*FileSystem) FileExists ¶
func (fs *FileSystem) FileExists(path string) bool
FileExists reports whether the named file exists
func (*FileSystem) PathExists ¶
func (fs *FileSystem) PathExists(path string) bool
PathExists reports whether the path exists
type HTTPClient ¶
type HTTPClient struct{}
HTTPClient struct
func NewHTTPClient ¶
func NewHTTPClient() *HTTPClient
NewHTTPClient creates an instance of http client
func (*HTTPClient) BuildData ¶
func (h *HTTPClient) BuildData(parameters map[string]string) string
BuildData build body data
func (*HTTPClient) BuildParameters ¶
BuildParameters add parameters to URL
func (*HTTPClient) Delete ¶
func (h *HTTPClient) Delete(endpoint string, parameters map[string]string, headers map[string]string) (*http.Response, error)
Delete http call
func (*HTTPClient) Get ¶
func (h *HTTPClient) Get(endpoint string, parameters map[string]string, headers map[string]string) (*http.Response, error)
Get http call
func (*HTTPClient) GetStatusCode ¶
func (h *HTTPClient) GetStatusCode(response *http.Response) int
GetStatusCode response status code
func (*HTTPClient) Post ¶
func (h *HTTPClient) Post(endpoint string, data string, parameters map[string]string, headers map[string]string) (*http.Response, error)
Post http call
Click to show internal directories.
Click to hide internal directories.