domain

package
v0.0.0-...-4275943 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Outage

type Outage struct {
	Location          string     `validate:"required"`
	Description       string     `validate:"required"`
	ReportedAt        time.Time  `validate:"required"`
	ReturnOfServiceAt *time.Time `validate:""`
	Status            string     `validate:"required"`
}

Outage represents information about a communal outage in Southwark.

func (Outage) Hash

func (o Outage) Hash() string

Hash returns a consisnt hash for identifying the Outage, using ReportedAt and Location.

func (Outage) IsValid

func (o Outage) IsValid() (bool, error)

IsValid verifies that the data within the Outage looks correct, useful when scraping.

Jump to

Keyboard shortcuts

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