Documentation
¶
Index ¶
- func CompressGzip(content string) *bytes.Buffer
- func IsNormalPageCompleted(s string) bool
- func MockVariableValue[T any](p *T, v ...T) (reset func())
- func ParseJSONError(buf []byte) (ret struct{ ... })
- func ParseJSONRedirect(buf []byte) (ret struct{ ... })
- func ReadAllTarGzContent(r io.Reader) (map[string]string, error)
- func RedirectURL(resp http.ResponseWriter) string
- func WriteTarArchive(files map[string]string) *bytes.Buffer
- func WriteTarCompression[F func(io.Writer) io.WriteCloser | func(io.Writer) (io.WriteCloser, error)](compression F, files map[string]string) *bytes.Buffer
- func WriteZipArchive(files map[string]string) *bytes.Buffer
- type LogChecker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressGzip ¶ added in v1.26.0
func IsNormalPageCompleted ¶ added in v1.20.0
func MockVariableValue ¶ added in v1.20.3
func MockVariableValue[T any](p *T, v ...T) (reset func())
func ParseJSONError ¶ added in v1.25.0
func ParseJSONRedirect ¶ added in v1.26.0
func ReadAllTarGzContent ¶ added in v1.26.0
func RedirectURL ¶ added in v1.4.0
func RedirectURL(resp http.ResponseWriter) string
RedirectURL returns the redirect URL of a http response. It also works for JSONRedirect: `{"redirect": "..."}` FIXME: it should separate the logic of checking from header and JSON body
func WriteTarCompression ¶ added in v1.26.0
Types ¶
type LogChecker ¶ added in v1.20.0
type LogChecker struct {
*log.EventWriterBaseImpl
// contains filtered or unexported fields
}
func NewLogChecker ¶ added in v1.20.0
func NewLogChecker(namePrefix string) (logChecker *LogChecker, cancel func())
func (*LogChecker) Check ¶ added in v1.20.0
func (lc *LogChecker) Check(d time.Duration) (filtered []bool, stopped bool)
Check returns the filtered slice and whether the stop mark is reached.
func (*LogChecker) Filter ¶ added in v1.20.0
func (lc *LogChecker) Filter(msgs ...string) *LogChecker
Filter will make the `Check` function to check if these logs are outputted.
func (*LogChecker) Run ¶ added in v1.20.0
func (lc *LogChecker) Run(ctx context.Context)
func (*LogChecker) StopMark ¶ added in v1.20.0
func (lc *LogChecker) StopMark(msg string) *LogChecker
Click to show internal directories.
Click to hide internal directories.