apim

package
v1.241.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetServiceKey

func GetServiceKey() string

Types

type Bundle

type Bundle struct {
	APIServiceKey, Host, Payload string
	Client                       piperhttp.Sender
}

Bundle struct

func (*Bundle) InitAPIM

func (apim *Bundle) InitAPIM() error

InitAPIM() fumnction initialize APIM bearer token for API access

func (*Bundle) IsPayloadJSON

func (apim *Bundle) IsPayloadJSON() bool

IsJSON checks given string is valid json or not

type HttpMockAPIM

type HttpMockAPIM struct {
	Method       string                  // is set during test execution
	URL          string                  // is set before test execution
	Header       map[string][]string     // is set before test execution
	ResponseBody string                  // is set before test execution
	Options      piperhttp.ClientOptions // is set during test
	StatusCode   int                     // is set during test
}

func (*HttpMockAPIM) SendRequest

func (c *HttpMockAPIM) SendRequest(method string, url string, r io.Reader, header http.Header, cookies []*http.Cookie) (*http.Response, error)

func (*HttpMockAPIM) SetOptions

func (c *HttpMockAPIM) SetOptions(options piperhttp.ClientOptions)

type OdataParameters added in v1.227.0

type OdataParameters struct {
	Filter, Search          string
	Top, Skip               int
	Orderby, Select, Expand string
}

OdataParameters struct

func (*OdataParameters) MakeOdataQuery added in v1.227.0

func (odataFilters *OdataParameters) MakeOdataQuery() (string, error)

type OdataUtils added in v1.227.0

type OdataUtils interface {
	MakeOdataQuery() (string, error)
}

OdataUtils for apim

type SenderMock

type SenderMock interface {
	SendRequest(method, url string, body io.Reader, header http.Header, cookies []*http.Cookie) (*http.Response, error)
	SetOptions(options piperhttp.ClientOptions)
}

Sender provides an interface to the piper http client for uid/pwd and token authenticated requests

type ServciceKeyMock

type ServciceKeyMock interface {
	GetServiceKey() string
}

Sender provides an interface to the piper http client for uid/pwd and token authenticated requests

type Utils

type Utils interface {
	InitAPIM() error
	IsPayloadJSON() bool
}

Utils for apim

Jump to

Keyboard shortcuts

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