Documentation ¶
Index ¶
- func IsEmpty(hint ...string) interface{}
- type Check
- func And[T any](checks ...Check[T]) Check[T]
- func Contains(value string, rest ...any) Check[string]
- func Has(values ...string) Check[[]string]
- func IsEqualBytes(value []byte) Check[[]byte]
- func IsJSONEqual(value []byte) Check[[]byte]
- func IsUniqAnd(check Check[string]) Check[[]string]
- func Matches(value string, rest ...any) Check[string]
- func Not[T any](check Check[T]) Check[T]
- type CheckAnd
- type CheckContains
- type CheckFunc
- type CheckHas
- type CheckIsCarFile
- func (c *CheckIsCarFile) Check(carContent []byte) CheckOutput
- func (c CheckIsCarFile) Exactly() *CheckIsCarFile
- func (c CheckIsCarFile) HasBlock(cidStr string) *CheckIsCarFile
- func (c CheckIsCarFile) HasBlocks(cidStrs ...string) *CheckIsCarFile
- func (c CheckIsCarFile) HasRoot(cidStr string) *CheckIsCarFile
- func (c CheckIsCarFile) HasRoots(cidStrs ...string) *CheckIsCarFile
- func (c CheckIsCarFile) IgnoreRoots() *CheckIsCarFile
- func (c CheckIsCarFile) InThatOrder() *CheckIsCarFile
- func (c CheckIsCarFile) MightHaveNoRoots() *CheckIsCarFile
- type CheckIsEmpty
- type CheckIsEqual
- type CheckIsEqualBytes
- type CheckIsJSONEqual
- type CheckIsTarFile
- type CheckNot
- type CheckOutput
- type CheckRegexpMatch
- type CheckUniqAnd
- type CheckWithHint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Check ¶
type Check[T any] interface { Check(T) CheckOutput }
func IsEqualBytes ¶
golang doesn't support method overloading / generic specialization
func IsJSONEqual ¶
type CheckContains ¶
type CheckContains struct {
Value string
}
func (*CheckContains) Check ¶
func (c *CheckContains) Check(v string) CheckOutput
type CheckHas ¶
type CheckHas struct {
// contains filtered or unexported fields
}
func (*CheckHas) Check ¶
func (c *CheckHas) Check(v []string) CheckOutput
type CheckIsCarFile ¶
type CheckIsCarFile struct {
// contains filtered or unexported fields
}
func IsCar ¶
func IsCar() *CheckIsCarFile
func (*CheckIsCarFile) Check ¶
func (c *CheckIsCarFile) Check(carContent []byte) CheckOutput
func (CheckIsCarFile) Exactly ¶
func (c CheckIsCarFile) Exactly() *CheckIsCarFile
func (CheckIsCarFile) HasBlock ¶
func (c CheckIsCarFile) HasBlock(cidStr string) *CheckIsCarFile
func (CheckIsCarFile) HasBlocks ¶
func (c CheckIsCarFile) HasBlocks(cidStrs ...string) *CheckIsCarFile
func (CheckIsCarFile) HasRoot ¶
func (c CheckIsCarFile) HasRoot(cidStr string) *CheckIsCarFile
func (CheckIsCarFile) HasRoots ¶
func (c CheckIsCarFile) HasRoots(cidStrs ...string) *CheckIsCarFile
func (CheckIsCarFile) IgnoreRoots ¶
func (c CheckIsCarFile) IgnoreRoots() *CheckIsCarFile
func (CheckIsCarFile) InThatOrder ¶
func (c CheckIsCarFile) InThatOrder() *CheckIsCarFile
func (CheckIsCarFile) MightHaveNoRoots ¶
func (c CheckIsCarFile) MightHaveNoRoots() *CheckIsCarFile
type CheckIsEmpty ¶
type CheckIsEmpty struct { }
func (CheckIsEmpty) Check ¶
func (c CheckIsEmpty) Check(v []string) CheckOutput
type CheckIsEqual ¶
type CheckIsEqual[T comparable] struct { Value T }
func IsEqualT ¶
func IsEqualT[T comparable](value T) *CheckIsEqual[T]
func (CheckIsEqual[T]) Check ¶
func (c CheckIsEqual[T]) Check(v T) CheckOutput
type CheckIsEqualBytes ¶
type CheckIsEqualBytes struct {
Value []byte
}
func (CheckIsEqualBytes) Check ¶
func (c CheckIsEqualBytes) Check(v []byte) CheckOutput
type CheckIsJSONEqual ¶
type CheckIsJSONEqual struct {
Value interface{}
}
func (*CheckIsJSONEqual) Check ¶
func (c *CheckIsJSONEqual) Check(v []byte) CheckOutput
type CheckIsTarFile ¶
type CheckIsTarFile struct {
// contains filtered or unexported fields
}
func IsTarFile ¶
func IsTarFile() *CheckIsTarFile
func (*CheckIsTarFile) Check ¶
func (c *CheckIsTarFile) Check(v []byte) CheckOutput
func (*CheckIsTarFile) HasFile ¶
func (c *CheckIsTarFile) HasFile(format string, a ...interface{}) *CheckIsTarFile
func (*CheckIsTarFile) HasFileWithContent ¶
func (c *CheckIsTarFile) HasFileWithContent(fileName, content string) *CheckIsTarFile
type CheckNot ¶
type CheckNot[T any] struct { // contains filtered or unexported fields }
func (CheckNot[T]) Check ¶
func (c CheckNot[T]) Check(v T) CheckOutput
type CheckOutput ¶
func CidArrayEquals ¶
func CidArrayEquals(a, b []cid.Cid) CheckOutput
func CidOrderedSubsetContains ¶
func CidOrderedSubsetContains(a, b []cid.Cid) CheckOutput
func CidSetContains ¶
func CidSetContains(a, b []cid.Cid) CheckOutput
func CidSetEquals ¶
func CidSetEquals(a, b []cid.Cid) CheckOutput
type CheckRegexpMatch ¶
func (*CheckRegexpMatch) Check ¶
func (c *CheckRegexpMatch) Check(v string) CheckOutput
type CheckUniqAnd ¶
type CheckUniqAnd struct {
// contains filtered or unexported fields
}
func (*CheckUniqAnd) Check ¶
func (c *CheckUniqAnd) Check(v []string) CheckOutput
type CheckWithHint ¶
func ContainsWithHint ¶
func ContainsWithHint(hint string, value string, rest ...any) CheckWithHint[string]
func IsEqualWithHint ¶
func IsEqualWithHint(hint string, value string, rest ...any) CheckWithHint[string]
func (CheckWithHint[T]) Check ¶
func (c CheckWithHint[T]) Check(v T) CheckOutput
Click to show internal directories.
Click to hide internal directories.