japan

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: CC0-1.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JpData

type JpData struct {
	WebConfig
	CountryCode  string `json:"countryCode"`
	CodeListPath string `json:"codeListPath"`

	LoginData        jpLoginFormData `json:"loginData"`
	RequiredLocation []string        `json:"requiredLocation"`
	// contains filtered or unexported fields
}

JpData contains all the information required to connect and retrieve NOTAM from AIS services

var JapanAis JpData

func (*JpData) IsAirportCode

func (jpd *JpData) IsAirportCode(code string) bool

func (*JpData) Process

func (jpd *JpData) Process()

Process launches the global process to recover the NOTAMs from the Japan AIS webpages. It recovers the relevant information from a json file, set in ./country/japan/def.json. Then, it initiates the http and mongodb interfaces. Once achieved, it interrogates the web form by providing the location ICAO code to the webform to identify the reference list of the relevant NOTAM.

type JpNotamAnchor

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

structure used to submit a map search if location empty, retrieve all enroute data

type JpNotamDispForm

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

func (*JpNotamDispForm) FillInformation

func (ndf *JpNotamDispForm) FillInformation(httpClient *webclient.AisWebClient, url string, countryCode string) (*notam.Notam, error)

func (*JpNotamDispForm) GetKey

func (ndf *JpNotamDispForm) GetKey() string

func (*JpNotamDispForm) Number

func (ndf *JpNotamDispForm) Number() string

type JpNotamMapSubmit

type JpNotamMapSubmit struct {
	Enroute    string `json:"enroute"`
	Period     string `json:"period"`
	DispScopeE string `json:"dispScopeE"`
	DispScopeW string `json:"dispScopeW"`
}

func (*JpNotamMapSubmit) ListNotamReferences

func (mapSearch *JpNotamMapSubmit) ListNotamReferences(httpClient *webclient.AisWebClient, webPage string, nextWebPage string) []JpNotamDispForm

type JpNotamSearchForm

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

Structure used to submit data for airport / keycode search

func (*JpNotamSearchForm) ListNotamReferences

func (nsf *JpNotamSearchForm) ListNotamReferences(httpClient *webclient.AisWebClient, webpage string, nextWebPage string) []JpNotamDispForm

type WebConfig

type WebConfig struct {
	CountryDir      string `json:"country"`
	LoginPage       string `json:"loginPage"`
	NotamFirstPage  string `json:"notamFirstPage"`
	NotamDetailPage string `json:"notamDetailPage"`
	NotamNextPage   string `json:"notamNextPage"`
	MapPage         string `json:"mapPage"`
	MapAnswerPage   string `json:"mapAnswerPage"`
	LogOutPage      string `json:"logoutpage"`
	//httpClient      http.Client //share the httpClient
	IsConnected bool
}

func (*WebConfig) GetFirstPage

func (web *WebConfig) GetFirstPage(httpClient http.Client, values url.Values) *goquery.Document

func (*WebConfig) GetNextPage

func (web *WebConfig) GetNextPage(httpClient http.Client) *goquery.Document

func (*WebConfig) GetPage

func (web *WebConfig) GetPage(httpClient http.Client, url string, values url.Values) *goquery.Document

Jump to

Keyboard shortcuts

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