utils

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeSignature

func ComputeSignature(timestamp int64, secret string) string

func ComputeSignatureFmt

func ComputeSignatureFmt(timestamp int64, secret string) string

func TemplateParse added in v0.0.3

func TemplateParse(name, text string, data interface{}) ([]byte, error)

func TemplateParseFile added in v0.0.3

func TemplateParseFile(filename string, data interface{}) ([]byte, error)

Types

type HttpClient

type HttpClient struct {
	Url string
	// contains filtered or unexported fields
}

func NewHttpClient

func NewHttpClient(url string, timeout time.Duration) *HttpClient

func (*HttpClient) GetTimeout added in v0.0.2

func (c *HttpClient) GetTimeout() time.Duration

func (*HttpClient) GetURL added in v0.0.2

func (c *HttpClient) GetURL() string

func (*HttpClient) Request

func (c *HttpClient) Request(method string, header map[string]string, body []byte) (response *http.Response, err error)

func (*HttpClient) SetTimeout added in v0.0.2

func (c *HttpClient) SetTimeout(timeout time.Duration)

func (*HttpClient) SetURL added in v0.0.2

func (c *HttpClient) SetURL(url string)

Jump to

Keyboard shortcuts

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