Documentation
¶
Index ¶
- func FromYAMLComment(input string) string
- func MatchScenarioPredicate(matched *types.APIKeyData, target *types.APIKeyData, requestCount uint64) bool
- func NopCloser(r *bytes.Reader) io.ReadSeekCloser
- func ReadAll(body io.ReadCloser) (b []byte, reader io.ReadSeekCloser, err error)
- func ToYAMLComment(input string) string
- type ResetReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromYAMLComment ¶
FromYAMLComment converts YAML comments back to regular multiline text by removing the "# " prefix from each line.
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
func ToYAMLComment ¶
ToYAMLComment converts a multiline string to YAML comment style by prefixing each line with "# ". Empty lines will have just "#" without the space.
Types ¶
type ResetReader ¶
type ResetReader interface {
Reset() error
}
ResetReader is the interface for resetting reader
Click to show internal directories.
Click to hide internal directories.