Documentation ¶
Index ¶
- func Base16Encrypt(key string, data string) string
- func Base64Encrypt(key string, data string) string
- func RemoveTrailingSlash(url string) string
- type Correlation
- 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(ctx context.Context, endpoint string, parameters map[string]string, ...) (*http.Response, error)
- func (h *HttpClient) Get(ctx context.Context, endpoint string, parameters map[string]string, ...) (*http.Response, error)
- func (h *HttpClient) GetStatusCode(response *http.Response) int
- func (h *HttpClient) Post(ctx context.Context, endpoint string, data string, ...) (*http.Response, error)
- func (h *HttpClient) Put(ctx context.Context, endpoint string, data string, ...) (*http.Response, error)
- func (h *HttpClient) ToString(response *http.Response) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base16Encrypt ¶ added in v0.5.3
Base16Encrypt HMAC encrypt base16
func Base64Encrypt ¶ added in v0.5.3
Base64Encrypt HMAC encrypt base64
func RemoveTrailingSlash ¶ added in v0.5.3
RemoveTrailingSlash removes any trailing slash
Types ¶
type FileSystem ¶
type FileSystem struct { }
FileSystem struct
func (*FileSystem) DeleteDir ¶
func (fs *FileSystem) DeleteDir(dir string) error
DeleteDir deletes a dir
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) error
EnsureDir ensures that directory exists
func (*FileSystem) FileExists ¶
func (fs *FileSystem) FileExists(path string) bool
FileExists reports whether the named file exists
type HttpClient ¶ added in v0.5.3
type HttpClient struct { }
HttpClient struct
func NewHTTPClient ¶ added in v0.5.3
func NewHTTPClient() *HttpClient
NewHTTPClient creates an instance of http client
func (*HttpClient) BuildData ¶ added in v0.5.3
func (h *HttpClient) BuildData(parameters map[string]string) string
BuildData build body data
func (*HttpClient) BuildParameters ¶ added in v0.5.3
BuildParameters add parameters to URL
func (*HttpClient) Delete ¶ added in v0.5.3
func (h *HttpClient) Delete(ctx context.Context, endpoint string, parameters map[string]string, headers map[string]string) (*http.Response, error)
Delete http call
func (*HttpClient) Get ¶ added in v0.5.3
func (h *HttpClient) Get(ctx context.Context, endpoint string, parameters map[string]string, headers map[string]string) (*http.Response, error)
Get http call
func (*HttpClient) GetStatusCode ¶ added in v0.5.3
func (h *HttpClient) GetStatusCode(response *http.Response) int
GetStatusCode response status code
func (*HttpClient) Post ¶ added in v0.5.3
func (h *HttpClient) Post(ctx context.Context, 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.