Documentation ¶
Index ¶
Constants ¶
View Source
const ( AsanaHost = "https://app.asana.com" ContentType = "application/json" HttpGetMethod = "GET" HttpPutMethod = "PUT" HttpPostMethod = "POST" AsanaDateFormat = "2006-01-02" )
Variables ¶
View Source
var (
AsanaHeaders = make(map[string]string)
)
Functions ¶
func SetNetworkCfg ¶
func SetNetworkCfg(cfg Network)
Types ¶
type Client ¶
type Client struct { GatewayURL string URI string Headers map[string]string Authorization string Method string HTTPStatus int Body []byte // Indicates both Request Body & Response Body TraceId interface{} }
func NewHttpClient ¶
url, uri, method, body
func (*Client) BuildRequest ¶
type Network ¶
type Network struct { Env string `toml:"env"` Host []string `toml:"gateway"` GatewayURL string RequestTimeout time.Duration `toml:"request_timeout"` ConnectTimeout time.Duration `toml:"connect_timeout"` SocketTimeout time.Duration `toml:"socket_timeout"` }
Network contains common configuration.
Click to show internal directories.
Click to hide internal directories.