client

package
v0.2.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package client provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.

Index

Constants

View Source
const (
	ApiKeyAuthScopes = "ApiKeyAuth.Scopes"
	BearerAuthScopes = "BearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func NewAddEndpointRequest

func NewAddEndpointRequest(server string, applicationID string, body AddEndpointJSONRequestBody) (*http.Request, error)

NewAddEndpointRequest calls the generic AddEndpoint builder with application/json body

func NewAddEndpointRequestWithBody

func NewAddEndpointRequestWithBody(server string, applicationID string, contentType string, body io.Reader) (*http.Request, error)

NewAddEndpointRequestWithBody generates requests for AddEndpoint with any type of body

func NewCreateApiKeyRequest

func NewCreateApiKeyRequest(server string, body CreateApiKeyJSONRequestBody) (*http.Request, error)

NewCreateApiKeyRequest calls the generic CreateApiKey builder with application/json body

func NewCreateApiKeyRequestWithBody

func NewCreateApiKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateApiKeyRequestWithBody generates requests for CreateApiKey with any type of body

func NewCreateApplicationRequest

func NewCreateApplicationRequest(server string, body CreateApplicationJSONRequestBody) (*http.Request, error)

NewCreateApplicationRequest calls the generic CreateApplication builder with application/json body

func NewCreateApplicationRequestWithBody

func NewCreateApplicationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateApplicationRequestWithBody generates requests for CreateApplication with any type of body

func NewCreateEventTypeRequest

func NewCreateEventTypeRequest(server string, body CreateEventTypeJSONRequestBody) (*http.Request, error)

NewCreateEventTypeRequest calls the generic CreateEventType builder with application/json body

func NewCreateEventTypeRequestWithBody

func NewCreateEventTypeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateEventTypeRequestWithBody generates requests for CreateEventType with any type of body

func NewDestroyApiKeyRequest

func NewDestroyApiKeyRequest(server string, apiKeyId string) (*http.Request, error)

NewDestroyApiKeyRequest generates requests for DestroyApiKey

func NewGetAllApiKeysRequest

func NewGetAllApiKeysRequest(server string, params *GetAllApiKeysParams) (*http.Request, error)

NewGetAllApiKeysRequest generates requests for GetAllApiKeys

func NewGetEnvironmentsRequest

func NewGetEnvironmentsRequest(server string) (*http.Request, error)

NewGetEnvironmentsRequest generates requests for GetEnvironments

func NewHealthCheckRequest

func NewHealthCheckRequest(server string) (*http.Request, error)

NewHealthCheckRequest generates requests for HealthCheck

func NewSendMessageRequest

func NewSendMessageRequest(server string, applicationID string, body SendMessageJSONRequestBody) (*http.Request, error)

NewSendMessageRequest calls the generic SendMessage builder with application/json body

func NewSendMessageRequestWithBody

func NewSendMessageRequestWithBody(server string, applicationID string, contentType string, body io.Reader) (*http.Request, error)

NewSendMessageRequestWithBody generates requests for SendMessage with any type of body

func NewSignInRequest

func NewSignInRequest(server string, body SignInJSONRequestBody) (*http.Request, error)

NewSignInRequest calls the generic SignIn builder with application/json body

func NewSignInRequestWithBody

func NewSignInRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewSignInRequestWithBody generates requests for SignIn with any type of body

func NewSignUpRequest

func NewSignUpRequest(server string, body SignUpJSONRequestBody) (*http.Request, error)

NewSignUpRequest calls the generic SignUp builder with application/json body

func NewSignUpRequestWithBody

func NewSignUpRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewSignUpRequestWithBody generates requests for SignUp with any type of body

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type AddEndpointJSONRequestBody

type AddEndpointJSONRequestBody = AddEndpointRequest

AddEndpointJSONRequestBody defines body for AddEndpoint for application/json ContentType.

type AddEndpointRequest

type AddEndpointRequest struct {
	Description  *string   `json:"description,omitempty"`
	EventTypeIds *[]string `json:"event_type_ids,omitempty"`
	Url          string    `json:"url"`
}

AddEndpointRequest defines model for AddEndpointRequest.

type AddEndpointResponse

type AddEndpointResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *DefaultError
}

func ParseAddEndpointResponse

func ParseAddEndpointResponse(rsp *http.Response) (*AddEndpointResponse, error)

ParseAddEndpointResponse parses an HTTP response from a AddEndpointWithResponse call

func (AddEndpointResponse) Status

func (r AddEndpointResponse) Status() string

Status returns HTTPResponse.Status

func (AddEndpointResponse) StatusCode

func (r AddEndpointResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ApiKey

type ApiKey struct {
	CreatedAt       time.Time  `json:"created_at"`
	EnvironmentId   string     `json:"environment_id"`
	ExpiresAt       *time.Time `json:"expires_at,omitempty"`
	Id              string     `json:"id"`
	MaskedSecretKey string     `json:"masked_secret_key"`
	Name            string     `json:"name"`
	OrganizationId  string     `json:"organization_id"`
}

ApiKey defines model for ApiKey.

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) AddEndpoint

func (c *Client) AddEndpoint(ctx context.Context, applicationID string, body AddEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddEndpointWithBody

func (c *Client) AddEndpointWithBody(ctx context.Context, applicationID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateApiKey

func (c *Client) CreateApiKey(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateApiKeyWithBody

func (c *Client) CreateApiKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateApplication

func (c *Client) CreateApplication(ctx context.Context, body CreateApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateApplicationWithBody

func (c *Client) CreateApplicationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateEventType

func (c *Client) CreateEventType(ctx context.Context, body CreateEventTypeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateEventTypeWithBody

func (c *Client) CreateEventTypeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DestroyApiKey

func (c *Client) DestroyApiKey(ctx context.Context, apiKeyId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetAllApiKeys

func (c *Client) GetAllApiKeys(ctx context.Context, params *GetAllApiKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetEnvironments

func (c *Client) GetEnvironments(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) HealthCheck

func (c *Client) HealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SendMessage

func (c *Client) SendMessage(ctx context.Context, applicationID string, body SendMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SendMessageWithBody

func (c *Client) SendMessageWithBody(ctx context.Context, applicationID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SignIn

func (c *Client) SignIn(ctx context.Context, body SignInJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SignInWithBody

func (c *Client) SignInWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SignUp

func (c *Client) SignUp(ctx context.Context, body SignUpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SignUpWithBody

func (c *Client) SignUpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetAllApiKeys request
	GetAllApiKeys(ctx context.Context, params *GetAllApiKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateApiKeyWithBody request with any body
	CreateApiKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateApiKey(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DestroyApiKey request
	DestroyApiKey(ctx context.Context, apiKeyId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateApplicationWithBody request with any body
	CreateApplicationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateApplication(ctx context.Context, body CreateApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddEndpointWithBody request with any body
	AddEndpointWithBody(ctx context.Context, applicationID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AddEndpoint(ctx context.Context, applicationID string, body AddEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SendMessageWithBody request with any body
	SendMessageWithBody(ctx context.Context, applicationID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SendMessage(ctx context.Context, applicationID string, body SendMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetEnvironments request
	GetEnvironments(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateEventTypeWithBody request with any body
	CreateEventTypeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateEventType(ctx context.Context, body CreateEventTypeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// HealthCheck request
	HealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SignInWithBody request with any body
	SignInWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SignIn(ctx context.Context, body SignInJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SignUpWithBody request with any body
	SignUpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SignUp(ctx context.Context, body SignUpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

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) AddEndpointWithBodyWithResponse

func (c *ClientWithResponses) AddEndpointWithBodyWithResponse(ctx context.Context, applicationID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddEndpointResponse, error)

AddEndpointWithBodyWithResponse request with arbitrary body returning *AddEndpointResponse

func (*ClientWithResponses) AddEndpointWithResponse

func (c *ClientWithResponses) AddEndpointWithResponse(ctx context.Context, applicationID string, body AddEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*AddEndpointResponse, error)

func (*ClientWithResponses) CreateApiKeyWithBodyWithResponse

func (c *ClientWithResponses) CreateApiKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)

CreateApiKeyWithBodyWithResponse request with arbitrary body returning *CreateApiKeyResponse

func (*ClientWithResponses) CreateApiKeyWithResponse

func (c *ClientWithResponses) CreateApiKeyWithResponse(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)

func (*ClientWithResponses) CreateApplicationWithBodyWithResponse

func (c *ClientWithResponses) CreateApplicationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateApplicationResponse, error)

CreateApplicationWithBodyWithResponse request with arbitrary body returning *CreateApplicationResponse

func (*ClientWithResponses) CreateApplicationWithResponse

func (c *ClientWithResponses) CreateApplicationWithResponse(ctx context.Context, body CreateApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApplicationResponse, error)

func (*ClientWithResponses) CreateEventTypeWithBodyWithResponse

func (c *ClientWithResponses) CreateEventTypeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEventTypeResponse, error)

CreateEventTypeWithBodyWithResponse request with arbitrary body returning *CreateEventTypeResponse

func (*ClientWithResponses) CreateEventTypeWithResponse

func (c *ClientWithResponses) CreateEventTypeWithResponse(ctx context.Context, body CreateEventTypeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEventTypeResponse, error)

func (*ClientWithResponses) DestroyApiKeyWithResponse

func (c *ClientWithResponses) DestroyApiKeyWithResponse(ctx context.Context, apiKeyId string, reqEditors ...RequestEditorFn) (*DestroyApiKeyResponse, error)

DestroyApiKeyWithResponse request returning *DestroyApiKeyResponse

func (*ClientWithResponses) GetAllApiKeysWithResponse

func (c *ClientWithResponses) GetAllApiKeysWithResponse(ctx context.Context, params *GetAllApiKeysParams, reqEditors ...RequestEditorFn) (*GetAllApiKeysResponse, error)

GetAllApiKeysWithResponse request returning *GetAllApiKeysResponse

func (*ClientWithResponses) GetEnvironmentsWithResponse

func (c *ClientWithResponses) GetEnvironmentsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEnvironmentsResponse, error)

GetEnvironmentsWithResponse request returning *GetEnvironmentsResponse

func (*ClientWithResponses) HealthCheckWithResponse

func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error)

HealthCheckWithResponse request returning *HealthCheckResponse

func (*ClientWithResponses) SendMessageWithBodyWithResponse

func (c *ClientWithResponses) SendMessageWithBodyWithResponse(ctx context.Context, applicationID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendMessageResponse, error)

SendMessageWithBodyWithResponse request with arbitrary body returning *SendMessageResponse

func (*ClientWithResponses) SendMessageWithResponse

func (c *ClientWithResponses) SendMessageWithResponse(ctx context.Context, applicationID string, body SendMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*SendMessageResponse, error)

func (*ClientWithResponses) SignInWithBodyWithResponse

func (c *ClientWithResponses) SignInWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignInResponse, error)

SignInWithBodyWithResponse request with arbitrary body returning *SignInResponse

func (*ClientWithResponses) SignInWithResponse

func (c *ClientWithResponses) SignInWithResponse(ctx context.Context, body SignInJSONRequestBody, reqEditors ...RequestEditorFn) (*SignInResponse, error)

func (*ClientWithResponses) SignUpWithBodyWithResponse

func (c *ClientWithResponses) SignUpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignUpResponse, error)

SignUpWithBodyWithResponse request with arbitrary body returning *SignUpResponse

func (*ClientWithResponses) SignUpWithResponse

func (c *ClientWithResponses) SignUpWithResponse(ctx context.Context, body SignUpJSONRequestBody, reqEditors ...RequestEditorFn) (*SignUpResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetAllApiKeysWithResponse request
	GetAllApiKeysWithResponse(ctx context.Context, params *GetAllApiKeysParams, reqEditors ...RequestEditorFn) (*GetAllApiKeysResponse, error)

	// CreateApiKeyWithBodyWithResponse request with any body
	CreateApiKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)

	CreateApiKeyWithResponse(ctx context.Context, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)

	// DestroyApiKeyWithResponse request
	DestroyApiKeyWithResponse(ctx context.Context, apiKeyId string, reqEditors ...RequestEditorFn) (*DestroyApiKeyResponse, error)

	// CreateApplicationWithBodyWithResponse request with any body
	CreateApplicationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateApplicationResponse, error)

	CreateApplicationWithResponse(ctx context.Context, body CreateApplicationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApplicationResponse, error)

	// AddEndpointWithBodyWithResponse request with any body
	AddEndpointWithBodyWithResponse(ctx context.Context, applicationID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddEndpointResponse, error)

	AddEndpointWithResponse(ctx context.Context, applicationID string, body AddEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*AddEndpointResponse, error)

	// SendMessageWithBodyWithResponse request with any body
	SendMessageWithBodyWithResponse(ctx context.Context, applicationID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendMessageResponse, error)

	SendMessageWithResponse(ctx context.Context, applicationID string, body SendMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*SendMessageResponse, error)

	// GetEnvironmentsWithResponse request
	GetEnvironmentsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEnvironmentsResponse, error)

	// CreateEventTypeWithBodyWithResponse request with any body
	CreateEventTypeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEventTypeResponse, error)

	CreateEventTypeWithResponse(ctx context.Context, body CreateEventTypeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEventTypeResponse, error)

	// HealthCheckWithResponse request
	HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error)

	// SignInWithBodyWithResponse request with any body
	SignInWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignInResponse, error)

	SignInWithResponse(ctx context.Context, body SignInJSONRequestBody, reqEditors ...RequestEditorFn) (*SignInResponse, error)

	// SignUpWithBodyWithResponse request with any body
	SignUpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignUpResponse, error)

	SignUpWithResponse(ctx context.Context, body SignUpJSONRequestBody, reqEditors ...RequestEditorFn) (*SignUpResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateApiKeyJSONRequestBody

type CreateApiKeyJSONRequestBody = CreateApiKeyRequest

CreateApiKeyJSONRequestBody defines body for CreateApiKey for application/json ContentType.

type CreateApiKeyPayload

type CreateApiKeyPayload struct {
	UnmaskedApiKey string `json:"unmasked_api_key"`
}

CreateApiKeyPayload defines model for CreateApiKeyPayload.

type CreateApiKeyRequest

type CreateApiKeyRequest struct {
	EnvironmentId string     `json:"environment_id"`
	ExpiresAt     *time.Time `json:"expires_at"`
	Name          string     `json:"name"`
}

CreateApiKeyRequest defines model for CreateApiKeyRequest.

type CreateApiKeyResponse

type CreateApiKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *CreateApiKeyPayload
	JSONDefault  *DefaultError
}

func ParseCreateApiKeyResponse

func ParseCreateApiKeyResponse(rsp *http.Response) (*CreateApiKeyResponse, error)

ParseCreateApiKeyResponse parses an HTTP response from a CreateApiKeyWithResponse call

func (CreateApiKeyResponse) Status

func (r CreateApiKeyResponse) Status() string

Status returns HTTPResponse.Status

func (CreateApiKeyResponse) StatusCode

func (r CreateApiKeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateApplicationJSONRequestBody

type CreateApplicationJSONRequestBody = CreateApplicationRequest

CreateApplicationJSONRequestBody defines body for CreateApplication for application/json ContentType.

type CreateApplicationRequest

type CreateApplicationRequest struct {
	Name string `json:"name"`
}

CreateApplicationRequest defines model for CreateApplicationRequest.

type CreateApplicationResponse

type CreateApplicationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *DefaultError
}

func ParseCreateApplicationResponse

func ParseCreateApplicationResponse(rsp *http.Response) (*CreateApplicationResponse, error)

ParseCreateApplicationResponse parses an HTTP response from a CreateApplicationWithResponse call

func (CreateApplicationResponse) Status

func (r CreateApplicationResponse) Status() string

Status returns HTTPResponse.Status

func (CreateApplicationResponse) StatusCode

func (r CreateApplicationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateEventTypeJSONRequestBody

type CreateEventTypeJSONRequestBody = CreateEventTypeRequest

CreateEventTypeJSONRequestBody defines body for CreateEventType for application/json ContentType.

type CreateEventTypeRequest

type CreateEventTypeRequest struct {
	Description   *string `json:"description,omitempty"`
	Name          string  `json:"name"`
	Schema        *string `json:"schema,omitempty"`
	SchemaExample *string `json:"schema_example,omitempty"`
}

CreateEventTypeRequest defines model for CreateEventTypeRequest.

type CreateEventTypeResponse

type CreateEventTypeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *DefaultError
}

func ParseCreateEventTypeResponse

func ParseCreateEventTypeResponse(rsp *http.Response) (*CreateEventTypeResponse, error)

ParseCreateEventTypeResponse parses an HTTP response from a CreateEventTypeWithResponse call

func (CreateEventTypeResponse) Status

func (r CreateEventTypeResponse) Status() string

Status returns HTTPResponse.Status

func (CreateEventTypeResponse) StatusCode

func (r CreateEventTypeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DefaultError

type DefaultError = ErrorResponse

DefaultError defines model for DefaultError.

type DestroyApiKeyResponse

type DestroyApiKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *DefaultError
}

func ParseDestroyApiKeyResponse

func ParseDestroyApiKeyResponse(rsp *http.Response) (*DestroyApiKeyResponse, error)

ParseDestroyApiKeyResponse parses an HTTP response from a DestroyApiKeyWithResponse call

func (DestroyApiKeyResponse) Status

func (r DestroyApiKeyResponse) Status() string

Status returns HTTPResponse.Status

func (DestroyApiKeyResponse) StatusCode

func (r DestroyApiKeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Environment

type Environment struct {
	ArchivedAt     *time.Time      `json:"archived_at,omitempty"`
	CreatedAt      time.Time       `json:"created_at"`
	Id             string          `json:"id"`
	Name           string          `json:"name"`
	OrganizationId string          `json:"organization_id"`
	Type           EnvironmentType `json:"type"`
}

Environment defines model for Environment.

type EnvironmentType

type EnvironmentType string

EnvironmentType defines model for Environment.Type.

const (
	Development EnvironmentType = "development"
	Production  EnvironmentType = "production"
)

Defines values for EnvironmentType.

type ErrorResponse

type ErrorResponse struct {
	// Error Error custom error code such as 'email_in_use'
	Error string `json:"error"`

	// Message A description about the error
	Message string `json:"message"`
}

ErrorResponse defines model for ErrorResponse.

type GetAllApiKeysParams

type GetAllApiKeysParams struct {
	EnvironmentId string `form:"environment_id" json:"environment_id"`
}

GetAllApiKeysParams defines parameters for GetAllApiKeys.

type GetAllApiKeysPayload

type GetAllApiKeysPayload struct {
	Data []ApiKey `json:"data"`
}

GetAllApiKeysPayload defines model for GetAllApiKeysPayload.

type GetAllApiKeysResponse

type GetAllApiKeysResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetAllApiKeysPayload
	JSONDefault  *DefaultError
}

func ParseGetAllApiKeysResponse

func ParseGetAllApiKeysResponse(rsp *http.Response) (*GetAllApiKeysResponse, error)

ParseGetAllApiKeysResponse parses an HTTP response from a GetAllApiKeysWithResponse call

func (GetAllApiKeysResponse) Status

func (r GetAllApiKeysResponse) Status() string

Status returns HTTPResponse.Status

func (GetAllApiKeysResponse) StatusCode

func (r GetAllApiKeysResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetAllEnvironmentsPayload

type GetAllEnvironmentsPayload struct {
	Data []Environment `json:"data"`
}

GetAllEnvironmentsPayload defines model for GetAllEnvironmentsPayload.

type GetEnvironmentsResponse

type GetEnvironmentsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetAllEnvironmentsPayload
	JSONDefault  *DefaultError
}

func ParseGetEnvironmentsResponse

func ParseGetEnvironmentsResponse(rsp *http.Response) (*GetEnvironmentsResponse, error)

ParseGetEnvironmentsResponse parses an HTTP response from a GetEnvironmentsWithResponse call

func (GetEnvironmentsResponse) Status

func (r GetEnvironmentsResponse) Status() string

Status returns HTTPResponse.Status

func (GetEnvironmentsResponse) StatusCode

func (r GetEnvironmentsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HealthCheckResponse

type HealthCheckResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *DefaultError
}

func ParseHealthCheckResponse

func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error)

ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call

func (HealthCheckResponse) Status

func (r HealthCheckResponse) Status() string

Status returns HTTPResponse.Status

func (HealthCheckResponse) StatusCode

func (r HealthCheckResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type SendMessageJSONRequestBody

type SendMessageJSONRequestBody = SendMessageRequest

SendMessageJSONRequestBody defines body for SendMessage for application/json ContentType.

type SendMessageRequest

type SendMessageRequest struct {
	EventTypeId string `json:"event_type_id"`
	Payload     string `json:"payload"`
}

SendMessageRequest defines model for SendMessageRequest.

type SendMessageResponse

type SendMessageResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *DefaultError
}

func ParseSendMessageResponse

func ParseSendMessageResponse(rsp *http.Response) (*SendMessageResponse, error)

ParseSendMessageResponse parses an HTTP response from a SendMessageWithResponse call

func (SendMessageResponse) Status

func (r SendMessageResponse) Status() string

Status returns HTTPResponse.Status

func (SendMessageResponse) StatusCode

func (r SendMessageResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SignInJSONRequestBody

type SignInJSONRequestBody = SigninRequest

SignInJSONRequestBody defines body for SignIn for application/json ContentType.

type SignInPayload

type SignInPayload struct {
	Email     string `json:"email"`
	FirstName string `json:"first_name"`
	Id        string `json:"id"`
	LastName  string `json:"last_name"`
	Token     string `json:"token"`
}

SignInPayload defines model for SignInPayload.

type SignInResponse

type SignInResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SignInPayload
	JSONDefault  *DefaultError
}

func ParseSignInResponse

func ParseSignInResponse(rsp *http.Response) (*SignInResponse, error)

ParseSignInResponse parses an HTTP response from a SignInWithResponse call

func (SignInResponse) Status

func (r SignInResponse) Status() string

Status returns HTTPResponse.Status

func (SignInResponse) StatusCode

func (r SignInResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SignUpJSONRequestBody

type SignUpJSONRequestBody = SignupRequest

SignUpJSONRequestBody defines body for SignUp for application/json ContentType.

type SignUpResponse

type SignUpResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *DefaultError
}

func ParseSignUpResponse

func ParseSignUpResponse(rsp *http.Response) (*SignUpResponse, error)

ParseSignUpResponse parses an HTTP response from a SignUpWithResponse call

func (SignUpResponse) Status

func (r SignUpResponse) Status() string

Status returns HTTPResponse.Status

func (SignUpResponse) StatusCode

func (r SignUpResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SigninRequest

type SigninRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

SigninRequest defines model for SigninRequest.

type SignupRequest

type SignupRequest struct {
	Email     string `json:"email"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Password  string `json:"password"`
}

SignupRequest defines model for SignupRequest.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL