This repository has been archived by the owner on Jun 4, 2019. It is now read-only.
/
ordering_type.go
63 lines (59 loc) · 1.92 KB
/
ordering_type.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
package hetzner
import "time"
type Product struct {
ID string `json:"id"`
Name string `json:"name"`
Description []string `json:"description"`
Traffic string `json:"traffic"`
Dist []string `json:"dist"`
Arch []int `json:"arch"`
Lang []string `json:"lang"`
Price string `json:"price"`
PriceSetup string `json:"price_setup"`
PriceVat string `json:"price_vat"`
PriceSetupVat string `json:"price_setup_vat"`
}
type AuthorizedKey struct {
Name string `json:"name"`
Fingerprint string `json:"fingerprint"`
Type string `json:"type"`
Size int `json:"size"`
}
type HostKey struct {
Fingerprint string `json:"fingerprint"`
Type string `json:"type"`
Size int `json:"size"`
}
type Transaction struct {
ID string `json:"id"`
Date time.Time `json:"date"`
Status string `json:"status"`
ServerNumber *string `json:"server_number"`
ServerIP *string `json:"server_ip"`
AuthorizedKey []struct {
Key *AuthorizedKey `json:"key"`
} `json:"authorized_key"`
HostKey []struct {
Key *HostKey `json:"key"`
} `json:"host_key"`
Comment *string `json:"comment"`
Product struct {
ID string `json:"id"`
Name string `json:"name"`
Description []string `json:"description"`
Traffic string `json:"traffic"`
Dist string `json:"dist"`
Arch string `json:"arch"`
Lang string `json:"lang"`
} `json:"product"`
}
type CreateTransactionRequest struct {
ProductID string `url:"product_id"`
AuthorizedKey []string `url:"authorized_key,brackets"`
Password string `url:"password,omitempty"`
Dist string `url:"dist,omitempty"`
Arch int `url:"arch,omitempty"`
Lang string `url:"lang,omitempty"`
Comment string `url:"comment,omitempty"`
Test bool `url:"test"`
}