1
0
mirror of https://github.com/rancher/types.git synced 2025-08-02 05:11:59 +00:00

generated code

This commit is contained in:
Craig Jellick 2018-01-20 01:04:44 -07:00
parent 80216254e2
commit 40f3e68d4b
4 changed files with 38 additions and 6 deletions

View File

@ -375,6 +375,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*SchedulerService).DeepCopyInto(out.(*SchedulerService))
return nil
}, InType: reflect.TypeOf(&SchedulerService{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SetPasswordInput).DeepCopyInto(out.(*SetPasswordInput))
return nil
}, InType: reflect.TypeOf(&SetPasswordInput{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Stack).DeepCopyInto(out.(*Stack))
return nil
@ -2837,6 +2841,22 @@ func (in *SchedulerService) DeepCopy() *SchedulerService {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SetPasswordInput) DeepCopyInto(out *SetPasswordInput) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SetPasswordInput.
func (in *SetPasswordInput) DeepCopy() *SetPasswordInput {
if in == nil {
return nil
}
out := new(SetPasswordInput)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Stack) DeepCopyInto(out *Stack) {
*out = *in

View File

@ -1,10 +1,12 @@
package client
const (
ChangePasswordInputType = "changePasswordInput"
ChangePasswordInputFieldNewPassword = "newPassword"
ChangePasswordInputType = "changePasswordInput"
ChangePasswordInputFieldCurrentPassword = "currentPassword"
ChangePasswordInputFieldNewPassword = "newPassword"
)
type ChangePasswordInput struct {
NewPassword string `json:"newPassword,omitempty"`
CurrentPassword string `json:"currentPassword,omitempty"`
NewPassword string `json:"newPassword,omitempty"`
}

View File

@ -0,0 +1,10 @@
package client
const (
SetPasswordInputType = "setPasswordInput"
SetPasswordInputFieldNewPassword = "newPassword"
)
type SetPasswordInput struct {
NewPassword string `json:"newPassword,omitempty"`
}

View File

@ -56,7 +56,7 @@ type UserOperations interface {
ByID(id string) (*User, error)
Delete(container *User) error
ActionChangepassword(*User, *ChangePasswordInput) (*User, error)
ActionSetpassword(*User, *SetPasswordInput) (*User, error)
}
func newUserClient(apiClient *Client) *UserClient {
@ -104,11 +104,11 @@ func (c *UserClient) Delete(container *User) error {
return c.apiClient.Ops.DoResourceDelete(UserType, &container.Resource)
}
func (c *UserClient) ActionChangepassword(resource *User, input *ChangePasswordInput) (*User, error) {
func (c *UserClient) ActionSetpassword(resource *User, input *SetPasswordInput) (*User, error) {
resp := &User{}
err := c.apiClient.Ops.DoAction(UserType, "changepassword", &resource.Resource, input, resp)
err := c.apiClient.Ops.DoAction(UserType, "setpassword", &resource.Resource, input, resp)
return resp, err
}