Прикинул метод Open и Delete, Update пока не до делал. Co-authored-by: Gorbunov Kirill Andreevich <kgorbunov@mtsbank.ru> Reviewed-on: #9 Co-authored-by: Кирилл Горбунов <kirya_gorbunov_2015@mail.ru> Co-committed-by: Кирилл Горбунов <kirya_gorbunov_2015@mail.ru>
This commit is contained in:
30
internal/configcli/config.go
Normal file
30
internal/configcli/config.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package configcli
|
||||
|
||||
type Config struct {
|
||||
PullRequestTitle string `json:"pull_request_title" yaml:"pull_request_title"`
|
||||
PullRequestBody string `json:"pull_request_body" yaml:"pull_request_body"`
|
||||
Branches []string `json:"branches" yaml:"branches"`
|
||||
Source *Source `json:"source" yaml:"source"`
|
||||
UpdateOpt *UpdateOpt `json:"update_opt" yaml:"update_opt"`
|
||||
}
|
||||
|
||||
type Source struct {
|
||||
TypeGit string `json:"type" yaml:"type"`
|
||||
Token string `json:"token" yaml:"token"`
|
||||
APIURL string `json:"apiurl" yaml:"apiurl"`
|
||||
Repository string `json:"repository" yaml:"repository"`
|
||||
Owner string `json:"owner" yaml:"owner"`
|
||||
}
|
||||
|
||||
type UpdateOpt struct {
|
||||
Pre bool `json:"pre" yaml:"pre" default:"false"`
|
||||
Major bool `json:"major" yaml:"major" default:"false"`
|
||||
UpMajor bool `json:"up_major" yaml:"up_major" default:"false"`
|
||||
Cached bool `json:"cached" yaml:"cached" default:"true"`
|
||||
}
|
||||
|
||||
func NewConfig() *Config {
|
||||
return &Config{
|
||||
Source: &Source{},
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user