-
Notifications
You must be signed in to change notification settings - Fork 132
/
types_me.go
113 lines (98 loc) · 3.62 KB
/
types_me.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package ovh
import (
"fmt"
)
type MeIdentityUserResponse struct {
Creation string `json:"creation"`
Description string `json:"description"`
Email string `json:"email"`
Group string `json:"group"`
LastUpdate string `json:"lastUpdate"`
Login string `json:"login"`
PasswordLastUpdate string `json:"passwordLastUpdate"`
Status string `json:"status"`
}
// MeIdentityUser Opts
type MeIdentityUserCreateOpts struct {
Description string `json:"description"`
Email string `json:"email"`
Group string `json:"group"`
Login string `json:"login"`
Password string `json:"password"`
}
type MeIdentityUserUpdateOpts struct {
Login string `json:"user"`
Description string `json:"description"`
Email string `json:"email"`
Group string `json:"group"`
}
// MeSshKey Opts
type MeSshKeyCreateOpts struct {
KeyName string `json:"keyName"`
Key string `json:"key"`
}
type MeSshKeyResponse struct {
KeyName string `json:"keyName"`
Key string `json:"key"`
Default bool `json:"default"`
}
func (s *MeSshKeyResponse) String() string {
return fmt.Sprintf("SSH Key: %s, key:%s, default:%t",
s.Key, s.KeyName, s.Default)
}
type MeSshKeyUpdateOpts struct {
Default bool `json:"default"`
}
// MeIpxeScript Opts
type MeIpxeScriptCreateOpts struct {
Description string `json:"description"`
Name string `json:"name"`
Script string `json:"script"`
}
type MeIpxeScriptResponse struct {
Name string `json:"name"`
Script string `json:"script"`
}
func (s *MeIpxeScriptResponse) String() string {
return fmt.Sprintf("IpxeScript: %s", s.Name)
}
type MePaymentMeanBankAccount struct {
Bic string `json:"bic"`
CreationDate string `json:"creationDate"`
DefaultPaymentMean bool `json:"defaultPaymentMean"`
Description *string `json:"description"`
Iban string `json:"iban"`
Icon *MePaymentMeanIcon `json:"icon"`
Id int64 `json:"id"`
MandateSignatureDate *string `json:"mandateSignatureDate"`
OwnerAddress string `json:"ownerAddress"`
OwnerName string `json:"ownerName"`
State string `json:"state"`
UniqueReference string `json:"uniqueReference"`
ValidationDocumentLink *string `json:"validationDocumentLink"`
}
type MePaymentMeanCreditCard struct {
DefaultPaymentMean bool `json:"defaultPaymentMean"`
Description *string `json:"description"`
ExpirationDate string `json:"expirationDate"`
Icon *MePaymentMeanIcon `json:"icon"`
Id int64 `json:"id"`
Number string `json:"number"`
State string `json:"state"`
ThreeDsValidated string `json:"threeDsValidated"`
Type string `json:"type"`
}
type MePaymentMeanPaypal struct {
AgreementId string `json:"agreementId"`
CreationDate string `json:"creationDate"`
DefaultPaymentMean bool `json:"defaultPaymentMean"`
Description *string `json:"description"`
Email string `json:"email"`
Icon *MePaymentMeanIcon `json:"icon"`
Id int64 `json:"id"`
State string `json:"state"`
}
type MePaymentMeanIcon struct {
Data *string `json:"data"`
Name *string `json:"name"`
}