cccac

package
v0.0.0-...-441f3cd Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

The cccac package fetches the current opening state of club room of the Chaos Communication Club in Aachen.

The public API only provides access to a boolean state.

See: https://wiki.aachen.ccc.de/doku.php?id=projekte:clubstatus

Index

Constants

View Source
const (
	UrlApi              = "https://status.aachen.ccc.de/api/v0"
	UrlApiCurrentStatus = UrlApi + "/status/current?public"
)

Variables

This section is empty.

Functions

func FetchStatus

func FetchStatus(c *colly.Collector, cb func(sts Status), ecb cfac.ErrorCallback) *sync.WaitGroup

func NewMeasurable

func NewMeasurable() cfac.Measurable

Types

type Measurable

type Measurable struct{}

func (*Measurable) Fetch

func (m *Measurable) Fetch(c *colly.Collector, cb cfac.MeasurementCallback, ecb cfac.ErrorCallback) *sync.WaitGroup

type ResponseCurrentStatus

type ResponseCurrentStatus struct {
	Changed Status `json:"changed"`
}

type Status

type Status struct {
	Status string `json:"status"`
	Time   uint   `json:"time"`
	Type   string `json:"type"`
}

func (*Status) Measure

func (sts *Status) Measure() cfac.Measurement

Jump to

Keyboard shortcuts

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