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 }
type OutputWriter ¶
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)
Click to show internal directories.
Click to hide internal directories.