runner

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUpdateCallback

func GetUpdateCallback() func()

GetUpdateCallback returns a callback function that updates cdncheck

Types

type Options

type Options struct {
	Inputs             goflags.StringSlice
	Response           bool
	HasStdin           bool
	Output             string
	Version            bool
	Json               bool
	Cdn                bool
	Cloud              bool
	Waf                bool
	Exclude            bool
	Verbose            bool
	NoColor            bool
	Silent             bool
	Debug              bool
	DisableUpdateCheck bool
	MatchCdn           goflags.StringSlice
	MatchCloud         goflags.StringSlice
	MatchWaf           goflags.StringSlice
	FilterCdn          goflags.StringSlice
	FilterCloud        goflags.StringSlice
	FilterWaf          goflags.StringSlice
	Resolvers          goflags.StringSlice
	OnResult           func(r Output)
	MaxRetries         int
}

func ParseOptions

func ParseOptions() *Options

type Output

type Output struct {
	Timestamp time.Time `json:"timestamp,omitempty"`
	Input     string    `json:"input"`
	IP        string    `json:"ip"`
	Cdn       bool      `json:"cdn,omitempty"`
	CdnName   string    `json:"cdn_name,omitempty"`
	Cloud     bool      `json:"cloud,omitempty"`
	CloudName string    `json:"cloud_name,omitempty"`
	Waf       bool      `json:"waf,omitempty"`
	WafName   string    `json:"waf_name,omitempty"`
	// contains filtered or unexported fields
}

func (*Output) String

func (o *Output) String() string

func (*Output) StringIP

func (o *Output) StringIP() string

type OutputWriter

type OutputWriter struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewOutputWriter

func NewOutputWriter() (*OutputWriter, error)

func (*OutputWriter) AddWriters

func (o *OutputWriter) AddWriters(writers ...io.Writer)

func (*OutputWriter) Close

func (o *OutputWriter) Close()

func (*OutputWriter) Write

func (o *OutputWriter) Write(data []byte)

func (*OutputWriter) WriteJSON

func (o *OutputWriter) WriteJSON(data Output)

func (*OutputWriter) WriteString

func (o *OutputWriter) WriteString(data string)

type Runner

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

func NewRunner

func NewRunner(options *Options) *Runner

func (*Runner) Run

func (r *Runner) Run() error

func (*Runner) SetWriter

func (r *Runner) SetWriter(writer io.Writer) error

Jump to

Keyboard shortcuts

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