Documentation ¶
Overview ¶
Package oauth provides primitives to interact with the openapi HTTP API.
Code generated by github.com/faetools/devtool version (devel) DO NOT EDIT.
Package oauth provides primitives to interact with the openapi HTTP API.
Code generated by github.com/faetools/devtool version (devel) DO NOT EDIT.
Index ¶
- Constants
- type AccessTokenInfoResponse
- type ArchiveRefreshTokenResponse
- type Client
- func (c *Client) ArchiveRefreshToken(ctx context.Context, token string, reqEditors ...client.RequestEditorFn) (*ArchiveRefreshTokenResponse, error)
- func (c *Client) CreateTokenWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*CreateTokenResponse, error)
- func (c *Client) GetAccessToken(ctx context.Context, token string, reqEditors ...client.RequestEditorFn) (*GetAccessTokenResponse, error)
- func (c *Client) GetRefreshToken(ctx context.Context, token string, reqEditors ...client.RequestEditorFn) (*GetRefreshTokenResponse, error)
- type ClientInterface
- type CreateTokenResponse
- type Error
- type ErrorDetail
- type ErrorDetail_Context
- type Error_Context
- type Error_Links
- type GetAccessTokenResponse
- type GetRefreshTokenResponse
- type RefreshTokenInfoResponse
- type TokenResponseIF
Constants ¶
const DefaultServer = "https://api.hubapi.com/"
DefaultServer is the default server to be used.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessTokenInfoResponse ¶
type AccessTokenInfoResponse struct { AppId int32 `json:"app_id"` ExpiresIn int32 `json:"expires_in"` HubDomain *string `json:"hub_domain,omitempty"` HubId int32 `json:"hub_id"` ScopeToScopeGroupPks []int32 `json:"scope_to_scope_group_pks"` Scopes []string `json:"scopes"` Token string `json:"token"` TokenType string `json:"token_type"` TrialScopeToScopeGroupPks []int32 `json:"trial_scope_to_scope_group_pks"` TrialScopes []string `json:"trial_scopes"` User *string `json:"user,omitempty"` UserId int32 `json:"user_id"` }
AccessTokenInfoResponse defines model for AccessTokenInfoResponse.
type ArchiveRefreshTokenResponse ¶
func (ArchiveRefreshTokenResponse) Status ¶
func (r ArchiveRefreshTokenResponse) Status() string
Status returns HTTPResponse.Status
func (ArchiveRefreshTokenResponse) StatusCode ¶
func (r ArchiveRefreshTokenResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Client ¶
Client conforms to the OpenAPI3 specification for this service.
func (*Client) ArchiveRefreshToken ¶
func (c *Client) ArchiveRefreshToken(ctx context.Context, token string, reqEditors ...client.RequestEditorFn) (*ArchiveRefreshTokenResponse, error)
ArchiveRefreshToken request returning *ArchiveRefreshTokenResponse
func (*Client) CreateTokenWithBody ¶
func (c *Client) CreateTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateTokenResponse, error)
CreateTokenWithBody request with arbitrary body returning *CreateTokenResponse
func (*Client) GetAccessToken ¶
func (c *Client) GetAccessToken(ctx context.Context, token string, reqEditors ...client.RequestEditorFn) (*GetAccessTokenResponse, error)
GetAccessToken request returning *GetAccessTokenResponse
func (*Client) GetRefreshToken ¶
func (c *Client) GetRefreshToken(ctx context.Context, token string, reqEditors ...client.RequestEditorFn) (*GetRefreshTokenResponse, error)
GetRefreshToken request returning *GetRefreshTokenResponse
type ClientInterface ¶
type ClientInterface interface { // GetAccessToken request GetAccessToken(ctx context.Context, token string, reqEditors ...client.RequestEditorFn) (*GetAccessTokenResponse, error) // ArchiveRefreshToken request ArchiveRefreshToken(ctx context.Context, token string, reqEditors ...client.RequestEditorFn) (*ArchiveRefreshTokenResponse, error) // GetRefreshToken request GetRefreshToken(ctx context.Context, token string, reqEditors ...client.RequestEditorFn) (*GetRefreshTokenResponse, error) // CreateToken request with any body CreateTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateTokenResponse, error) }
ClientInterface interface specification for the client.
type CreateTokenResponse ¶
type CreateTokenResponse struct { Body []byte HTTPResponse *http.Response JSON200 *TokenResponseIF }
func (CreateTokenResponse) Status ¶
func (r CreateTokenResponse) Status() string
Status returns HTTPResponse.Status
func (CreateTokenResponse) StatusCode ¶
func (r CreateTokenResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Error ¶
type Error struct { // The error category Category string `json:"category"` // Context about the error condition Context *Error_Context `json:"context,omitempty"` // A unique identifier for the request. Include this value with any error reports or support tickets CorrelationId string `json:"correlationId"` // further information about the error Errors *[]ErrorDetail `json:"errors,omitempty"` // A map of link names to associated URIs containing documentation about the error or recommended remediation steps Links *Error_Links `json:"links,omitempty"` // A human readable message describing the error along with remediation steps where appropriate Message string `json:"message"` // A specific category that contains more specific detail about the error SubCategory *string `json:"subCategory,omitempty"` }
Error defines model for Error.
type ErrorDetail ¶
type ErrorDetail struct { // The status code associated with the error detail Code *string `json:"code,omitempty"` // Context about the error condition Context *ErrorDetail_Context `json:"context,omitempty"` // The name of the field or parameter in which the error was found. In *string `json:"in,omitempty"` // A human readable message describing the error along with remediation steps where appropriate Message string `json:"message"` // A specific category that contains more specific detail about the error SubCategory *string `json:"subCategory,omitempty"` }
ErrorDetail defines model for ErrorDetail.
type ErrorDetail_Context ¶
Context about the error condition
func (ErrorDetail_Context) Get ¶
func (a ErrorDetail_Context) Get(fieldName string) (value []string, found bool)
Getter for additional properties for ErrorDetail_Context. Returns the specified element and whether it was found
func (ErrorDetail_Context) MarshalJSON ¶
func (a ErrorDetail_Context) MarshalJSON() ([]byte, error)
Override default JSON handling for ErrorDetail_Context to handle AdditionalProperties
func (*ErrorDetail_Context) Set ¶
func (a *ErrorDetail_Context) Set(fieldName string, value []string)
Setter for additional properties for ErrorDetail_Context
func (*ErrorDetail_Context) UnmarshalJSON ¶
func (a *ErrorDetail_Context) UnmarshalJSON(b []byte) error
Override default JSON handling for ErrorDetail_Context to handle AdditionalProperties
type Error_Context ¶
Context about the error condition
func (Error_Context) Get ¶
func (a Error_Context) Get(fieldName string) (value []string, found bool)
Getter for additional properties for Error_Context. Returns the specified element and whether it was found
func (Error_Context) MarshalJSON ¶
func (a Error_Context) MarshalJSON() ([]byte, error)
Override default JSON handling for Error_Context to handle AdditionalProperties
func (*Error_Context) Set ¶
func (a *Error_Context) Set(fieldName string, value []string)
Setter for additional properties for Error_Context
func (*Error_Context) UnmarshalJSON ¶
func (a *Error_Context) UnmarshalJSON(b []byte) error
Override default JSON handling for Error_Context to handle AdditionalProperties
type Error_Links ¶
A map of link names to associated URIs containing documentation about the error or recommended remediation steps
func (Error_Links) Get ¶
func (a Error_Links) Get(fieldName string) (value string, found bool)
Getter for additional properties for Error_Links. Returns the specified element and whether it was found
func (Error_Links) MarshalJSON ¶
func (a Error_Links) MarshalJSON() ([]byte, error)
Override default JSON handling for Error_Links to handle AdditionalProperties
func (*Error_Links) Set ¶
func (a *Error_Links) Set(fieldName string, value string)
Setter for additional properties for Error_Links
func (*Error_Links) UnmarshalJSON ¶
func (a *Error_Links) UnmarshalJSON(b []byte) error
Override default JSON handling for Error_Links to handle AdditionalProperties
type GetAccessTokenResponse ¶
type GetAccessTokenResponse struct { Body []byte HTTPResponse *http.Response JSON200 *AccessTokenInfoResponse }
func (GetAccessTokenResponse) Status ¶
func (r GetAccessTokenResponse) Status() string
Status returns HTTPResponse.Status
func (GetAccessTokenResponse) StatusCode ¶
func (r GetAccessTokenResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetRefreshTokenResponse ¶
type GetRefreshTokenResponse struct { Body []byte HTTPResponse *http.Response JSON200 *RefreshTokenInfoResponse }
func (GetRefreshTokenResponse) Status ¶
func (r GetRefreshTokenResponse) Status() string
Status returns HTTPResponse.Status
func (GetRefreshTokenResponse) StatusCode ¶
func (r GetRefreshTokenResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RefreshTokenInfoResponse ¶
type RefreshTokenInfoResponse struct { ClientId string `json:"client_id"` HubDomain *string `json:"hub_domain,omitempty"` HubId int32 `json:"hub_id"` Scopes []string `json:"scopes"` Token string `json:"token"` TokenType string `json:"token_type"` User *string `json:"user,omitempty"` UserId int32 `json:"user_id"` }
RefreshTokenInfoResponse defines model for RefreshTokenInfoResponse.
type TokenResponseIF ¶
type TokenResponseIF struct { AccessToken string `json:"access_token"` ExpiresIn int32 `json:"expires_in"` IdToken *string `json:"id_token,omitempty"` RefreshToken string `json:"refresh_token"` TokenType string `json:"token_type"` }
TokenResponseIF defines model for TokenResponseIF.