httpnotifier

package
v0.0.0-...-7a3883e Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WebServerTypeRestful = 1
	WebServerTypeSOAP    = 2

	SignaturePositionHeader = "header"
	SignaturePositionBody   = "body"

	SerializingTypeJSON = "json"
	SerializingTypeXML  = "xml"

	SignatureVersionMD5    = "1.0"
	SignatureVersionHMAC   = "2.0"
	SignatureVersionPUBKEY = "3.0"
)

Constants

Variables

This section is empty.

Functions

func SignagurePayloadData

func SignagurePayloadData(payload interface{}, so *SignagureOption) string

SignagurePayloadData signature

Types

type CustomHTTPNotifierOption

type CustomHTTPNotifierOption interface {
	// contains filtered or unexported methods
}

CustomHTTPNotifierOption options

func WithHTTPHeader

func WithHTTPHeader(name, value string) CustomHTTPNotifierOption

WithHTTPHeader options

func WithHTTPHeaders

func WithHTTPHeaders(headers map[string]string) CustomHTTPNotifierOption

WithHTTPHeaders options

func WithHTTPProxies

func WithHTTPProxies(proxies *definations.Proxies) CustomHTTPNotifierOption

WithHTTPProxies options

func WithSerializingType

func WithSerializingType(serializingType string) CustomHTTPNotifierOption

WithSerializingType options

func WithSignatureConfig

func WithSignatureConfig(signatureOption *SignagureOption) CustomHTTPNotifierOption

WithSignatureConfig options

func WithTLSConfig

func WithTLSConfig(tlsOptions *definations.TLSOptions) CustomHTTPNotifierOption

WithTLSConfig options

type CustomQueryOption

type CustomQueryOption interface {
	// contains filtered or unexported methods
}

CustomQueryOption options

func WithSoapEvpHeaders

func WithSoapEvpHeaders(soapEvpHeaders []interface{}) CustomQueryOption

WithSoapEvpHeaders options

type HTTPNotifier

type HTTPNotifier struct {
	Endpoint        string
	WebserverType   int
	TLSOptions      *definations.TLSOptions
	SignatureOption *SignagureOption
	Headers         map[string]string
	SerializingType string
	SoapPortName    string
	Proxies         *definations.Proxies
}

HTTPNotifier notifier

func CreateRestHTTPNotifier

func CreateRestHTTPNotifier(endpoint string, options ...CustomHTTPNotifierOption) *HTTPNotifier

CreateRestHTTPNotifier creator

func CreateSOAPHTTPNotifier

func CreateSOAPHTTPNotifier(endpoint string, soapPortName string, options ...CustomHTTPNotifierOption) *HTTPNotifier

CreateSOAPHTTPNotifier creator

func (*HTTPNotifier) DoQuery

func (s *HTTPNotifier) DoQuery(action string, payload interface{}, response interface{}, options ...CustomQueryOption) error

DoQuery request

type SignagureOption

type SignagureOption struct {
	SignatureField    string
	SignaturePosition string
	SignatureVersion  string
	SignatureKey      string
	SigningFields     []string
	SortingFieldsType signature.SignFieldsSortType
	SkipEmptyField    bool
}

SignagureOption options

Jump to

Keyboard shortcuts

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