broker

package
v0.0.0-...-713bd09 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(brokerURL string, opts ...Option) *Client

func (*Client) GetTaggedValidation

func (c *Client) GetTaggedValidation(consumer, provider, tag string) HalPactVerification

func (*Client) GetValidation

func (c *Client) GetValidation(consumer, provider string) HalPactVerification

func (*Client) GetValidationFromUrl

func (c *Client) GetValidationFromUrl(consumer, provider, url string) HalPactVerification

func (*Client) GetValidationRaw

func (c *Client) GetValidationRaw(consumer, provider, version string) ([]byte, error)

type HalPactVerification

type HalPactVerification struct {
	ProviderName               string    `json:"providerName"`
	ProviderApplicationVersion string    `json:"providerApplicationVersion"`
	Success                    bool      `json:"success"`
	VerificationDate           time.Time `json:"verificationDate"`
	Links                      Links     `json:"_links"`
}
type Links struct {
	Verification Verification `json:"self"`
}

type Option

type Option func(*Client)

func WithBasicAuth

func WithBasicAuth(username, password string) Option

func WithClient

func WithClient(client *http.Client) Option

type Verification

type Verification struct {
	Name string `json:"name"`
	Href string `json:"href"`
}

Jump to

Keyboard shortcuts

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