Documentation
¶
Index ¶
- Constants
- func ParseURI(url *url.URL, uri string) string
- func ParseURL(s string) (*url.URL, error)
- type Client
- func (c *Client) DeleteTrip(ctx context.Context, api types.ICSApi, req interface{}) (*Response, error)
- func (c *Client) GetAccessKey() string
- func (c *Client) GetToken() string
- func (c *Client) GetTrip(ctx context.Context, api types.ICSApi, req interface{}) (*Response, error)
- func (c *Client) PostTrip(ctx context.Context, api types.ICSApi, req interface{}) (*Response, error)
- func (c *Client) PutTrip(ctx context.Context, api types.ICSApi, req interface{}) (*Response, error)
- func (c *Client) SetAccessKey(keyID string, keySecret string)
- func (c *Client) SetCheckParams(checkParams string)
- func (c *Client) SetToken(token string)
- func (c *Client) URL() *url.URL
- type Error
- type Response
- type RestAPITripper
Constants ¶
View Source
const (
SessionCookieName = "JSESSOINID"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { HttpClient *resty.Client Namespace string // ics internal Version string // ics api version Authorization string AccessKeyID string AccessKeySecret string CheckParams string // contains filtered or unexported fields }
func (*Client) DeleteTrip ¶
func (*Client) GetAccessKey ¶ added in v1.0.5
func (*Client) SetAccessKey ¶ added in v1.0.5
func (*Client) SetCheckParams ¶ added in v1.0.9
type Response ¶
func (*Response) IsError ¶
IsError method returns true if HTTP status `code >= 400` otherwise false.
func (*Response) IsSuccess ¶
IsSuccess method returns true if HTTP status `code >= 200 and <= 299` otherwise false.
func (*Response) RawBody ¶
func (r *Response) RawBody() io.ReadCloser
func (*Response) StatusCode ¶
type RestAPITripper ¶
type RestAPITripper interface { GetTrip(ctx context.Context, api types.ICSApi, req interface{}) (*Response, error) PostTrip(ctx context.Context, api types.ICSApi, req interface{}) (*Response, error) PutTrip(ctx context.Context, api types.ICSApi, req interface{}) (*Response, error) DeleteTrip(ctx context.Context, api types.ICSApi, req interface{}) (*Response, error) }
Click to show internal directories.
Click to hide internal directories.