charts

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAiport = errors.New("invalid airport")
	ErrNoCharts      = errors.New("no charts found")
)

Functions

This section is empty.

Types

type Chart

type Chart struct {
	ID        string    `json:"-" gorm:"primary_key"`
	AirportID string    `json:"arpt_id" example:"FAI" gorm:"index"`
	Cycle     int       `json:"cycle" example:"2213" gorm:"index"`
	FromDate  time.Time `json:"from_date" example:"2021-09-01T00:00:00Z"`
	ToDate    time.Time `json:"to_date" example:"2021-09-30T00:00:00Z"`
	ChartCode string    `json:"chart_code" example:"DP"`
	ChartName string    `json:"chart_name" example:"RDFLG FOUR (RNAV)"`
	ChartURL  string    `json:"chart_url" example:"https://aeronav.faa.gov/d-tpp/2212/01234RDFLG.PDF"`
	CreatedAt time.Time `json:"created_at" example:"2021-09-01T00:00:00Z"`
	UpdatedAt time.Time `json:"updated_at" example:"2021-09-01T00:00:00Z"`
}

type ChartService

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

func NewChartService

func NewChartService(db *gorm.DB, cache *cache.Cache, airportService *airports.AirportService) *ChartService

func (*ChartService) GetAllCharts

func (s *ChartService) GetAllCharts() (map[string][]*Chart, error)

func (*ChartService) GetCharts

func (s *ChartService) GetCharts(apt_id string) ([]*Chart, error)

Jump to

Keyboard shortcuts

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