forked from stuartcryan/lastpass-alfred-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
96 lines (85 loc) · 2.83 KB
/
types.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// Copyright (c) 2020 Claas Lisowski <[email protected]>
// MIT Licence - http://opensource.org/licenses/MIT
package main
import "time"
type Folder struct {
Object string `json:"object"`
Id string `json:"id"`
Name string `json:"name"`
}
type Field struct {
Name string `json:"name"`
Value string `json:"value"`
Type int `json:"type"`
}
type Uri struct {
Match int `json:"match"`
Uri string `json:"uri"`
}
type Login struct {
Uris []Uri `json:"uris"`
Username string `json:"username"`
Password string `json:"password"`
Totp string `json:"totp"`
PasswordRevisionDate time.Time `json:"passwordRevisionDate"`
}
type SecureNoteType struct {
Type int `json:"type"`
}
type CardInfo struct {
CardHolderName string `json:"cardholderName"`
Brand string `json:"brand"`
Number string `json:"number"`
ExpMonth string `json:"expMonth"`
ExpYear string `json:"expYear"`
Code string `json:"code"`
}
type Attachments struct {
Id string `json:"id"`
FileName string `json:"fileName"`
Size string `json:"size"`
SizeName string `json:"sizeName"`
Url string `json:"url"`
}
type Identity struct {
Title string `json:"title"`
FirstName string `json:"firstName"`
MiddleName string `json:"middleName"`
LastName string `json:"lastName"`
Address1 string `json:"address1"`
Address2 string `json:"address2"`
Address3 string `json:"address3"`
City string `json:"city"`
State string `json:"state"`
PostalCode string `json:"postalCode"`
Country string `json:"country"`
Company string `json:"company"`
Email string `json:"email"`
Phone string `json:"phone"`
Ssn string `json:"ssn"`
Username string `json:"username"`
PassportNumber string `json:"passportNumber"`
LicenseNumber string `json:"licenseNumber"`
}
// 1: Login
// 2: SecureNote
// 3: Card
// 4: Identity
type Item struct {
Object string `json:"object"`
Id string `json:"id"`
OrganizationId string `json:"organizationId"`
FolderId string `json:"folderId"`
Type int `json:"type"`
Name string `json:"name"`
Notes string `json:"notes"`
Favorite bool `json:"favorite"`
Fields []Field `json:"fields"`
Card CardInfo `json:"card,omitempty"`
Login Login `json:"login,omitempty"`
Identity Identity `json:"identity,omitempty"`
SecureNote SecureNoteType `json:"secureNote,omitempty"`
CollectionIds []string `json:"collectionIds"`
RevisionDate time.Time `json:"revisionDate"`
Attachments []Attachments `json:"attachments,omitempty"`
}