Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Delete(ctx context.Context, scope scopes.Scope, paths []string) error
- func (c *Client) DoRawRequest(ctx context.Context, method string, scope scopes.Scope, paths []string, ...) (*http.Response, error)
- func (c *Client) DoRequest(ctx context.Context, method string, scope scopes.Scope, paths []string, ...) error
- func (c *Client) Get(ctx context.Context, scope scopes.Scope, paths []string, result interface{}, ...) error
- func (c *Client) Post(ctx context.Context, scope scopes.Scope, paths []string, result interface{}, ...) error
- func (c *Client) ProcessJSONError(response *http.Response, result interface{}) (err error)
- func (c *Client) ProcessRawError(response *http.Response, result interface{}) (err error)
- func (c *Client) Put(ctx context.Context, scope scopes.Scope, paths []string, result interface{}, ...) error
- type ErrAPIIncompatible
- type ErrResult
- type Filterer
Constants ¶
View Source
const ( ContentTypeJSON = "application/json" ContentTypeFormEncoded = "application/x-www-form-urlencoded" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Client http.Client oauth.ForgeAuthenticator }
func NewClient ¶
func NewClient(auth oauth.ForgeAuthenticator) *Client
func (*Client) DoRawRequest ¶
func (*Client) ProcessJSONError ¶
func (*Client) ProcessRawError ¶
type ErrAPIIncompatible ¶
ErrAPIIncompatible reflect that the API version and the API server are misaligned
func (ErrAPIIncompatible) Error ¶
func (err ErrAPIIncompatible) Error() string
func (ErrAPIIncompatible) Unwrap ¶
func (err ErrAPIIncompatible) Unwrap() error
type ErrResult ¶
ErrResult reflects the body content when a request failed (g.e. Bad request or key conflict)
func (ErrResult) IsForbidden ¶
func (ErrResult) IsNotFound ¶
func (ErrResult) IsRateLimited ¶
func (ErrResult) IsSystemIssue ¶
func (ErrResult) IsTokenExpired ¶
func (ErrResult) IsUnauthorized ¶
Click to show internal directories.
Click to hide internal directories.