patroller

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(esaApiKey, esaTeam string, opts ...PatrollerOptionFn) patroller

Types

type Checker

type Checker interface {
	Check(post string) (*MaybeOutdated, error)
}

type MaybeOutdated

type MaybeOutdated struct {
	Title         string    `json:"title"`
	Category      string    `json:"category"`
	URL           string    `json:"url"`
	LastCheckedAt time.Time `json:"last_checked_at"`
	Owners        []string  `json:"owners"`
}

type PatrollerOptionFn

type PatrollerOptionFn func(*patroller)

func WithCheckerEnableSimpleAnnotation

func WithCheckerEnableSimpleAnnotation() PatrollerOptionFn

func WithCheckerThreshold

func WithCheckerThreshold(day int) PatrollerOptionFn

func WithDebug

func WithDebug() PatrollerOptionFn

type Result

type Result struct {
	Items    []*MaybeOutdated `json:"items"`
	Warnings []*Warning       `json:"warnings"`
}

type Warning

type Warning struct {
	Title    string `json:"title"`
	Category string `json:"category"`
	URL      string `json:"url"`
	Reason   string `json:"reason"`
}

Jump to

Keyboard shortcuts

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