notification

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(notifierCfg *config.NotifierConfig) error

Initialize sets connector client as admin and as org-admin

func NewPostHealthRequest

func NewPostHealthRequest(server string, body PostHealthJSONRequestBody) (*http.Request, error)

NewPostHealthRequest calls the generic PostHealth builder with application/json body

func NewPostHealthRequestWithBody

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

NewPostHealthRequestWithBody generates requests for PostHealth with any type of body

func NewPostMonitorFailureRequest

func NewPostMonitorFailureRequest(server string, body PostMonitorFailureJSONRequestBody) (*http.Request, error)

NewPostMonitorFailureRequest calls the generic PostMonitorFailure builder with application/json body

func NewPostMonitorFailureRequestWithBody

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

NewPostMonitorFailureRequestWithBody generates requests for PostMonitorFailure with any type of body

func NewPostMonitorSuccessRequest

func NewPostMonitorSuccessRequest(server string, body PostMonitorSuccessJSONRequestBody) (*http.Request, error)

NewPostMonitorSuccessRequest calls the generic PostMonitorSuccess builder with application/json body

func NewPostMonitorSuccessRequestWithBody

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

NewPostMonitorSuccessRequestWithBody generates requests for PostMonitorSuccess with any type of body

func NewPostSubscribeRequest

func NewPostSubscribeRequest(server string, body PostSubscribeJSONRequestBody) (*http.Request, error)

NewPostSubscribeRequest calls the generic PostSubscribe builder with application/json body

func NewPostSubscribeRequestWithBody

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

NewPostSubscribeRequestWithBody generates requests for PostSubscribe with any type of body

func NewPostUnsubscribeRequest

func NewPostUnsubscribeRequest(server string, body PostUnsubscribeJSONRequestBody) (*http.Request, error)

NewPostUnsubscribeRequest calls the generic PostUnsubscribe builder with application/json body

func NewPostUnsubscribeRequestWithBody

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

NewPostUnsubscribeRequestWithBody generates requests for PostUnsubscribe with any type of body

Types

type Access

type Access struct {
	Client *ClientWithResponses
}

Access Holds refernce to HTTP-Client to Solace Connector

func GetNotifierClient

func GetNotifierClient() *Access

GetNotifierClient - connector as admin

func (*Access) Healthcheck

func (c *Access) Healthcheck(name string) *hc.Status

Healthcheck - verify connection to Solace connector

func (*Access) IsHealthCheck

func (c *Access) IsHealthCheck() (bool, error)

IsHealthCheck - checks if Connector is accessible as admin

func (*Access) NotifyFailureMonitor

func (c *Access) NotifyFailureMonitor(dto MonitorDataDto) (bool, error)

NotifyFailureMonitor - publishes failure

func (*Access) NotifySubscribe

func (c *Access) NotifySubscribe(dto SubscribeMetaDataDto) (bool, error)

NotifySubscribe - publishes Subscribe Notification

func (*Access) NotifySuccessMonitor

func (c *Access) NotifySuccessMonitor(dto MonitorDataDto) (bool, error)

NotifySuccessMonitor - publishes success

func (*Access) NotifyUnsubscribe

func (c *Access) NotifyUnsubscribe(dto UnsubscribeMetaDataDto) (bool, error)

NotifyUnsubscribe - publishes Unsubscribe Notifications

type Attribute

type Attribute struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

Attribute Solace Connector Attribute

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

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

func (*Client) PostHealthWithBody

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

func (*Client) PostMonitorFailure

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

func (*Client) PostMonitorFailureWithBody

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

func (*Client) PostMonitorSuccess

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

func (*Client) PostMonitorSuccessWithBody

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

func (*Client) PostSubscribe

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

func (*Client) PostSubscribeWithBody

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

func (*Client) PostUnsubscribe

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

func (*Client) PostUnsubscribeWithBody

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

type ClientInterface

type ClientInterface interface {
	// PostHealth request with any body
	PostHealthWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostHealth(ctx context.Context, body PostHealthJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostMonitorFailure(ctx context.Context, body PostMonitorFailureJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostMonitorSuccess(ctx context.Context, body PostMonitorSuccessJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostSubscribe(ctx context.Context, body PostSubscribeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostUnsubscribe(ctx context.Context, body PostUnsubscribeJSONRequestBody, 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.

func WithTlSConfig

func WithTlSConfig(insecureSkipVerify bool, proxyURL string, timeout time.Duration) ClientOption

WithTlSConfig prepares TSLConfig

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 NewNotificationClient

func NewNotificationClient(notifierCfg *config.NotifierConfig) (*ClientWithResponses, error)

NewNotificationClient - Creates a new Gateway Client

func (*ClientWithResponses) PostHealthWithBodyWithResponse

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

PostHealthWithBodyWithResponse request with arbitrary body returning *PostHealthResponse

func (*ClientWithResponses) PostHealthWithResponse

func (c *ClientWithResponses) PostHealthWithResponse(ctx context.Context, body PostHealthJSONRequestBody, reqEditors ...RequestEditorFn) (*PostHealthResponse, error)

func (*ClientWithResponses) PostMonitorFailureWithBodyWithResponse

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

PostMonitorFailureWithBodyWithResponse request with arbitrary body returning *PostMonitorFailureResponse

func (*ClientWithResponses) PostMonitorFailureWithResponse

func (c *ClientWithResponses) PostMonitorFailureWithResponse(ctx context.Context, body PostMonitorFailureJSONRequestBody, reqEditors ...RequestEditorFn) (*PostMonitorFailureResponse, error)

func (*ClientWithResponses) PostMonitorSuccessWithBodyWithResponse

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

PostMonitorSuccessWithBodyWithResponse request with arbitrary body returning *PostMonitorSuccessResponse

func (*ClientWithResponses) PostMonitorSuccessWithResponse

func (c *ClientWithResponses) PostMonitorSuccessWithResponse(ctx context.Context, body PostMonitorSuccessJSONRequestBody, reqEditors ...RequestEditorFn) (*PostMonitorSuccessResponse, error)

func (*ClientWithResponses) PostSubscribeWithBodyWithResponse

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

PostSubscribeWithBodyWithResponse request with arbitrary body returning *PostSubscribeResponse

func (*ClientWithResponses) PostSubscribeWithResponse

func (c *ClientWithResponses) PostSubscribeWithResponse(ctx context.Context, body PostSubscribeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostSubscribeResponse, error)

func (*ClientWithResponses) PostUnsubscribeWithBodyWithResponse

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

PostUnsubscribeWithBodyWithResponse request with arbitrary body returning *PostUnsubscribeResponse

func (*ClientWithResponses) PostUnsubscribeWithResponse

func (c *ClientWithResponses) PostUnsubscribeWithResponse(ctx context.Context, body PostUnsubscribeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostUnsubscribeResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// PostHealth request with any body
	PostHealthWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostHealthResponse, error)

	PostHealthWithResponse(ctx context.Context, body PostHealthJSONRequestBody, reqEditors ...RequestEditorFn) (*PostHealthResponse, error)

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

	PostMonitorFailureWithResponse(ctx context.Context, body PostMonitorFailureJSONRequestBody, reqEditors ...RequestEditorFn) (*PostMonitorFailureResponse, error)

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

	PostMonitorSuccessWithResponse(ctx context.Context, body PostMonitorSuccessJSONRequestBody, reqEditors ...RequestEditorFn) (*PostMonitorSuccessResponse, error)

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

	PostSubscribeWithResponse(ctx context.Context, body PostSubscribeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostSubscribeResponse, error)

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

	PostUnsubscribeWithResponse(ctx context.Context, body PostUnsubscribeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostUnsubscribeResponse, error)
}

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

type ConclientHTTPError

type ConclientHTTPError struct {
	ClientFunction string
	HTTPStatusCode int
	Response       string
}

ConclientHTTPError - Detailed HTTP-Error

func (*ConclientHTTPError) Error

func (c *ConclientHTTPError) Error() string

Error - Created detailed HTTP-Error

type HealthEvent

type HealthEvent struct {
	Echo string `json:"echo"`
}

HealthEvent defines model for HealthEvent.

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type MonitorData

type MonitorData struct {
	Api             string             `json:"api"`
	Application     string             `json:"application"`
	CorrelationId   string             `json:"correlationId"`
	Environment     string             `json:"environment"`
	Message         *string            `json:"message,omitempty"`
	Product         string             `json:"product"`
	Subscriber      string             `json:"subscriber"`
	SubscriberEmail string             `json:"subscriberEmail"`
	Subscription    string             `json:"subscription"`
	Success         bool               `json:"success"`
	Team            string             `json:"team"`
	Trigger         MonitorDataTrigger `json:"trigger"`
}

MonitorData defines model for MonitorData.

type MonitorDataDto

type MonitorDataDto struct {
	Trigger         MonitorDataTrigger
	Success         bool
	Message         *string
	CorrelationID   string
	API             string
	Application     string
	Environment     string
	Product         string
	Subscriber      string
	Subscriberemail string
	Subscription    string
	Team            string
}

MonitorDataDto - DTO for monitor notifications

type MonitorDataTrigger

type MonitorDataTrigger string

MonitorDataTrigger defines model for MonitorData.Trigger.

const (
	MonitorDataTriggerSubscribe MonitorDataTrigger = "subscribe"

	MonitorDataTriggerUnsubscribe MonitorDataTrigger = "unsubscribe"
)

Defines values for MonitorDataTrigger.

type MonitoringEvent

type MonitoringEvent struct {
	Data            MonitorData                    `json:"data"`
	Datacontenttype MonitoringEventDatacontenttype `json:"datacontenttype"`
	Id              string                         `json:"id"`
	Source          string                         `json:"source"`
	Specversion     string                         `json:"specversion"`
	Time            string                         `json:"time"`
	Type            MonitoringEventType            `json:"type"`
}

MonitoringEvent defines model for MonitoringEvent.

type MonitoringEventDatacontenttype

type MonitoringEventDatacontenttype string

MonitoringEventDatacontenttype defines model for MonitoringEvent.Datacontenttype.

const (
	MonitoringEventDatacontenttypeApplicationjson MonitoringEventDatacontenttype = "application/json"
)

Defines values for MonitoringEventDatacontenttype.

type MonitoringEventType

type MonitoringEventType string

MonitoringEventType defines model for MonitoringEvent.Type.

const (
	MonitoringEventTypeComSolaceIotTeamAsyncapiNotificationMonitorV1 MonitoringEventType = "com.solace.iot-team.asyncapi.notification.monitor.v1"
)

Defines values for MonitoringEventType.

type NotificationSubscribeEvent

type NotificationSubscribeEvent struct {
	Data            SubscribeData                             `json:"data"`
	Datacontenttype NotificationSubscribeEventDatacontenttype `json:"datacontenttype"`
	Id              string                                    `json:"id"`
	Source          string                                    `json:"source"`
	Specversion     string                                    `json:"specversion"`
	Time            string                                    `json:"time"`
	Type            NotificationSubscribeEventType            `json:"type"`
}

NotificationSubscribeEvent defines model for NotificationSubscribeEvent.

type NotificationSubscribeEventDatacontenttype

type NotificationSubscribeEventDatacontenttype string

NotificationSubscribeEventDatacontenttype defines model for NotificationSubscribeEvent.Datacontenttype.

const (
	NotificationSubscribeEventDatacontenttypeApplicationjson NotificationSubscribeEventDatacontenttype = "application/json"
)

Defines values for NotificationSubscribeEventDatacontenttype.

type NotificationSubscribeEventType

type NotificationSubscribeEventType string

NotificationSubscribeEventType defines model for NotificationSubscribeEvent.Type.

const (
	NotificationSubscribeEventTypeComSolaceIotTeamAsyncapiNotificationSubscribeV1 NotificationSubscribeEventType = "com.solace.iot-team.asyncapi.notification.subscribe.v1"
)

Defines values for NotificationSubscribeEventType.

type NotificationUnsubscribeEvent

type NotificationUnsubscribeEvent struct {
	Data            UnsubscribeData                             `json:"data"`
	Datacontenttype NotificationUnsubscribeEventDatacontenttype `json:"datacontenttype"`
	Id              string                                      `json:"id"`
	Source          string                                      `json:"source"`
	Specversion     string                                      `json:"specversion"`
	Time            string                                      `json:"time"`
	Type            NotificationUnsubscribeEventType            `json:"type"`
}

NotificationUnsubscribeEvent defines model for NotificationUnsubscribeEvent.

type NotificationUnsubscribeEventDatacontenttype

type NotificationUnsubscribeEventDatacontenttype string

NotificationUnsubscribeEventDatacontenttype defines model for NotificationUnsubscribeEvent.Datacontenttype.

const (
	NotificationUnsubscribeEventDatacontenttypeApplicationjson NotificationUnsubscribeEventDatacontenttype = "application/json"
)

Defines values for NotificationUnsubscribeEventDatacontenttype.

type NotificationUnsubscribeEventType

type NotificationUnsubscribeEventType string

NotificationUnsubscribeEventType defines model for NotificationUnsubscribeEvent.Type.

const (
	NotificationUnsubscribeEventTypeComSolaceIotTeamAsyncapiNotificationUnsubscribeV1 NotificationUnsubscribeEventType = "com.solace.iot-team.asyncapi.notification.unsubscribe.v1"
)

Defines values for NotificationUnsubscribeEventType.

type PostHealthJSONBody

type PostHealthJSONBody HealthEvent

PostHealthJSONBody defines parameters for PostHealth.

type PostHealthJSONRequestBody

type PostHealthJSONRequestBody PostHealthJSONBody

PostHealthJSONRequestBody defines body for PostHealth for application/json ContentType.

type PostHealthResponse

type PostHealthResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePostHealthResponse

func ParsePostHealthResponse(rsp *http.Response) (*PostHealthResponse, error)

ParsePostHealthResponse parses an HTTP response from a PostHealthWithResponse call

func (PostHealthResponse) Status

func (r PostHealthResponse) Status() string

Status returns HTTPResponse.Status

func (PostHealthResponse) StatusCode

func (r PostHealthResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostMonitorFailureJSONBody

type PostMonitorFailureJSONBody MonitoringEvent

PostMonitorFailureJSONBody defines parameters for PostMonitorFailure.

type PostMonitorFailureJSONRequestBody

type PostMonitorFailureJSONRequestBody PostMonitorFailureJSONBody

PostMonitorFailureJSONRequestBody defines body for PostMonitorFailure for application/json ContentType.

type PostMonitorFailureResponse

type PostMonitorFailureResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePostMonitorFailureResponse

func ParsePostMonitorFailureResponse(rsp *http.Response) (*PostMonitorFailureResponse, error)

ParsePostMonitorFailureResponse parses an HTTP response from a PostMonitorFailureWithResponse call

func (PostMonitorFailureResponse) Status

Status returns HTTPResponse.Status

func (PostMonitorFailureResponse) StatusCode

func (r PostMonitorFailureResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostMonitorSuccessJSONBody

type PostMonitorSuccessJSONBody MonitoringEvent

PostMonitorSuccessJSONBody defines parameters for PostMonitorSuccess.

type PostMonitorSuccessJSONRequestBody

type PostMonitorSuccessJSONRequestBody PostMonitorSuccessJSONBody

PostMonitorSuccessJSONRequestBody defines body for PostMonitorSuccess for application/json ContentType.

type PostMonitorSuccessResponse

type PostMonitorSuccessResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePostMonitorSuccessResponse

func ParsePostMonitorSuccessResponse(rsp *http.Response) (*PostMonitorSuccessResponse, error)

ParsePostMonitorSuccessResponse parses an HTTP response from a PostMonitorSuccessWithResponse call

func (PostMonitorSuccessResponse) Status

Status returns HTTPResponse.Status

func (PostMonitorSuccessResponse) StatusCode

func (r PostMonitorSuccessResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostSubscribeJSONBody

type PostSubscribeJSONBody NotificationSubscribeEvent

PostSubscribeJSONBody defines parameters for PostSubscribe.

type PostSubscribeJSONRequestBody

type PostSubscribeJSONRequestBody PostSubscribeJSONBody

PostSubscribeJSONRequestBody defines body for PostSubscribe for application/json ContentType.

type PostSubscribeResponse

type PostSubscribeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePostSubscribeResponse

func ParsePostSubscribeResponse(rsp *http.Response) (*PostSubscribeResponse, error)

ParsePostSubscribeResponse parses an HTTP response from a PostSubscribeWithResponse call

func (PostSubscribeResponse) Status

func (r PostSubscribeResponse) Status() string

Status returns HTTPResponse.Status

func (PostSubscribeResponse) StatusCode

func (r PostSubscribeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostUnsubscribeJSONBody

type PostUnsubscribeJSONBody NotificationUnsubscribeEvent

PostUnsubscribeJSONBody defines parameters for PostUnsubscribe.

type PostUnsubscribeJSONRequestBody

type PostUnsubscribeJSONRequestBody PostUnsubscribeJSONBody

PostUnsubscribeJSONRequestBody defines body for PostUnsubscribe for application/json ContentType.

type PostUnsubscribeResponse

type PostUnsubscribeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePostUnsubscribeResponse

func ParsePostUnsubscribeResponse(rsp *http.Response) (*PostUnsubscribeResponse, error)

ParsePostUnsubscribeResponse parses an HTTP response from a PostUnsubscribeWithResponse call

func (PostUnsubscribeResponse) Status

func (r PostUnsubscribeResponse) Status() string

Status returns HTTPResponse.Status

func (PostUnsubscribeResponse) StatusCode

func (r PostUnsubscribeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type SubscribeData

type SubscribeData struct {
	Api             string                    `json:"api"`
	Application     string                    `json:"application"`
	ApplicationData map[string]interface{}    `json:"applicationData"`
	AsyncApis       []*map[string]interface{} `json:"asyncApis"`
	Environment     string                    `json:"environment"`
	Product         string                    `json:"product"`
	Subscriber      string                    `json:"subscriber"`
	SubscriberEmail string                    `json:"subscriberEmail"`
	Subscription    string                    `json:"subscription"`
	Team            string                    `json:"team"`
}

SubscribeData defines model for SubscribeData.

type SubscribeMetaDataDto

type SubscribeMetaDataDto struct {
	API             string
	Application     string
	Environment     string
	Product         string
	Subscriber      string
	Subscriberemail string
	Subscription    string
	Team            string
	ApplicationData map[string]interface{}
	APISpecs        []*map[string]interface{}
}

SubscribeMetaDataDto - Metadata about Subscriber

type UnsubscribeData

type UnsubscribeData struct {
	Api             string `json:"api"`
	Application     string `json:"application"`
	Environment     string `json:"environment"`
	Product         string `json:"product"`
	Subscriber      string `json:"subscriber"`
	SubscriberEmail string `json:"subscriberEmail"`
	Subscription    string `json:"subscription"`
	Team            string `json:"team"`
}

UnsubscribeData defines model for UnsubscribeData.

type UnsubscribeMetaDataDto

type UnsubscribeMetaDataDto struct {
	API             string
	Application     string
	Environment     string
	Product         string
	Subscriber      string
	Subscriberemail string
	Subscription    string
	Team            string
}

UnsubscribeMetaDataDto - Metadata about Subscriber

Jump to

Keyboard shortcuts

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