plugin

package
v0.1.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunPlugin

func RunPlugin(_ context.Context) error

Types

type ColorizeWriter

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

func (*ColorizeWriter) Debugln

func (c *ColorizeWriter) Debugln(s string) (int, error)

func (*ColorizeWriter) Errorln

func (c *ColorizeWriter) Errorln(s string) (int, error)

func (*ColorizeWriter) Infoln

func (c *ColorizeWriter) Infoln(s string) (int, error)

func (*ColorizeWriter) Println

func (c *ColorizeWriter) Println(s string) (int, error)

func (*ColorizeWriter) Warnln

func (c *ColorizeWriter) Warnln(s string) (int, error)

func (*ColorizeWriter) WrapBgDebug

func (c *ColorizeWriter) WrapBgDebug(s string) string

func (*ColorizeWriter) WrapBgError

func (c *ColorizeWriter) WrapBgError(s string) string

func (*ColorizeWriter) WrapBgInfo

func (c *ColorizeWriter) WrapBgInfo(s string) string

func (*ColorizeWriter) WrapBgWarn

func (c *ColorizeWriter) WrapBgWarn(s string) string

func (*ColorizeWriter) WrapFgDebug

func (c *ColorizeWriter) WrapFgDebug(s string) string

func (*ColorizeWriter) WrapFgError

func (c *ColorizeWriter) WrapFgError(s string) string

func (*ColorizeWriter) WrapFgInfo

func (c *ColorizeWriter) WrapFgInfo(s string) string

func (*ColorizeWriter) WrapFgWarn

func (c *ColorizeWriter) WrapFgWarn(s string) string

func (*ColorizeWriter) Write

func (c *ColorizeWriter) Write(p []byte) (n int, err error)

type ContentFilter

type ContentFilter interface {
	FilteringLine(string, Logger) (int, error)
}

type Logger

type Logger interface {
	Errorln(msg string) (int, error) // return what io.Writer returns
	Warnln(msg string) (int, error)  // return what io.Writer returns
	Infoln(msg string) (int, error)  // return what io.Writer returns
	Debugln(msg string) (int, error) // return what io.Writer returns

	Println(msg string) (int, error) // return what io.Writer returns, but without color

	WrapBgError(msg string) string
	WrapBgWarn(msg string) string
	WrapBgInfo(msg string) string
	WrapBgDebug(msg string) string

	WrapFgError(msg string) string
	WrapFgWarn(msg string) string
	WrapFgInfo(msg string) string
	WrapFgDebug(msg string) string
}

Logger Nested Color will not work properly. Use Errorln/Warnln/Infoln/Debugln only, or WrapXXXs + Println

Jump to

Keyboard shortcuts

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