matchers

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSnetSVCAddrWithIA

func IsSnetSVCAddrWithIA(ia addr.IA) gomock.Matcher

IsSnetSVCAddrWithIA returns a matcher for a snet.SVCAddr with the given IA.

Types

type PartialStruct

type PartialStruct struct {
	Target interface{}
}

PartialStruct can be used to match a struct partially. All specified fields in the target struct will be matched. The field values which have a zero value are ignored. Passing a target which is not a struct or a pointer to a struct is invalid and will result in a matcher that matches nothing.

func (PartialStruct) Matches

func (m PartialStruct) Matches(x interface{}) bool

func (PartialStruct) String

func (m PartialStruct) String() string

type QueryHPGroupIDs

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

QueryHPGroupIDs is a matcher for HPGroupIDs.

func EqHPGroupIDs

func EqHPGroupIDs(ids []uint64) *QueryHPGroupIDs

EqHPGroupIDs returns a matcher for the given slice of HPGroupIDs.

func (*QueryHPGroupIDs) Matches

func (m *QueryHPGroupIDs) Matches(x interface{}) bool

Matches returns whether x matches the defined HPGroupIDs ignoring the order of the slice elements.

func (*QueryHPGroupIDs) String

func (m *QueryHPGroupIDs) String() string

type QueryParams

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

QueryParams is a matcher for query parameters.

func EqParams

func EqParams(query *query.Params) *QueryParams

EqParams returns a matcher for the given query parameters.

func (*QueryParams) Matches

func (m *QueryParams) Matches(x interface{}) bool

Matches returns whether x matches the defined query parameter ignoring the order of the slices.

func (*QueryParams) String

func (m *QueryParams) String() string

Jump to

Keyboard shortcuts

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