-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmaclookup_api_v2.go
31 lines (28 loc) · 991 Bytes
/
maclookup_api_v2.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
package maclookup
const (
apiURIPrefix = "https://api.maclookup.app"
apiMAC = "/v2/macs/"
companyNameSuffix = "/company/name"
apiKeyParam = "?apiKey="
)
type maclookupResponseAPIV2 struct {
Success bool `json:"success"`
Found bool `json:"found"`
MacPrefix string `json:"macPrefix"`
Company string `json:"company"`
Address string `json:"address"`
Country string `json:"country"`
BlockStart string `json:"blockStart"`
BlockEnd string `json:"blockEnd"`
BlockSize int `json:"blockSize"`
BlockType string `json:"blockType"`
Updated string `json:"updated"`
IsRand bool `json:"isRand"`
IsPrivate bool `json:"isPrivate"`
}
type errorResponseAPIV2 struct {
Success bool `json:"success" xml:"success"`
Error string `json:"error,omitempty" xml:"error,omitempty"`
ErrorCode int `json:"errorCode,omitempty" xml:"errorCode,omitempty"`
MoreInfo string `json:"moreInfo,omitempty" xml:"moreInfo,omitempty"`
}