utils

package
v0.0.0-...-079c800 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchScenarioPredicate

func MatchScenarioPredicate(matched *types.APIKeyData, target *types.APIKeyData, requestCount uint64) bool

MatchScenarioPredicate checks if predicate match

func NopCloser

func NopCloser(r *bytes.Reader) io.ReadSeekCloser

NopCloser returns a ReadCloser with a no-op Close method wrapping the provided Reader r. If r implements WriterTo, the returned ReadCloser will implement WriterTo by forwarding calls to r.

func ReadAll

func ReadAll(body io.ReadCloser) (b []byte, reader io.ReadSeekCloser, err error)

ReadAll helper method

Types

type ResetReader

type ResetReader interface {
	Reset() error
}

ResetReader is the interface for resetting reader

Jump to

Keyboard shortcuts

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