diff options
author | Amine Hilaly <hilalyamine@gmail.com> | 2019-08-17 00:28:45 +0200 |
---|---|---|
committer | Amine Hilaly <hilalyamine@gmail.com> | 2019-08-17 00:28:45 +0200 |
commit | f6280a22c76ee42545efc31a6e3a35ff65954f3b (patch) | |
tree | 0e10ace59017ee38f5d627410cdf38a478f6f6be /vendor/github.com/xanzy/go-gitlab/project_variables.go | |
parent | 8b00e48d02bc568d23958941271aa074f4207ee6 (diff) | |
download | git-bug-f6280a22c76ee42545efc31a6e3a35ff65954f3b.tar.gz |
vendor: upgrade github/xanzy/go-gitlab version to 0.20.0
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/project_variables.go')
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/project_variables.go | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/project_variables.go b/vendor/github.com/xanzy/go-gitlab/project_variables.go index 7469d660..2068f9eb 100644 --- a/vendor/github.com/xanzy/go-gitlab/project_variables.go +++ b/vendor/github.com/xanzy/go-gitlab/project_variables.go @@ -35,11 +35,12 @@ type ProjectVariablesService struct { // GitLab API docs: // https://docs.gitlab.com/ee/api/project_level_variables.html type ProjectVariable struct { - Key string `json:"key"` - Value string `json:"value"` - Protected bool `json:"protected"` - Masked bool `json:"masked"` - EnvironmentScope string `json:"environment_scope"` + Key string `json:"key"` + Value string `json:"value"` + VariableType VariableTypeValue `json:"variable_type"` + Protected bool `json:"protected"` + Masked bool `json:"masked"` + EnvironmentScope string `json:"environment_scope"` } func (v ProjectVariable) String() string { @@ -96,24 +97,25 @@ func (s *ProjectVariablesService) GetVariable(pid interface{}, key string, optio return v, resp, err } -// CreateVariableOptions represents the available -// CreateVariable() options. +// CreateProjectVariableOptions represents the available CreateVariable() +// options. // // GitLab API docs: // https://docs.gitlab.com/ee/api/project_level_variables.html#create-variable -type CreateVariableOptions struct { - Key *string `url:"key,omitempty" json:"key,omitempty"` - Value *string `url:"value,omitempty" json:"value,omitempty"` - Protected *bool `url:"protected,omitempty" json:"protected,omitempty"` - Masked *bool `url:"masked,omitempty" json:"masked,omitempty"` - EnvironmentScope *string `url:"environment_scope,omitempty" json:"environment_scope,omitempty"` +type CreateProjectVariableOptions struct { + Key *string `url:"key,omitempty" json:"key,omitempty"` + Value *string `url:"value,omitempty" json:"value,omitempty"` + VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"` + Protected *bool `url:"protected,omitempty" json:"protected,omitempty"` + Masked *bool `url:"masked,omitempty" json:"masked,omitempty"` + EnvironmentScope *string `url:"environment_scope,omitempty" json:"environment_scope,omitempty"` } // CreateVariable creates a new project variable. // // GitLab API docs: // https://docs.gitlab.com/ee/api/project_level_variables.html#create-variable -func (s *ProjectVariablesService) CreateVariable(pid interface{}, opt *CreateVariableOptions, options ...OptionFunc) (*ProjectVariable, *Response, error) { +func (s *ProjectVariablesService) CreateVariable(pid interface{}, opt *CreateProjectVariableOptions, options ...OptionFunc) (*ProjectVariable, *Response, error) { project, err := parseID(pid) if err != nil { return nil, nil, err @@ -134,23 +136,24 @@ func (s *ProjectVariablesService) CreateVariable(pid interface{}, opt *CreateVar return v, resp, err } -// UpdateVariableOptions represents the available -// UpdateVariable() options. +// UpdateProjectVariableOptions represents the available UpdateVariable() +// options. // // GitLab API docs: // https://docs.gitlab.com/ee/api/project_level_variables.html#update-variable -type UpdateVariableOptions struct { - Value *string `url:"value,omitempty" json:"value,omitempty"` - Protected *bool `url:"protected,omitempty" json:"protected,omitempty"` - Masked *bool `url:"masked,omitempty" json:"masked,omitempty"` - EnvironmentScope *string `url:"environment_scope,omitempty" json:"environment_scope,omitempty"` +type UpdateProjectVariableOptions struct { + Value *string `url:"value,omitempty" json:"value,omitempty"` + VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"` + Protected *bool `url:"protected,omitempty" json:"protected,omitempty"` + Masked *bool `url:"masked,omitempty" json:"masked,omitempty"` + EnvironmentScope *string `url:"environment_scope,omitempty" json:"environment_scope,omitempty"` } -// UpdateVariable updates a project's variable +// UpdateVariable updates a project's variable. // // GitLab API docs: // https://docs.gitlab.com/ee/api/project_level_variables.html#update-variable -func (s *ProjectVariablesService) UpdateVariable(pid interface{}, key string, opt *UpdateVariableOptions, options ...OptionFunc) (*ProjectVariable, *Response, error) { +func (s *ProjectVariablesService) UpdateVariable(pid interface{}, key string, opt *UpdateProjectVariableOptions, options ...OptionFunc) (*ProjectVariable, *Response, error) { project, err := parseID(pid) if err != nil { return nil, nil, err |