Documentation
¶
Overview ¶
Package organization provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Index ¶
- func NewGetOrganizationRequest(server string) (*http.Request, error)
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- type ClientWithResponsesInterface
- type GetOrganizationResult
- func (r GetOrganizationResult) ContentType() string
- func (r GetOrganizationResult) GetApplicationproblemJSON401() *externalRef0.ErrorResponse
- func (r GetOrganizationResult) GetApplicationproblemJSON403() *externalRef0.ErrorResponse
- func (r GetOrganizationResult) GetApplicationproblemJSON404() *externalRef0.ErrorResponse
- func (r GetOrganizationResult) GetApplicationproblemJSON429() *externalRef0.ErrorResponse
- func (r GetOrganizationResult) GetApplicationproblemJSONDefault() *externalRef0.ErrorResponse
- func (r GetOrganizationResult) GetBody() []byte
- func (r GetOrganizationResult) GetJSON200() *externalRef0.Organization
- func (r GetOrganizationResult) Status() string
- func (r GetOrganizationResult) StatusCode() int
- type GetOrganizationResult200Headers
- type GetOrganizationResult403Headers
- type GetOrganizationResult404Headers
- type GetOrganizationResult429Headers
- type GetOrganizationResultDefaultHeaders
- type HttpRequestDoer
- type RequestEditorFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) GetOrganization ¶
func (c *Client) GetOrganization(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetOrganization Get your current organization
Returns the authenticated caller's current organization. Organization context comes from the caller's membership; no organization selector is required. Returns 404 when the caller does not belong to an organization, or 403 when organizations are unavailable to the caller.
Corresponds with GET /v2/organization (the `GetOrganization` operationId).
type ClientInterface ¶
type ClientInterface interface {
// GetOrganization Get your current organization
//
// Returns the authenticated caller's current organization. Organization context comes from the caller's membership; no organization selector is required. Returns 404 when the caller does not belong to an organization, or 403 when organizations are unavailable to the caller.
//
// Corresponds with GET /v2/organization (the `GetOrganization` operationId).
GetOrganization(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) GetOrganizationWithResponse ¶
func (c *ClientWithResponses) GetOrganizationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOrganizationResult, error)
GetOrganizationWithResponse Get your current organization
Returns the authenticated caller's current organization. Organization context comes from the caller's membership; no organization selector is required. Returns 404 when the caller does not belong to an organization, or 403 when organizations are unavailable to the caller.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v2/organization (the `GetOrganization` operationId).
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetOrganizationWithResponse Get your current organization
//
// Returns the authenticated caller's current organization. Organization context comes from the caller's membership; no organization selector is required. Returns 404 when the caller does not belong to an organization, or 403 when organizations are unavailable to the caller.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v2/organization (the `GetOrganization` operationId).
GetOrganizationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOrganizationResult, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type GetOrganizationResult ¶
type GetOrganizationResult struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *externalRef0.Organization
// ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response
ApplicationproblemJSON401 *externalRef0.ErrorResponse
// ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response
ApplicationproblemJSON403 *externalRef0.ErrorResponse
// ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response
ApplicationproblemJSON404 *externalRef0.ErrorResponse
// ApplicationproblemJSON429 the response for an HTTP 429 `application/problem+json` response
ApplicationproblemJSON429 *externalRef0.ErrorResponse
// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
ApplicationproblemJSONDefault *externalRef0.ErrorResponse
// Headers200 the parsed response headers for an HTTP 200 response
Headers200 *GetOrganizationResult200Headers
// Headers403 the parsed response headers for an HTTP 403 response
Headers403 *GetOrganizationResult403Headers
// Headers404 the parsed response headers for an HTTP 404 response
Headers404 *GetOrganizationResult404Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *GetOrganizationResult429Headers
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *GetOrganizationResultDefaultHeaders
}
func ParseGetOrganizationResult ¶
func ParseGetOrganizationResult(rsp *http.Response) (*GetOrganizationResult, error)
ParseGetOrganizationResult parses an HTTP response from a GetOrganizationWithResponse call
func (GetOrganizationResult) ContentType ¶
func (r GetOrganizationResult) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetOrganizationResult) GetApplicationproblemJSON401 ¶
func (r GetOrganizationResult) GetApplicationproblemJSON401() *externalRef0.ErrorResponse
GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response
func (GetOrganizationResult) GetApplicationproblemJSON403 ¶
func (r GetOrganizationResult) GetApplicationproblemJSON403() *externalRef0.ErrorResponse
GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response
func (GetOrganizationResult) GetApplicationproblemJSON404 ¶
func (r GetOrganizationResult) GetApplicationproblemJSON404() *externalRef0.ErrorResponse
GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response
func (GetOrganizationResult) GetApplicationproblemJSON429 ¶
func (r GetOrganizationResult) GetApplicationproblemJSON429() *externalRef0.ErrorResponse
GetApplicationproblemJSON429 returns the response for an HTTP 429 `application/problem+json` response
func (GetOrganizationResult) GetApplicationproblemJSONDefault ¶
func (r GetOrganizationResult) GetApplicationproblemJSONDefault() *externalRef0.ErrorResponse
GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response
func (GetOrganizationResult) GetBody ¶
func (r GetOrganizationResult) GetBody() []byte
GetBody returns the raw response body bytes
func (GetOrganizationResult) GetJSON200 ¶
func (r GetOrganizationResult) GetJSON200() *externalRef0.Organization
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetOrganizationResult) Status ¶
func (r GetOrganizationResult) Status() string
Status returns HTTPResponse.Status
func (GetOrganizationResult) StatusCode ¶
func (r GetOrganizationResult) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetOrganizationResult200Headers ¶
type GetOrganizationResult200Headers struct {
RateLimit *externalRef0.RateLimitHeader
RateLimitPolicy *externalRef0.RateLimitPolicyHeader
}
GetOrganizationResult200Headers the declared response headers of an HTTP 200 response for GetOrganization
type GetOrganizationResult403Headers ¶
type GetOrganizationResult403Headers struct {
RateLimit *externalRef0.RateLimitHeader
RateLimitPolicy *externalRef0.RateLimitPolicyHeader
}
GetOrganizationResult403Headers the declared response headers of an HTTP 403 response for GetOrganization
type GetOrganizationResult404Headers ¶
type GetOrganizationResult404Headers struct {
RateLimit *externalRef0.RateLimitHeader
RateLimitPolicy *externalRef0.RateLimitPolicyHeader
}
GetOrganizationResult404Headers the declared response headers of an HTTP 404 response for GetOrganization
type GetOrganizationResult429Headers ¶
type GetOrganizationResult429Headers struct {
RateLimit *externalRef0.RateLimitHeader
RateLimitPolicy *externalRef0.RateLimitPolicyHeader
RetryAfter *int
}
GetOrganizationResult429Headers the declared response headers of an HTTP 429 response for GetOrganization
type GetOrganizationResultDefaultHeaders ¶
type GetOrganizationResultDefaultHeaders struct {
RateLimit *externalRef0.RateLimitHeader
RateLimitPolicy *externalRef0.RateLimitPolicyHeader
}
GetOrganizationResultDefaultHeaders the declared response headers of an HTTP default response for GetOrganization
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.