push

package
v0.1.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultPushConnectorSource = "GenericJson"

DefaultPushConnectorSource is the default source for the ServiceNow Push Connector API.

Variables

This section is empty.

Functions

This section is empty.

Types

type PushConnectorURL

type PushConnectorURL struct {
	URL    string
	Source string
}

PushConnectorURL is the URL for the ServiceNow Push Connector API.

func NewPushConnectorUrl

func NewPushConnectorUrl(instance string, source string) PushConnectorURL

NewPushConnectorUrl returns a new Push Connector URL.

func (*PushConnectorURL) SetSource

func (s *PushConnectorURL) SetSource(source string)

SetSource sets the source of the Push Connector URL.

func (*PushConnectorURL) SetUrl

func (s *PushConnectorURL) SetUrl(url string)

SetUrl sets the URL of the Push Connector URL.

func (PushConnectorURL) String

func (s PushConnectorURL) String() string

String returns the string representation of the Push Connector URL.

type Request

type Request struct {
	// contains filtered or unexported fields
}

Request represents a ServiceNow Push Connector API request.

func NewRequest

func NewRequest(url PushConnectorURL, event cloudevents.Event) *Request

NewRequest returns a new ServiceNow Push Connector API request.

func (*Request) Marshal

func (r *Request) Marshal() (*http.Request, error)

Marshal returns a new HTTP request for the ServiceNow Push Connector API.

type Response

type Response struct {
	Result map[string]interface{} `json:"result"`
}

Response represents a ServiceNow Push Connector API response.

func (*Response) Unmarshal

func (r *Response) Unmarshal(res *http.Response) error

Unmarshal reads the ServiceNow Push Connector API response from the HTTP response.

Jump to

Keyboard shortcuts

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