-
Notifications
You must be signed in to change notification settings - Fork 4
/
domain.go
67 lines (59 loc) · 2.31 KB
/
domain.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
package initialization
import (
"io/fs"
"os"
)
type (
// BUFConfig is the configuration for the buf tool.
BUFConfig struct {
Version string `yaml:"version"`
Deps []string `yaml:"deps"`
Build Build `yaml:"build"`
Lint Lint `yaml:"lint"`
Breaking Breaking `yaml:"breaking"`
}
// Build is the configuration for the build section of the buf tool.
Build struct {
Excludes []string `yaml:"excludes"`
}
// Lint is the configuration for the lint section of the buf tool.
Lint struct {
Use []string `yaml:"use"`
Except []string `yaml:"except"`
Ignore []string `yaml:"ignore"`
IgnoreOnly map[string][]string `yaml:"ignore_only"`
AllowCommentIgnores bool `yaml:"allow_comment_ignores"`
EnumZeroValueSuffix string `yaml:"enum_zero_value_suffix"`
RPCAllowSameRequestResponse bool `yaml:"rpc_allow_same_request_response"`
RPCAllowGoogleProtobufEmptyRequests bool `yaml:"rpc_allow_google_protobuf_empty_requests"`
RPCAllowGoogleProtobufEmptyResponses bool `yaml:"rpc_allow_google_protobuf_empty_responses"`
ServiceSuffix string `yaml:"service_suffix"`
}
// Breaking is the configuration for the breaking section of the buf tool.
Breaking struct {
Use []string `yaml:"use"`
Except []string `yaml:"except"`
Ignore []string `yaml:"ignore"`
IgnoreOnly map[string][]string `yaml:"ignore_only"`
IgnoreUnstablePackages bool `yaml:"ignore_unstable_packages"`
}
// Migrate contains original configuration for the migration.
Migrate struct {
BUF *BUFConfig
//Protoool *ProtooolConfig TODO
}
// EasyPConfig is the configuration for EasyP.
EasyPConfig struct {
Version string `yaml:"version"`
Deps []string `yaml:"deps"`
Build Build `yaml:"build"`
Lint Lint `yaml:"lint"`
Breaking Breaking `yaml:"breaking"`
}
// FS is the interface for the file system.
FS interface {
fs.FS
// Create creates a file.
Create(name string) (*os.File, error)
}
)