Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GQLCallSign = graphql.NewObject(graphql.ObjectConfig{ Name: "Callsign", Fields: graphql.Fields{ "Callsign": &graphql.Field{Type: graphql.String}, "FirstSaw": &graphql.Field{ Type: graphql.String, Resolve: func(p graphql.ResolveParams) (interface{}, error) { return p.Source.(CallSign).FirstSaw.String(), nil }, }, "LastUpdated": &graphql.Field{ Type: graphql.String, Resolve: func(p graphql.ResolveParams) (interface{}, error) { return p.Source.(CallSign).LastUpdated.String(), nil }, }, "Class": &graphql.Field{Type: graphql.String}, "Region": &graphql.Field{Type: graphql.String}, "Stations": &graphql.Field{Type: graphql.NewList(GQLStation)}, "Repeaters": &graphql.Field{Type: graphql.NewList(GQLRepeaterStation)}, }, })
View Source
var GQLRepeaterStation = graphql.NewObject(graphql.ObjectConfig{ Name: "RepeaterStationData", Fields: graphql.Fields{ "UID": &graphql.Field{Type: graphql.String}, "RXFrequency": &graphql.Field{Type: graphql.Float}, "TXFrequency": &graphql.Field{Type: graphql.Float}, "Callsign": &graphql.Field{Type: graphql.String}, "StationNumber": &graphql.Field{Type: graphql.String}, "Region": &graphql.Field{Type: graphql.String}, "City": &graphql.Field{Type: graphql.String}, "StationType": &graphql.Field{Type: graphql.String}, "FirstSaw": &graphql.Field{ Type: graphql.String, Resolve: func(p graphql.ResolveParams) (interface{}, error) { return p.Source.(RepeaterStationData).FirstSaw.String(), nil }, }, }, })
View Source
var GQLStation = graphql.NewObject(graphql.ObjectConfig{ Name: "StationData", Fields: graphql.Fields{ "UID": &graphql.Field{Type: graphql.String}, "Owner": &graphql.Field{Type: graphql.String}, "InclusionDate": &graphql.Field{ Type: graphql.String, Resolve: func(p graphql.ResolveParams) (interface{}, error) { return p.Source.(StationData).InclusionDate.String(), nil }, }, "Certificate": &graphql.Field{Type: graphql.String}, "ExpirationDate": &graphql.Field{ Type: graphql.String, Resolve: func(p graphql.ResolveParams) (interface{}, error) { return p.Source.(StationData).ExpirationDate.String(), nil }, }, "Callsign": &graphql.Field{Type: graphql.String}, "Service": &graphql.Field{Type: graphql.String}, "City": &graphql.Field{Type: graphql.String}, "StationType": &graphql.Field{Type: graphql.String}, "Region": &graphql.Field{Type: graphql.String}, "FirstSaw": &graphql.Field{ Type: graphql.String, Resolve: func(p graphql.ResolveParams) (interface{}, error) { return p.Source.(StationData).FirstSaw.String(), nil }, }, }, })
Functions ¶
func CallSignArrayToString ¶
func IndexOfString ¶
Types ¶
type CallSign ¶
type CallSign struct { gorm.Model Callsign string `gorm:"primary_key"` FirstSaw time.Time LastUpdated time.Time Class string Region string Stations []StationData `gorm:"foreignkey:Callsign;association_foreignkey:Callsign"` Repeaters []RepeaterStationData `gorm:"foreignkey:Callsign;association_foreignkey:Callsign"` }
func MapCallsignRawData ¶
func Raw2CallsignData ¶
type CertificateData ¶
type CertificateData struct { gorm.Model TaxId string Class string Certificate string InclusionDate time.Time ExpirationDate time.Time Name string Status string }
func Raw2CertificateData ¶
func Raw2CertificateData(raw map[string]string) CertificateData
type RepeaterStationData ¶
type RepeaterStationData struct { gorm.Model UID string RXFrequency uint64 TXFrequency uint64 Callsign string StationNumber string City string Region string StationType string FirstSaw time.Time }
func MapRepeaterStationRawData ¶
func MapRepeaterStationRawData(raw []map[string]string) []RepeaterStationData
func Raw2RepeaterStationData ¶
func Raw2RepeaterStationData(raw map[string]string) RepeaterStationData
func (*RepeaterStationData) GenerateUID ¶
func (cs *RepeaterStationData) GenerateUID()
type StationData ¶
type StationData struct { gorm.Model UID string Owner string Certificate string InclusionDate time.Time ExpirationDate time.Time Callsign string City string Service string StationType string Region string FirstSaw time.Time }
func MapStationRawData ¶
func MapStationRawData(raw []map[string]string) []StationData
func Raw2StationData ¶
func Raw2StationData(raw map[string]string) StationData
func (*StationData) GenerateUID ¶
func (cs *StationData) GenerateUID()
type TestData ¶
type TestData struct { gorm.Model UID string Hash string Certificates string TestDate time.Time InscriptionEndDate time.Time ActiveInscriptions string CanceledInscriptions string StartTime string Address string MorseTest bool ComputerTest bool Accountable string Status string ContactPhone string MaxVacancies string AvailableVacancies string Region string }
func MapTestDataRawData ¶
func Raw2TestData ¶
func RemoveDuplicateTestData ¶
func (*TestData) GenerateHash ¶
func (td *TestData) GenerateHash()
func (*TestData) GenerateUID ¶
func (td *TestData) GenerateUID()
Click to show internal directories.
Click to hide internal directories.