integrationapi

package
v1.10.19 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

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

Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.

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

Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerScopes = "Bearer.Scopes"
)

Variables

This section is empty.

Functions

func NewCreateEventBridgeEventRequest

func NewCreateEventBridgeEventRequest(server string, body CreateEventBridgeEventJSONRequestBody) (*http.Request, error)

NewCreateEventBridgeEventRequest calls the generic CreateEventBridgeEvent builder with application/json body

func NewCreateEventBridgeEventRequestWithBody

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

NewCreateEventBridgeEventRequestWithBody generates requests for CreateEventBridgeEvent with any type of body

func NewCreateEventBridgeTestEventRequest

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

NewCreateEventBridgeTestEventRequest generates requests for CreateEventBridgeTestEvent

func NewDeleteEventBridgeSettingsRequest

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

NewDeleteEventBridgeSettingsRequest generates requests for DeleteEventBridgeSettings

func NewGetEventBridgeSettingsRequest

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

NewGetEventBridgeSettingsRequest generates requests for GetEventBridgeSettings

func NewReturnInternalServerErrorRequest

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

NewReturnInternalServerErrorRequest generates requests for ReturnInternalServerError

func NewSaveEventBridgeSettingsRequest

func NewSaveEventBridgeSettingsRequest(server string, body SaveEventBridgeSettingsJSONRequestBody) (*http.Request, error)

NewSaveEventBridgeSettingsRequest calls the generic SaveEventBridgeSettings builder with application/json body

func NewSaveEventBridgeSettingsRequestWithBody

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

NewSaveEventBridgeSettingsRequestWithBody generates requests for SaveEventBridgeSettings with any type of body

Types

type AwsRegion

type AwsRegion string

AwsRegion All AWS regions except Ningxia and Beijing in China can be selected.

const (
	AfSouth1     AwsRegion = "af-south-1"
	ApEast1      AwsRegion = "ap-east-1"
	ApNortheast1 AwsRegion = "ap-northeast-1"
	ApNortheast2 AwsRegion = "ap-northeast-2"
	ApNortheast3 AwsRegion = "ap-northeast-3"
	ApSouth1     AwsRegion = "ap-south-1"
	ApSoutheast1 AwsRegion = "ap-southeast-1"
	ApSoutheast2 AwsRegion = "ap-southeast-2"
	ApSoutheast3 AwsRegion = "ap-southeast-3"
	CaCentral1   AwsRegion = "ca-central-1"
	EuCentral1   AwsRegion = "eu-central-1"
	EuNorth1     AwsRegion = "eu-north-1"
	EuSouth1     AwsRegion = "eu-south-1"
	EuWest1      AwsRegion = "eu-west-1"
	EuWest2      AwsRegion = "eu-west-2"
	EuWest3      AwsRegion = "eu-west-3"
	MeSouth1     AwsRegion = "me-south-1"
	SaEast1      AwsRegion = "sa-east-1"
	UsEast1      AwsRegion = "us-east-1"
	UsEast2      AwsRegion = "us-east-2"
	UsWest1      AwsRegion = "us-west-1"
	UsWest2      AwsRegion = "us-west-2"
)

Defines values for AwsRegion.

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

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

func (*Client) CreateEventBridgeEventWithBody

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

func (*Client) CreateEventBridgeTestEvent

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

func (*Client) DeleteEventBridgeSettings

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

func (*Client) GetEventBridgeSettings

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

func (*Client) ReturnInternalServerError

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

func (*Client) SaveEventBridgeSettings

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

func (*Client) SaveEventBridgeSettingsWithBody

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

type ClientInterface

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

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

	CreateEventBridgeEvent(ctx context.Context, body CreateEventBridgeEventJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

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

	SaveEventBridgeSettings(ctx context.Context, body SaveEventBridgeSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateEventBridgeTestEvent request
	CreateEventBridgeTestEvent(ctx context.Context, 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) CreateEventBridgeEventWithBodyWithResponse

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

CreateEventBridgeEventWithBodyWithResponse request with arbitrary body returning *CreateEventBridgeEventResponse

func (*ClientWithResponses) CreateEventBridgeEventWithResponse

func (c *ClientWithResponses) CreateEventBridgeEventWithResponse(ctx context.Context, body CreateEventBridgeEventJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEventBridgeEventResponse, error)

func (*ClientWithResponses) CreateEventBridgeTestEventWithResponse

func (c *ClientWithResponses) CreateEventBridgeTestEventWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateEventBridgeTestEventResponse, error)

CreateEventBridgeTestEventWithResponse request returning *CreateEventBridgeTestEventResponse

func (*ClientWithResponses) DeleteEventBridgeSettingsWithResponse

func (c *ClientWithResponses) DeleteEventBridgeSettingsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteEventBridgeSettingsResponse, error)

DeleteEventBridgeSettingsWithResponse request returning *DeleteEventBridgeSettingsResponse

func (*ClientWithResponses) GetEventBridgeSettingsWithResponse

func (c *ClientWithResponses) GetEventBridgeSettingsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEventBridgeSettingsResponse, error)

GetEventBridgeSettingsWithResponse request returning *GetEventBridgeSettingsResponse

func (*ClientWithResponses) ReturnInternalServerErrorWithResponse

func (c *ClientWithResponses) ReturnInternalServerErrorWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ReturnInternalServerErrorResponse, error)

ReturnInternalServerErrorWithResponse request returning *ReturnInternalServerErrorResponse

func (*ClientWithResponses) SaveEventBridgeSettingsWithBodyWithResponse

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

SaveEventBridgeSettingsWithBodyWithResponse request with arbitrary body returning *SaveEventBridgeSettingsResponse

func (*ClientWithResponses) SaveEventBridgeSettingsWithResponse

func (c *ClientWithResponses) SaveEventBridgeSettingsWithResponse(ctx context.Context, body SaveEventBridgeSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*SaveEventBridgeSettingsResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// ReturnInternalServerError request
	ReturnInternalServerErrorWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ReturnInternalServerErrorResponse, error)

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

	CreateEventBridgeEventWithResponse(ctx context.Context, body CreateEventBridgeEventJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEventBridgeEventResponse, error)

	// DeleteEventBridgeSettings request
	DeleteEventBridgeSettingsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteEventBridgeSettingsResponse, error)

	// GetEventBridgeSettings request
	GetEventBridgeSettingsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEventBridgeSettingsResponse, error)

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

	SaveEventBridgeSettingsWithResponse(ctx context.Context, body SaveEventBridgeSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*SaveEventBridgeSettingsResponse, error)

	// CreateEventBridgeTestEvent request
	CreateEventBridgeTestEventWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateEventBridgeTestEventResponse, error)
}

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

type CreateEventBridgeEventJSONRequestBody

type CreateEventBridgeEventJSONRequestBody = CreateEventBridgeEventParam

CreateEventBridgeEventJSONRequestBody defines body for CreateEventBridgeEvent for application/json ContentType.

type CreateEventBridgeEventParam

type CreateEventBridgeEventParam struct {
	// EventMessages event message
	EventMessages []EventMessage `json:"event_messages"`
}

CreateEventBridgeEventParam defines model for CreateEventBridgeEventParam.

type CreateEventBridgeEventResponse

type CreateEventBridgeEventResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON500      *Error
}

func ParseCreateEventBridgeEventResponse

func ParseCreateEventBridgeEventResponse(rsp *http.Response) (*CreateEventBridgeEventResponse, error)

ParseCreateEventBridgeEventResponse parses an HTTP response from a CreateEventBridgeEventWithResponse call

func (CreateEventBridgeEventResponse) Status

Status returns HTTPResponse.Status

func (CreateEventBridgeEventResponse) StatusCode

func (r CreateEventBridgeEventResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateEventBridgeTestEventResponse

type CreateEventBridgeTestEventResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON500      *Error
}

func ParseCreateEventBridgeTestEventResponse

func ParseCreateEventBridgeTestEventResponse(rsp *http.Response) (*CreateEventBridgeTestEventResponse, error)

ParseCreateEventBridgeTestEventResponse parses an HTTP response from a CreateEventBridgeTestEventWithResponse call

func (CreateEventBridgeTestEventResponse) Status

Status returns HTTPResponse.Status

func (CreateEventBridgeTestEventResponse) StatusCode

func (r CreateEventBridgeTestEventResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteEventBridgeSettingsResponse

type DeleteEventBridgeSettingsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON500      *Error
}

func ParseDeleteEventBridgeSettingsResponse

func ParseDeleteEventBridgeSettingsResponse(rsp *http.Response) (*DeleteEventBridgeSettingsResponse, error)

ParseDeleteEventBridgeSettingsResponse parses an HTTP response from a DeleteEventBridgeSettingsWithResponse call

func (DeleteEventBridgeSettingsResponse) Status

Status returns HTTPResponse.Status

func (DeleteEventBridgeSettingsResponse) StatusCode

func (r DeleteEventBridgeSettingsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Error

type Error struct {
	// Message Error message
	Message string `json:"message"`

	// Type permission_denied
	Type string `json:"type"`
}

Error defines model for Error.

type EventBridgeSettings

type EventBridgeSettings struct {
	// AwsAccountId AWS Account ID
	AwsAccountId string `json:"aws_account_id"`

	// AwsRegion All AWS regions except Ningxia and Beijing in China can be selected.
	AwsRegion AwsRegion `json:"aws_region"`
}

EventBridgeSettings defines model for EventBridgeSettings.

type EventMessage

type EventMessage struct {
	// EventDetailType detailed event type
	EventDetailType string `json:"event_detail_type"`

	// EventType event type
	EventType string `json:"event_type"`

	// Message event message
	Message string `json:"message"`
}

EventMessage defines model for EventMessage.

type GetEventBridgeSettingsResponse

type GetEventBridgeSettingsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *EventBridgeSettings
	JSON500      *Error
}

func ParseGetEventBridgeSettingsResponse

func ParseGetEventBridgeSettingsResponse(rsp *http.Response) (*GetEventBridgeSettingsResponse, error)

ParseGetEventBridgeSettingsResponse parses an HTTP response from a GetEventBridgeSettingsWithResponse call

func (GetEventBridgeSettingsResponse) Status

Status returns HTTPResponse.Status

func (GetEventBridgeSettingsResponse) StatusCode

func (r GetEventBridgeSettingsResponse) 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 ReturnInternalServerErrorResponse

type ReturnInternalServerErrorResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON500      *Error
}

func ParseReturnInternalServerErrorResponse

func ParseReturnInternalServerErrorResponse(rsp *http.Response) (*ReturnInternalServerErrorResponse, error)

ParseReturnInternalServerErrorResponse parses an HTTP response from a ReturnInternalServerErrorWithResponse call

func (ReturnInternalServerErrorResponse) Status

Status returns HTTPResponse.Status

func (ReturnInternalServerErrorResponse) StatusCode

func (r ReturnInternalServerErrorResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SaveEventBridgeSettingsJSONRequestBody

type SaveEventBridgeSettingsJSONRequestBody = SaveEventBridgeSettingsParam

SaveEventBridgeSettingsJSONRequestBody defines body for SaveEventBridgeSettings for application/json ContentType.

type SaveEventBridgeSettingsParam

type SaveEventBridgeSettingsParam = EventBridgeSettings

SaveEventBridgeSettingsParam defines model for SaveEventBridgeSettingsParam.

type SaveEventBridgeSettingsResponse

type SaveEventBridgeSettingsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON500      *Error
}

func ParseSaveEventBridgeSettingsResponse

func ParseSaveEventBridgeSettingsResponse(rsp *http.Response) (*SaveEventBridgeSettingsResponse, error)

ParseSaveEventBridgeSettingsResponse parses an HTTP response from a SaveEventBridgeSettingsWithResponse call

func (SaveEventBridgeSettingsResponse) Status

Status returns HTTPResponse.Status

func (SaveEventBridgeSettingsResponse) StatusCode

func (r SaveEventBridgeSettingsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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