package
0.0.0-20240817174350-07ad14daec63
Repository: https://github.com/x-webhook/x-webhooks.git
Documentation: pkg.go.dev

# README

Go API client for openapi

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.1.1
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import sw "./openapi"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identifield by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://api.webhook.openweb3.io

ClassMethodHTTP requestDescription
ApplicationApiGetAppUsageStatsApiV1AppStatsUsageGetGet /api/v1/app/stats/usageGet App Usage Stats
ApplicationApiV1ApplicationCreatePost /api/v1/appCreate Application
ApplicationApiV1ApplicationDeleteDelete /api/v1/app/{app_id}Delete Application
ApplicationApiV1ApplicationGetGet /api/v1/app/{app_id}Get Application
ApplicationApiV1ApplicationGetStatsGet /api/v1/app/{app_id}/statsGet App Stats
ApplicationApiV1ApplicationListGet /api/v1/appList Applications
ApplicationApiV1ApplicationPatchPatch /api/v1/app/{app_id}Patch Application
ApplicationApiV1ApplicationUpdatePut /api/v1/app/{app_id}Update Application
AuthenticationApiV1AuthenticationAppPortalAccessPost /api/v1/auth/app-portal-access/{app_id}Get Consumer App Portal Access
AuthenticationApiV1AuthenticationDashboardAccessPost /api/v1/auth/dashboard-access/{app_id}Dashboard Access
AuthenticationApiV1AuthenticationExchangeOneTimeTokenPost /api/v1/auth/one-time-tokenExchange One Time Token
AuthenticationApiV1AuthenticationExpireAllPost /api/v1/auth/app/{app_id}/expire-allExpire All
AuthenticationApiV1AuthenticationLogoutPost /api/v1/auth/logoutLogout
BackgroundTasksApiGetBackgroundTaskGet /api/v1/background-task/{task_id}Get Background Task
BackgroundTasksApiListBackgroundTasksGet /api/v1/background-taskList Background Tasks
BroadcastApiCreateBroadcastMessagePost /api/v1/msg/broadcastCreate Broadcast Message
EndpointApiV1EndpointCreatePost /api/v1/app/{app_id}/endpointCreate Endpoint
EndpointApiV1EndpointDeleteDelete /api/v1/app/{app_id}/endpoint/{endpoint_id}Delete Endpoint
EndpointApiV1EndpointDeleteMtlsConfigDelete /api/v1/app/{app_id}/endpoint/{endpoint_id}/mtlsDelete Endpoint Mtls Config
EndpointApiV1EndpointDeleteOauthConfigDelete /api/v1/app/{app_id}/endpoint/{endpoint_id}/oauthDelete Endpoint Oauth Config
EndpointApiV1EndpointGetGet /api/v1/app/{app_id}/endpoint/{endpoint_id}Get Endpoint
EndpointApiV1EndpointGetHeadersGet /api/v1/app/{app_id}/endpoint/{endpoint_id}/headersGet Endpoint Headers
EndpointApiV1EndpointGetSecretGet /api/v1/app/{app_id}/endpoint/{endpoint_id}/secretGet Endpoint Secret
EndpointApiV1EndpointGetStatsGet /api/v1/app/{app_id}/endpoint/{endpoint_id}/statsEndpoint Stats
EndpointApiV1EndpointListGet /api/v1/app/{app_id}/endpointList Endpoints
EndpointApiV1EndpointPatchPatch /api/v1/app/{app_id}/endpoint/{endpoint_id}Patch Endpoint
EndpointApiV1EndpointPatchHeadersPatch /api/v1/app/{app_id}/endpoint/{endpoint_id}/headersPatch Endpoint Headers
EndpointApiV1EndpointRecoverPost /api/v1/app/{app_id}/endpoint/{endpoint_id}/recoverRecover Failed Webhooks
EndpointApiV1EndpointReplayPost /api/v1/app/{app_id}/endpoint/{endpoint_id}/replay-missingReplay Missing Webhooks
EndpointApiV1EndpointRotateSecretPost /api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotateRotate Endpoint Secret
EndpointApiV1EndpointSendExamplePost /api/v1/app/{app_id}/endpoint/{endpoint_id}/send-exampleSend Event Type Example Message
EndpointApiV1EndpointTransformationGetGet /api/v1/app/{app_id}/endpoint/{endpoint_id}/transformationGet Endpoint Transformation
EndpointApiV1EndpointTransformationPartialUpdatePatch /api/v1/app/{app_id}/endpoint/{endpoint_id}/transformationSet Endpoint Transformation
EndpointApiV1EndpointTransformationSimulatePost /api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/simulateSimulate
EndpointApiV1EndpointUpdatePut /api/v1/app/{app_id}/endpoint/{endpoint_id}Update Endpoint
EndpointApiV1EndpointUpdateHeadersPut /api/v1/app/{app_id}/endpoint/{endpoint_id}/headersUpdate Endpoint Headers
EndpointApiV1EndpointUpdateMtlsConfigPut /api/v1/app/{app_id}/endpoint/{endpoint_id}/mtlsUpdate Endpoint Mtls Config
EndpointApiV1EndpointUpdateOauthConfigPut /api/v1/app/{app_id}/endpoint/{endpoint_id}/oauthUpdate Endpoint Oauth Config
EnvironmentApiV1EnvironmentExportPost /api/v1/environment/exportExport Environment Configuration
EnvironmentApiV1EnvironmentExportGetGet /api/v1/environment/exportExport Environment Configuration
EnvironmentApiV1EnvironmentImportPost /api/v1/environment/importImport Environment Configuration
EnvironmentSettingsApiV1EnvironmentGetSettingsGet /api/v1/environment/settingsGet Org Settings
EventTypeApiV1EventTypeCreatePost /api/v1/event-typeCreate Event Type
EventTypeApiV1EventTypeDeleteDelete /api/v1/event-type/{event_type_name}Delete Event Type
EventTypeApiV1EventTypeExportOpenapiPost /api/v1/event-type/export/openapiEvent Type Export From Openapi
EventTypeApiV1EventTypeGenerateExamplePost /api/v1/event-type/schema/generate-exampleGenerate Schema Example
EventTypeApiV1EventTypeGetGet /api/v1/event-type/{event_type_name}Get Event Type
EventTypeApiV1EventTypeGetRetryScheduleGet /api/v1/event-type/{event_type_name}/retry-scheduleGet Retry Schedule
EventTypeApiV1EventTypeImportOpenapiPost /api/v1/event-type/import/openapiEvent Type Import From Openapi
EventTypeApiV1EventTypeListGet /api/v1/event-typeList Event Types
EventTypeApiV1EventTypePatchPatch /api/v1/event-type/{event_type_name}Patch Event Type
EventTypeApiV1EventTypeUpdatePut /api/v1/event-type/{event_type_name}Update Event Type
EventTypeApiV1EventTypeUpdateRetrySchedulePut /api/v1/event-type/{event_type_name}/retry-scheduleUpdate Retry Schedule
EventsApiV1EventsGet /api/v1/eventsEvents
HealthApiV1HealthGetGet /api/v1/healthHealth
InboundApiV1InboundMsgPost /api/v1/app/{app_id}/inbound/msg/{inbound_token}Handle Inbound
InboundApiV1InboundRotateUrlPost /api/v1/app/{app_id}/inbound/rotate-urlRotate Url
IntegrationApiV1IntegrationCreatePost /api/v1/app/{app_id}/integrationCreate Integration
IntegrationApiV1IntegrationDeleteDelete /api/v1/app/{app_id}/integration/{integ_id}Delete Integration
IntegrationApiV1IntegrationGetGet /api/v1/app/{app_id}/integration/{integ_id}Get Integration
IntegrationApiV1IntegrationGetKeyGet /api/v1/app/{app_id}/integration/{integ_id}/keyGet Integration Key
IntegrationApiV1IntegrationListGet /api/v1/app/{app_id}/integrationList Integrations
IntegrationApiV1IntegrationRotateKeyPost /api/v1/app/{app_id}/integration/{integ_id}/key/rotateRotate Integration Key
IntegrationApiV1IntegrationUpdatePut /api/v1/app/{app_id}/integration/{integ_id}Update Integration
MessageApiCreateMessageAttemptForEndpointPost /api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/test-attemptCreate Message Attempt For Endpoint
MessageApiV1MessageCreatePost /api/v1/app/{app_id}/msgCreate Message
MessageApiV1MessageExpungeContentDelete /api/v1/app/{app_id}/msg/{msg_id}/contentDelete message payload
MessageApiV1MessageGetGet /api/v1/app/{app_id}/msg/{msg_id}Get Message
MessageApiV1MessageGetRawPayloadGet /api/v1/app/{app_id}/msg/{msg_id}/rawGet Raw Message Payload
MessageApiV1MessageListGet /api/v1/app/{app_id}/msgList Messages
MessageApiV1MessageStreamGet /api/v1/app/{app_id}/eventsStream Events
MessageAttemptApiV1MessageAttemptExpungeContentDelete /api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/contentDelete attempt response body
MessageAttemptApiV1MessageAttemptGetGet /api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}Get Attempt
MessageAttemptApiV1MessageAttemptGetHeadersGet /api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/headersGet Attempt Headers
MessageAttemptApiV1MessageAttemptListAttemptedDestinationsGet /api/v1/app/{app_id}/msg/{msg_id}/endpointList Attempted Destinations
MessageAttemptApiV1MessageAttemptListAttemptedMessagesGet /api/v1/app/{app_id}/endpoint/{endpoint_id}/msgList Attempted Messages
MessageAttemptApiV1MessageAttemptListByEndpointGet /api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}List Attempts By Endpoint
MessageAttemptApiV1MessageAttemptListByEndpointDeprecatedGet /api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/attemptList Attempts For Endpoint
MessageAttemptApiV1MessageAttemptListByMsgGet /api/v1/app/{app_id}/attempt/msg/{msg_id}List Attempts By Msg
MessageAttemptApiV1MessageAttemptListByMsgDeprecatedGet /api/v1/app/{app_id}/msg/{msg_id}/attemptList Attempts
MessageAttemptApiV1MessageAttemptResendPost /api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resendResend Webhook
StatisticsApiV1StatisticsAggregateAppStatsPost /api/v1/stats/usage/appAggregate App Stats
StatisticsApiV1StatisticsAggregateEventTypesPut /api/v1/stats/usage/event-typesAggregate Event Types
StatisticsApiV1StatsAppAttemptsGet /api/v1/stats/app/{app_id}/attemptGet App Attempt Stats
StatisticsApiV1StatsEndpointAttemptsGet /api/v1/stats/app/{app_id}/ep/{endpoint_id}/attemptGet Ep Stats
TransformationTemplateApiV1EndpointUpdateHubspotOauthConfigPut /api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation-template/oauth/hubspotUpdate Hubspot Oauth Config
TransformationTemplateApiV1TransformationTemplateCreatePost /api/v1/transformation-templateCreate Transformation Template
TransformationTemplateApiV1TransformationTemplateDeleteDelete /api/v1/transformation-template/{transformation_template_id}Delete Transformation Template
TransformationTemplateApiV1TransformationTemplateGeneratePost /api/v1/transformation-template/generateGenerate
TransformationTemplateApiV1TransformationTemplateGetGet /api/v1/transformation-template/{transformation_template_id}Get Transformation Template
TransformationTemplateApiV1TransformationTemplateListGet /api/v1/transformation-templateList Transformation Templates
TransformationTemplateApiV1TransformationTemplateOauthDiscordPost /api/v1/transformation-template/oauth/discordAuthorize Discord
TransformationTemplateApiV1TransformationTemplateOauthHubspotPost /api/v1/transformation-template/oauth/hubspotAuthorize Hubspot
TransformationTemplateApiV1TransformationTemplateOauthSlackPost /api/v1/transformation-template/oauth/slackAuthorize Slack
TransformationTemplateApiV1TransformationTemplatePatchPatch /api/v1/transformation-template/{transformation_template_id}Patch Transformation Template
TransformationTemplateApiV1TransformationTemplateSimulatePost /api/v1/transformation-template/simulateSimulate
TransformationTemplateApiV1TransformationTemplateUpdatePut /api/v1/transformation-template/{transformation_template_id}Update Transformation Template

Documentation For Models

Documentation For Authorization

HTTPBearer

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARERTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author