-
Notifications
You must be signed in to change notification settings - Fork 105
/
models.go
116 lines (94 loc) · 3.05 KB
/
models.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
114
115
116
package models
type Version struct {
Number string `json:"number"`
}
type InRequest struct {
Source Source `json:"source"`
Version Version `json:"version"`
Params InParams `json:"params"`
}
type InResponse struct {
Version Version `json:"version"`
Metadata Metadata `json:"metadata"`
}
type InParams struct {
Bump string `json:"bump"`
Pre string `json:"pre"`
}
type OutRequest struct {
Source Source `json:"source"`
Version Version `json:"version"`
Params OutParams `json:"params"`
}
type OutResponse struct {
Version Version `json:"version"`
Metadata Metadata `json:"metadata"`
}
type OutParams struct {
File string `json:"file"`
Bump string `json:"bump"`
Pre string `json:"pre"`
}
type CheckRequest struct {
Source Source `json:"source"`
Version Version `json:"version"`
}
type CheckResponse []Version
type Source struct {
Driver Driver `json:"driver"`
InitialVersion string `json:"initial_version"`
Bucket string `json:"bucket"`
Key string `json:"key"`
AccessKeyID string `json:"access_key_id"`
SecretAccessKey string `json:"secret_access_key"`
RegionName string `json:"region_name"`
Endpoint string `json:"endpoint"`
DisableSSL bool `json:"disable_ssl"`
SkipSSLVerification bool `json:"skip_ssl_verification"`
ServerSideEncryption string `json:"server_side_encryption"`
UseV2Signing bool `json:"use_v2_signing"`
URI string `json:"uri"`
Branch string `json:"branch"`
PrivateKey string `json:"private_key"`
Username string `json:"username"`
Password string `json:"password"`
File string `json:"file"`
GitUser string `json:"git_user"`
CommitMessage string `json:"commit_message"`
OpenStack OpenStackOptions `json:"openstack"`
JSONKey string `json:"json_key"`
}
// OpenStackOptions contains properties for authenticating and accessing
// the object storage system.
type OpenStackOptions struct {
Container string `json:"container"`
ItemName string `json:"item_name"`
Region string `json:"region"`
// Properties below are for authentication. Its a copy of
// the properties required by gophercloud. Review documentation
// in gophercloud for parameter usage as these are just passed in.
IdentityEndpoint string `json:"identity_endpoint"`
Username string `json:"username"`
UserID string `json:"user_id"`
Password string `json:"password"`
APIKey string `json:"api_key"`
DomainID string `json:"domain_id"`
DomainName string `json:"domain_name"`
TenantID string `json:"tenant_id"`
TenantName string `json:"tenant_name"`
AllowReauth bool `json:"allow_reauth"`
TokenID string `json:"token_id"`
}
type Metadata []MetadataField
type MetadataField struct {
Name string `json:"name"`
Value string `json:"value"`
}
type Driver string
const (
DriverUnspecified Driver = ""
DriverS3 Driver = "s3"
DriverGit Driver = "git"
DriverSwift Driver = "swift"
DriverGCS Driver = "gcs"
)