-
Notifications
You must be signed in to change notification settings - Fork 12
/
file.go
59 lines (52 loc) · 1.77 KB
/
file.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
// SPDX-License-Identifier: Apache-2.0
package config
// ConfigFile represents the configuration file
// to perform config related requests with Vela.
//
//nolint:revive // ignore studder for package and struct name
type ConfigFile struct {
API *API `yaml:"api,omitempty"`
Log *Log `yaml:"log,omitempty"`
NoGit string `yaml:"no-git,omitempty"`
Secret *Secret `yaml:"secret,omitempty"`
Compiler *Compiler `yaml:"compiler,omitempty"`
Output string `yaml:"output,omitempty"`
Org string `yaml:"org,omitempty"`
Repo string `yaml:"repo,omitempty"`
}
// API represents the API related configuration fields
// populated in the config file to perform requests
// with Vela.
type API struct {
Address string `yaml:"addr,omitempty"`
Token string `yaml:"token,omitempty"`
AccessToken string `yaml:"access_token,omitempty"`
RefreshToken string `yaml:"refresh_token,omitempty"`
Version string `yaml:"version,omitempty"`
}
// Log represents the log related configuration fields
// populated in the config file to perform requests
// with Vela.
type Log struct {
Level string `yaml:"level,omitempty"`
}
// Secret represents the secret configuration fields
// populated in the config file to perform requests
// with Vela.
type Secret struct {
Engine string `yaml:"engine,omitempty"`
Type string `yaml:"type,omitempty"`
}
// Compiler represents the compiler configuration fields
// populated in the config file to perform requests
// with Vela.
type Compiler struct {
GitHub *GitHub `yaml:"github,omitempty"`
}
// GitHub represents the compiler configuration fields
// populated in the config file to perform requests
// with Vela.
type GitHub struct {
Token string `yaml:"token,omitempty"`
URL string `yaml:"url,omitempty"`
}