contract

package
v1.14.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPact

func NewPact(config PactConfig) (*consumer.V2HTTPMockProvider, error)

NewPact creates a new Pact mock provider for consumer contract testing. This is a thin wrapper around pact-go/v2 that integrates with Ginkgo.

func NewV4Pact

func NewV4Pact(config PactConfig) (*consumer.V4HTTPMockProvider, error)

NewV4Pact creates a new V4 Pact mock provider for consumer contract testing. V4 Pacts support state parameters and other advanced features. This is a thin wrapper around pact-go/v2 that integrates with Ginkgo.

Types

type PactConfig

type PactConfig struct {
	// Consumer is the name of the service consuming the API
	Consumer string
	// Provider is the name of the service providing the API
	Provider string
	// PactDir is the directory where pact files will be written
	PactDir string
}

PactConfig holds configuration for Pact contract testing.

Jump to

Keyboard shortcuts

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