handlers

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BIPLink  = "https://github.com/bitcoin/bips/blob/master/bip-%04d.mediawiki"
	SLIPLink = "https://github.com/satoshilabs/slips/blob/master/slip-%04d.md"
)
View Source
const (
	BOLT = 73738971
	BIP  = 14531737
	SLIP = 50844973
)
View Source
const (
	NoReleaseForProjectTreshold = 10
)

Variables

View Source
var (
	ReBIP  = regexp.MustCompile(`bips?[\s-]*(?P<bipId>[0-9]+)`)
	ReBOLT = regexp.MustCompile(`bolt?[\s-]*(?P<boltId>[0-9]+)`)
	ReSLIP = regexp.MustCompile(`slips?[\s-]*(?P<slipId>[0-9]+)`)
)
View Source
var RFCTypes = map[int64]string{
	BIP:  "bip",
	BOLT: "bolt",
	SLIP: "slip",
}

Functions

func GetRFCNumber

func GetRFCNumber(title string) (int, error)

func RSSExportMapper

func RSSExportMapper(exp export.Map, feed feeds.Feed, post posts.Post) error

Types

type FormatHandler

type FormatHandler interface {
	FetchSince(url string, time time.Time) ([]*posts.Post, error)
	JobHandler // Also implements a job handler
}

func GetFormatHandler

func GetFormatHandler(feed feeds.Feed) FormatHandler

func NewGHReleaseHandler

func NewGHReleaseHandler() FormatHandler

func NewRFCHandler

func NewRFCHandler() FormatHandler

func NewRSSHandler

func NewRSSHandler() FormatHandler

type GHRelease

type GHRelease struct {
	ProjectID int64     `json:"project_id"`
	ReleaseID int64     `json:"release_id"`
	TagID     string    `json:"tag_id"`
	Name      string    `json:"name"`
	IsTagOnly bool      `json:"is_tag_only"`
	Date      time.Time `json:"commit_date"`
	TarBall   string    `json:"tar_ball"`
	Link      string    `json:"link"`
	Owner     string    `json:"owner"`
	Repo      string    `json:"repo"`
}

type GHReleaseHandler

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

func (GHReleaseHandler) FetchSince

func (handler GHReleaseHandler) FetchSince(url string,
	after time.Time) ([]*posts.Post, error)

func (GHReleaseHandler) Handle

func (handler GHReleaseHandler) Handle(feed feeds.Feed) error

type JobHandler

type JobHandler interface {
	// Main handling function
	Handle(feeds.Feed) error
}

type RFCHandler

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

func (RFCHandler) FetchSince

func (handler RFCHandler) FetchSince(url string, after time.Time) ([]*posts.Post, error)

func (RFCHandler) Handle

func (handler RFCHandler) Handle(feed feeds.Feed) error

type RFCUpdate

type RFCUpdate struct {
	RFCID     int64         `json:"rfcid"`
	RFCType   string        `json:"rfc_type"`   //bip bolt slip
	RFCNumber int           `json:"rfc_number"` // (bip/bolt/slip id)
	Issue     *github.Issue `json:"issue"`
	RFCLink   string        `json:"rfc_link"`
}

type RSSHandler

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

func (RSSHandler) FetchSince

func (handler RSSHandler) FetchSince(url string, after time.Time) ([]*posts.Post, error)

func (RSSHandler) Handle

func (handler RSSHandler) Handle(feed feeds.Feed) error

Jump to

Keyboard shortcuts

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