messages

package
v0.0.0-...-cbc9d59 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DepartureAlertPlaintextTemplate    = mustParseTemplate("departureAlertPlaintext", rawDeparturePlaintextTemplate)
	ArrivalAlertPlaintextTemplate      = mustParseTemplate("arrivalAlertPlaintext", rawArrivalPlaintextTemplate)
	PreDepartureAlertPlaintextTemplate = mustParseTemplate("preDeparturePlaintext", rawPreDeparturePlaintextTemplate)
	PreArrivalAlertPlaintextTemplate   = mustParseTemplate("preArrivalAlertPlaintext", rawPreArrivalPlaintextTemplate)
)

Functions

This section is empty.

Types

type FlightAwareAirportInfo

type FlightAwareAirportInfo struct {
	Airport  string
	Timezone string
	Gate     string
	Terminal string
}

type FlightAwareAlert

type FlightAwareAlert struct {
	GateArrivalTime   flightaware.FlightTimestamp
	LandingTime       flightaware.FlightTimestamp
	TakeoffTime       flightaware.FlightTimestamp
	GateDepartureTime flightaware.FlightTimestamp

	Origin           FlightAwareAirportInfo
	Destination      FlightAwareAirportInfo
	FlightNumber     string
	IsLanding        bool
	IsGateArrival    bool
	IsTakeoff        bool
	IsGateDeparture  bool
	UseLocalTimezone bool
	// contains filtered or unexported fields
}

func (FlightAwareAlert) FormatMarkdown

func (a FlightAwareAlert) FormatMarkdown() string

func (FlightAwareAlert) FormatPlaintext

func (a FlightAwareAlert) FormatPlaintext() string

func (FlightAwareAlert) MarkdownTemplate

func (a FlightAwareAlert) MarkdownTemplate() *template.Template

func (FlightAwareAlert) PlaintextTemplate

func (a FlightAwareAlert) PlaintextTemplate() *template.Template

func (*FlightAwareAlert) SetPlaintextTemplate

func (a *FlightAwareAlert) SetPlaintextTemplate(tmpl *template.Template) *FlightAwareAlert

type Message

type Message interface {
	// FormatPlaintext should return the message text without any special formatting.
	FormatPlaintext() string
	// FormatMarkdown should return the message text with any desired markdown formatting.
	FormatMarkdown() string
	// PlaintextTemplate should return the template.Template (from the text/template package) used by Plaintext.
	PlaintextTemplate() *template.Template
	// MarkdownTemplate ahould return the template.Template (from the text/template package) used by Markdown.
	MarkdownTemplate() *template.Template
}

type SpotPriceAlert

type SpotPriceAlert struct {
	EventTime     time.Time
	SpotPrice     decimal.Decimal
	BaseAmount    decimal.Decimal
	BaseCurrency  string
	QuoteCurrency string
	// contains filtered or unexported fields
}

func (SpotPriceAlert) FormatMarkdown

func (a SpotPriceAlert) FormatMarkdown() string

func (SpotPriceAlert) FormatPlaintext

func (a SpotPriceAlert) FormatPlaintext() string

func (SpotPriceAlert) MarkdownTemplate

func (a SpotPriceAlert) MarkdownTemplate() *template.Template

func (SpotPriceAlert) PlaintextTemplate

func (a SpotPriceAlert) PlaintextTemplate() *template.Template

Jump to

Keyboard shortcuts

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