flexiblehttp

package
v0.0.0-...-58bed8d Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidRequestSchema  = errors.New("invalid request schema")
	ErrInvalidResponseSchema = errors.New("invalid response schema")
	ErrDataProviderIssue     = errors.New("data provider issue")
)

Functions

This section is empty.

Types

type FactoryFlexibleHTTP

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

func NewFactoryFlexibleHTTP

func NewFactoryFlexibleHTTP(configPath string, httpcli *http.Client) (FactoryFlexibleHTTP, error)

func (*FactoryFlexibleHTTP) ProduceFlexibleHTTP

func (factory *FactoryFlexibleHTTP) ProduceFlexibleHTTP(credentialType string) (FlexibleHTTP, error)

type FlexibleHTTP

type FlexibleHTTP struct {
	Settings       settings       `yaml:"settings"`
	Provider       provider       `yaml:"provider"`
	RequestSchema  requestSchema  `yaml:"requestSchema"`
	ResponseSchema responseSchema `yaml:"responseSchema"`
	// contains filtered or unexported fields
}

func (*FlexibleHTTP) BuildRequest

func (fh *FlexibleHTTP) BuildRequest(credentialSubject map[string]interface{}) (*http.Request, error)

func (*FlexibleHTTP) DecodeResponse

func (fh *FlexibleHTTP) DecodeResponse(response map[string]interface{}) (map[string]interface{}, error)

func (*FlexibleHTTP) Provide

func (fh *FlexibleHTTP) Provide(credentialSubject map[string]interface{}) (map[string]interface{}, error)

Jump to

Keyboard shortcuts

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