types

package
v0.0.0-...-a7b4c27 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentModeBinary     = "BINARY"
	ContentModeStructured = "STRUCTURED"
)

Variables

This section is empty.

Functions

func IsInvalidAuthType

func IsInvalidAuthType(value string) bool

func IsInvalidGrantType

func IsInvalidGrantType(value string) bool

func IsInvalidQoS

func IsInvalidQoS(value string) bool

Types

type AuthType

type AuthType string
const (
	AuthTypeClientCredentials AuthType = "oauth2"
)

func GetAuthType

func GetAuthType(_ string) AuthType

type CreateResponse

type CreateResponse struct {
	Response
	Href string `json:"href,omitempty"`
}

type DeleteResponse

type DeleteResponse struct {
	Response
}

type Event

type Event struct {
	Source string `json:"source,omitempty"`
	Type   string `json:"type,omitempty"`
}

type Events

type Events []Event

type GrantType

type GrantType string
const GrantTypeClientCredentials GrantType = "client_credentials"

func GetGrantType

func GetGrantType(_ string) GrantType

type PublishResponse

type PublishResponse struct {
	Response
	Successful []string `json:"successful,omitempty"`
	Failed     []string `json:"failed,omitempty"`
}

type Qos

type Qos string
const (
	QosAtMostOnce  Qos = "AT_MOST_ONCE"
	QosAtLeastOnce Qos = "AT_LEAST_ONCE"
)

func GetQos

func GetQos(qosStr string) Qos

type Response

type Response struct {
	StatusCode int    `json:"-"`
	Message    string `json:"message,omitempty"`
}

type State

type State struct {
	Action StateAction `json:"action,omitempty"`
}

type StateAction

type StateAction string
const (
	StateActionPause  StateAction = "pause"
	StateActionResume StateAction = "resume"
)

type Subscription

type Subscription struct {
	Name                     string             `json:"name,omitempty"`
	Events                   Events             `json:"events,omitempty"`
	WebhookURL               string             `json:"webhookUrl,omitempty"`
	WebhookAuth              *WebhookAuth       `json:"webhookAuth,omitempty"`
	Qos                      Qos                `json:"qos,omitempty"`
	ExemptHandshake          bool               `json:"exemptHandshake,omitempty"`
	ContentMode              string             `json:"contentMode,omitempty"`
	HandshakeStatus          string             `json:"handshakeStatus,omitempty"`
	SubscriptionStatus       SubscriptionStatus `json:"subscriptionStatus,omitempty"`
	SubscriptionStatusReason string             `json:"subscriptionStatusReason,omitempty"`
	LastSuccessfulDelivery   string             `json:"lastSuccessfulDelivery,omitempty"`
	LastFailedDelivery       string             `json:"lastFailedDelivery,omitempty"`
	LastFailedDeliveryReason string             `json:"lastFailedDeliveryReason,omitempty"`
}

type SubscriptionStatus

type SubscriptionStatus string
const (
	SubscriptionStatusActive SubscriptionStatus = "Active"
	SubscriptionStatusPaused SubscriptionStatus = "Paused"
)

type Subscriptions

type Subscriptions []Subscription

type TriggerHandshake

type TriggerHandshake struct {
	Response
}

type UpdateResponse

type UpdateResponse struct {
	Response
}

type UpdateStateResponse

type UpdateStateResponse struct {
	Response
	Href string `json:"href,omitempty"`
}

type WebhookAuth

type WebhookAuth struct {
	Type         AuthType  `json:"type,omitempty"`
	GrantType    GrantType `json:"grantType,omitempty"`
	ClientID     string    `json:"clientId,omitempty"`
	ClientSecret string    `json:"clientSecret,omitempty"`
	TokenURL     string    `json:"tokenUrl,omitempty"`
}

Jump to

Keyboard shortcuts

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