pireps

package
v0.0.0-...-ed7ff26 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidPIREP = errors.New("invalid airport")
)

Functions

This section is empty.

Types

type PIREP

type PIREP struct {
	ID           int64      `json:"id"`
	Type         string     `json:"type"`
	Location     string     `json:"location"`
	TM           *time.Time `json:"time"` // time is a reserved word.. so use this
	Altitude     string     `json:"altitude"`
	AircraftType string     `json:"aircraft_type"`
	SkyCover     string     `json:"sky_cover"`
	Visibility   string     `json:"visibility"`
	Temperature  string     `json:"temperature"`
	Wind         string     `json:"wind"`
	Turbulence   string     `json:"turbulence"`
	Icing        string     `json:"icing"`
	Remarks      string     `json:"remarks"`
	Raw          string     `json:"raw"`
}

func (*PIREP) ToString

func (p *PIREP) ToString() string

type PIREPService

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

func NewPIREPService

func NewPIREPService(db *gorm.DB, c *cache.Cache) *PIREPService

func (*PIREPService) AddHook

func (s *PIREPService) AddHook(h func(new *PIREP))

func (*PIREPService) CreatePIREP

func (s *PIREPService) CreatePIREP(pirep *PIREP) error

func (*PIREPService) DeleteExpiredPIREPs

func (s *PIREPService) DeleteExpiredPIREPs() error

func (*PIREPService) DeletePIREP

func (s *PIREPService) DeletePIREP(id int64) error

func (*PIREPService) GetPIREP

func (s *PIREPService) GetPIREP(id int64) (*PIREP, error)

func (*PIREPService) GetPIREPs

func (s *PIREPService) GetPIREPs() ([]*PIREP, error)

Jump to

Keyboard shortcuts

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