rki

package
v0.0.0-...-eb4b608 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const BaseUrl = "https://api.corona-zahlen.org"

Variables

This section is empty.

Functions

func JaroWinklerDistance

func JaroWinklerDistance(s1, s2 string) float64

Types

type Data

type Data struct {
	Cases         int     `json:"cases"`
	Deaths        int     `json:"deaths"`
	Recovered     int     `json:"recovered"`
	WeekIncidence float64 `json:"weekIncidence"`
	CasesPer100K  float64 `json:"casesPer100k"`
	CasesPerWeek  int     `json:"casesPerWeek"`
	Delta         struct {
		Cases     int `json:"cases"`
		Deaths    int `json:"deaths"`
		Recovered int `json:"recovered"`
	} `json:"delta"`
}

type District

type District struct {
	Data
	Ags    string `json:"ags"`
	Name   string `json:"name"`
	County string `json:"county"`
	State  string `json:"state"`
}

type DistrictResponse

type DistrictResponse struct {
	Districts map[string]District
	Meta      Meta
}

func (*DistrictResponse) UnmarshalJSON

func (districtResponse *DistrictResponse) UnmarshalJSON(bytes []byte) error

type Meta

type Meta struct {
	LastUpdate time.Time `json:"lastUpdate"`
}

type Nationwide

type Nationwide struct {
	Data
	R struct {
		RValue4Days struct {
			Value float64   `json:"value"`
			Date  time.Time `json:"date"`
		} `json:"rValue4Days"`
		RValue7Days struct {
			Value float64   `json:"value"`
			Date  time.Time `json:"date"`
		} `json:"rValue7Days"`
	} `json:"r"`
	Meta Meta `json:"meta"`
}

type Plugin

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

func New

func New(rkiService Service) *Plugin

func (*Plugin) Commands

func (p *Plugin) Commands() []telebot.Command

func (*Plugin) Handlers

func (p *Plugin) Handlers(botInfo *telebot.User) []plugin.Handler

func (*Plugin) Name

func (p *Plugin) Name() string

type Service

type Service interface {
	DelAGS(user *telebot.User) error
	GetAGS(user *telebot.User) (string, error)
	SetAGS(user *telebot.User, ags string) error
}

Jump to

Keyboard shortcuts

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