-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.go
36 lines (27 loc) · 1.19 KB
/
search.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package soumuradio
import (
"context"
"time"
)
// GetRadioLicenseListSearchByDate get radio list from DF to DT.
func (c *Client) GetRadioLicenseListSearchByDate(ctx context.Context, opt ListOpts, DF, DT time.Time) (LicenseList, error) {
opt.DF = DF // start date
opt.DT = DT // end date
return c.GetRadioLicenseList(ctx, opt)
}
// GetRadioLicenseListSearchByCallsign get radio list searched by callsign
func (c *Client) GetRadioLicenseListSearchByCallsign(ctx context.Context, opt ListOpts, str string) (LicenseList, error) {
opt.MA = str // search target callsign
return c.GetRadioLicenseList(ctx, opt)
}
// GetRadioLicenseListSearchByDate get radio list from DF to DT.
func (c *Client) GetRadioRegistrationListSearchByDate(ctx context.Context, opt ListOpts, DF, DT time.Time) (RegistrationList, error) {
opt.DF = DF // start date
opt.DT = DT // end date
return c.GetRadioRegistrationList(ctx, opt)
}
// GetRadioLicenseListSearchByCallsign get radio list searched by callsign
func (c *Client) GetRadioRegistrationListSearchByCallsign(ctx context.Context, opt ListOpts, str string) (RegistrationList, error) {
opt.MA = str // search target callsign
return c.GetRadioRegistrationList(ctx, opt)
}