diff --git a/go.mod b/go.mod index a0b5f076..91d240cf 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,6 @@ require ( github.com/fatih/color v1.18.0 github.com/fatih/structs v1.1.0 github.com/goccy/go-yaml v1.13.6 - github.com/golang/mock v1.6.0 github.com/guptarohit/asciigraph v0.7.3 github.com/hetznercloud/hcloud-go/v2 v2.16.0 github.com/jedib0t/go-pretty/v6 v6.6.1 @@ -21,6 +20,7 @@ require ( github.com/spf13/viper v1.19.0 github.com/stretchr/testify v1.9.0 github.com/swaggest/assertjson v1.9.0 + go.uber.org/mock v0.5.0 golang.org/x/crypto v0.29.0 golang.org/x/term v0.26.0 ) @@ -62,11 +62,12 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.9.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/mod v0.17.0 // indirect + golang.org/x/mod v0.18.0 // indirect golang.org/x/net v0.30.0 // indirect + golang.org/x/sync v0.9.0 // indirect golang.org/x/sys v0.27.0 // indirect golang.org/x/text v0.20.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + golang.org/x/tools v0.22.0 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index b0123680..aa4c1f7d 100644 --- a/go.sum +++ b/go.sum @@ -38,8 +38,6 @@ github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27 github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/goccy/go-yaml v1.13.6 h1:pa3JkBPBseTtfqpG9DiSFhyxNPSpJ0BFa39BlMZE16E= github.com/goccy/go-yaml v1.13.6/go.mod h1:IjYwxUiJDoqpx2RmbdjMUceGHZwYLon3sfOGl5Hi9lc= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/guptarohit/asciigraph v0.7.3 h1:p05XDDn7cBTWiBqWb30mrwxd6oU0claAjqeytllnsPY= @@ -144,54 +142,33 @@ github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3Ifn github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= +go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/internal/cmd/all/list_test.go b/internal/cmd/all/list_test.go index 3357a827..224c6867 100644 --- a/internal/cmd/all/list_test.go +++ b/internal/cmd/all/list_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/all" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/certificate/create_test.go b/internal/cmd/certificate/create_test.go index 2e291feb..b350cd87 100644 --- a/internal/cmd/certificate/create_test.go +++ b/internal/cmd/certificate/create_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/certificate" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/certificate/delete_test.go b/internal/cmd/certificate/delete_test.go index 4a651d9a..04222c60 100644 --- a/internal/cmd/certificate/delete_test.go +++ b/internal/cmd/certificate/delete_test.go @@ -3,9 +3,9 @@ package certificate_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/certificate" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/certificate/describe_test.go b/internal/cmd/certificate/describe_test.go index 29265201..8ef91658 100644 --- a/internal/cmd/certificate/describe_test.go +++ b/internal/cmd/certificate/describe_test.go @@ -6,9 +6,9 @@ import ( "time" "github.com/dustin/go-humanize" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/certificate" "github.com/hetznercloud/cli/internal/cmd/util" diff --git a/internal/cmd/certificate/labels_test.go b/internal/cmd/certificate/labels_test.go index a66db357..08c63c08 100644 --- a/internal/cmd/certificate/labels_test.go +++ b/internal/cmd/certificate/labels_test.go @@ -3,9 +3,9 @@ package certificate_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/certificate" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/certificate/list_test.go b/internal/cmd/certificate/list_test.go index 4d7c0806..f12d3a36 100644 --- a/internal/cmd/certificate/list_test.go +++ b/internal/cmd/certificate/list_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/certificate" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/certificate/retry_test.go b/internal/cmd/certificate/retry_test.go index 00691e60..1c5b0ce8 100644 --- a/internal/cmd/certificate/retry_test.go +++ b/internal/cmd/certificate/retry_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/certificate" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/certificate/update_test.go b/internal/cmd/certificate/update_test.go index 12749b7e..90f54d99 100644 --- a/internal/cmd/certificate/update_test.go +++ b/internal/cmd/certificate/update_test.go @@ -3,9 +3,9 @@ package certificate_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/certificate" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/datacenter/describe_test.go b/internal/cmd/datacenter/describe_test.go index 4e5e5a1b..7cd95fc3 100644 --- a/internal/cmd/datacenter/describe_test.go +++ b/internal/cmd/datacenter/describe_test.go @@ -3,9 +3,9 @@ package datacenter_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/datacenter" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/datacenter/list_test.go b/internal/cmd/datacenter/list_test.go index 43f2cbd8..5afa1c18 100644 --- a/internal/cmd/datacenter/list_test.go +++ b/internal/cmd/datacenter/list_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/datacenter" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/firewall/add_rule_test.go b/internal/cmd/firewall/add_rule_test.go index c59097fe..0466a3a1 100644 --- a/internal/cmd/firewall/add_rule_test.go +++ b/internal/cmd/firewall/add_rule_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/firewall" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/firewall/apply_to_resource_test.go b/internal/cmd/firewall/apply_to_resource_test.go index 2aed60d0..796cda02 100644 --- a/internal/cmd/firewall/apply_to_resource_test.go +++ b/internal/cmd/firewall/apply_to_resource_test.go @@ -3,9 +3,9 @@ package firewall_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/firewall" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/firewall/create_test.go b/internal/cmd/firewall/create_test.go index f333925e..69848ba7 100644 --- a/internal/cmd/firewall/create_test.go +++ b/internal/cmd/firewall/create_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/firewall" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/firewall/delete_rule_test.go b/internal/cmd/firewall/delete_rule_test.go index 9833b3fb..b97bbb00 100644 --- a/internal/cmd/firewall/delete_rule_test.go +++ b/internal/cmd/firewall/delete_rule_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/firewall" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/firewall/delete_test.go b/internal/cmd/firewall/delete_test.go index b1d243f4..68ccf67b 100644 --- a/internal/cmd/firewall/delete_test.go +++ b/internal/cmd/firewall/delete_test.go @@ -3,9 +3,9 @@ package firewall_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/firewall" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/firewall/describe_test.go b/internal/cmd/firewall/describe_test.go index 89368492..a00ee4ad 100644 --- a/internal/cmd/firewall/describe_test.go +++ b/internal/cmd/firewall/describe_test.go @@ -6,9 +6,9 @@ import ( "time" "github.com/dustin/go-humanize" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/firewall" "github.com/hetznercloud/cli/internal/cmd/util" diff --git a/internal/cmd/firewall/labels_test.go b/internal/cmd/firewall/labels_test.go index cc7d1607..e07e1b0b 100644 --- a/internal/cmd/firewall/labels_test.go +++ b/internal/cmd/firewall/labels_test.go @@ -3,9 +3,9 @@ package firewall_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/firewall" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/firewall/list_test.go b/internal/cmd/firewall/list_test.go index b3fa2570..516b0d20 100644 --- a/internal/cmd/firewall/list_test.go +++ b/internal/cmd/firewall/list_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/firewall" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/firewall/remove_from_resource_test.go b/internal/cmd/firewall/remove_from_resource_test.go index e7ffca6d..af99d519 100644 --- a/internal/cmd/firewall/remove_from_resource_test.go +++ b/internal/cmd/firewall/remove_from_resource_test.go @@ -3,9 +3,9 @@ package firewall_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/firewall" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/firewall/replace_rules_test.go b/internal/cmd/firewall/replace_rules_test.go index fead672c..1db8664f 100644 --- a/internal/cmd/firewall/replace_rules_test.go +++ b/internal/cmd/firewall/replace_rules_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/firewall" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/firewall/update_test.go b/internal/cmd/firewall/update_test.go index c4efcb3f..e1d3e35e 100644 --- a/internal/cmd/firewall/update_test.go +++ b/internal/cmd/firewall/update_test.go @@ -3,9 +3,9 @@ package firewall_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/firewall" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/floatingip/assign_test.go b/internal/cmd/floatingip/assign_test.go index 163771d0..44670cac 100644 --- a/internal/cmd/floatingip/assign_test.go +++ b/internal/cmd/floatingip/assign_test.go @@ -3,9 +3,9 @@ package floatingip_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/floatingip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/floatingip/create_test.go b/internal/cmd/floatingip/create_test.go index 127aa948..bf749aaa 100644 --- a/internal/cmd/floatingip/create_test.go +++ b/internal/cmd/floatingip/create_test.go @@ -5,9 +5,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/floatingip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/floatingip/delete_test.go b/internal/cmd/floatingip/delete_test.go index c56552e6..455ddc25 100644 --- a/internal/cmd/floatingip/delete_test.go +++ b/internal/cmd/floatingip/delete_test.go @@ -3,9 +3,9 @@ package floatingip_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/floatingip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/floatingip/describe_test.go b/internal/cmd/floatingip/describe_test.go index ca88650a..88821d36 100644 --- a/internal/cmd/floatingip/describe_test.go +++ b/internal/cmd/floatingip/describe_test.go @@ -7,9 +7,9 @@ import ( "time" "github.com/dustin/go-humanize" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/floatingip" "github.com/hetznercloud/cli/internal/cmd/util" diff --git a/internal/cmd/floatingip/disable_protection_test.go b/internal/cmd/floatingip/disable_protection_test.go index 0e449334..63f155d0 100644 --- a/internal/cmd/floatingip/disable_protection_test.go +++ b/internal/cmd/floatingip/disable_protection_test.go @@ -3,9 +3,9 @@ package floatingip_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/floatingip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/floatingip/enable_protection_test.go b/internal/cmd/floatingip/enable_protection_test.go index e1dffed3..f53efda1 100644 --- a/internal/cmd/floatingip/enable_protection_test.go +++ b/internal/cmd/floatingip/enable_protection_test.go @@ -3,9 +3,9 @@ package floatingip_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/floatingip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/floatingip/labels_test.go b/internal/cmd/floatingip/labels_test.go index a224a795..abda87d9 100644 --- a/internal/cmd/floatingip/labels_test.go +++ b/internal/cmd/floatingip/labels_test.go @@ -3,9 +3,9 @@ package floatingip_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/floatingip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/floatingip/list_test.go b/internal/cmd/floatingip/list_test.go index f2a5697a..f2f559d5 100644 --- a/internal/cmd/floatingip/list_test.go +++ b/internal/cmd/floatingip/list_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/floatingip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/floatingip/set_rdns_test.go b/internal/cmd/floatingip/set_rdns_test.go index c7d7080d..8449eb66 100644 --- a/internal/cmd/floatingip/set_rdns_test.go +++ b/internal/cmd/floatingip/set_rdns_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/floatingip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/floatingip/unassign_test.go b/internal/cmd/floatingip/unassign_test.go index ce755ed6..7a2ae4ae 100644 --- a/internal/cmd/floatingip/unassign_test.go +++ b/internal/cmd/floatingip/unassign_test.go @@ -3,9 +3,9 @@ package floatingip_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/floatingip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/floatingip/update_test.go b/internal/cmd/floatingip/update_test.go index 1590ab36..38620bba 100644 --- a/internal/cmd/floatingip/update_test.go +++ b/internal/cmd/floatingip/update_test.go @@ -3,9 +3,9 @@ package floatingip_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/floatingip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/image/delete_test.go b/internal/cmd/image/delete_test.go index c6a0d1ae..1a4ef189 100644 --- a/internal/cmd/image/delete_test.go +++ b/internal/cmd/image/delete_test.go @@ -4,9 +4,9 @@ import ( "strconv" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/image" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/image/describe_test.go b/internal/cmd/image/describe_test.go index c56271d9..7c053b7a 100644 --- a/internal/cmd/image/describe_test.go +++ b/internal/cmd/image/describe_test.go @@ -6,9 +6,9 @@ import ( "time" "github.com/dustin/go-humanize" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/image" "github.com/hetznercloud/cli/internal/cmd/util" diff --git a/internal/cmd/image/disable_protection_test.go b/internal/cmd/image/disable_protection_test.go index a5b106b2..71b29705 100644 --- a/internal/cmd/image/disable_protection_test.go +++ b/internal/cmd/image/disable_protection_test.go @@ -3,9 +3,9 @@ package image_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/image" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/image/enable_protection_test.go b/internal/cmd/image/enable_protection_test.go index 75cb811b..1f8e4a73 100644 --- a/internal/cmd/image/enable_protection_test.go +++ b/internal/cmd/image/enable_protection_test.go @@ -3,9 +3,9 @@ package image_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/image" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/image/labels_test.go b/internal/cmd/image/labels_test.go index f9ea050b..33f5a065 100644 --- a/internal/cmd/image/labels_test.go +++ b/internal/cmd/image/labels_test.go @@ -3,9 +3,9 @@ package image_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/image" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/image/list_test.go b/internal/cmd/image/list_test.go index 9e0a1e5c..8a7ccba1 100644 --- a/internal/cmd/image/list_test.go +++ b/internal/cmd/image/list_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/image" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/image/update_test.go b/internal/cmd/image/update_test.go index ca11117a..18f4f0c9 100644 --- a/internal/cmd/image/update_test.go +++ b/internal/cmd/image/update_test.go @@ -3,9 +3,9 @@ package image_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/image" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/iso/describe_test.go b/internal/cmd/iso/describe_test.go index a7516627..8079558b 100644 --- a/internal/cmd/iso/describe_test.go +++ b/internal/cmd/iso/describe_test.go @@ -3,9 +3,9 @@ package iso_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/iso" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/iso/list_test.go b/internal/cmd/iso/list_test.go index 23c42ddf..86bbbc27 100644 --- a/internal/cmd/iso/list_test.go +++ b/internal/cmd/iso/list_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/iso" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/add_service_test.go b/internal/cmd/loadbalancer/add_service_test.go index 56c76e42..4fd26535 100644 --- a/internal/cmd/loadbalancer/add_service_test.go +++ b/internal/cmd/loadbalancer/add_service_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/add_target_test.go b/internal/cmd/loadbalancer/add_target_test.go index 0478bf34..e0c8c5d3 100644 --- a/internal/cmd/loadbalancer/add_target_test.go +++ b/internal/cmd/loadbalancer/add_target_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/attach_to_network_test.go b/internal/cmd/loadbalancer/attach_to_network_test.go index 5d7b7685..a9285f4c 100644 --- a/internal/cmd/loadbalancer/attach_to_network_test.go +++ b/internal/cmd/loadbalancer/attach_to_network_test.go @@ -3,9 +3,9 @@ package loadbalancer_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/change_algorithm_test.go b/internal/cmd/loadbalancer/change_algorithm_test.go index 51071d11..2adca7f8 100644 --- a/internal/cmd/loadbalancer/change_algorithm_test.go +++ b/internal/cmd/loadbalancer/change_algorithm_test.go @@ -3,9 +3,9 @@ package loadbalancer_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/change_type_test.go b/internal/cmd/loadbalancer/change_type_test.go index 4655c23d..912385b3 100644 --- a/internal/cmd/loadbalancer/change_type_test.go +++ b/internal/cmd/loadbalancer/change_type_test.go @@ -3,9 +3,9 @@ package loadbalancer_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/create_test.go b/internal/cmd/loadbalancer/create_test.go index efd1a320..e6a7fe65 100644 --- a/internal/cmd/loadbalancer/create_test.go +++ b/internal/cmd/loadbalancer/create_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/delete_service_test.go b/internal/cmd/loadbalancer/delete_service_test.go index 4ebfd0b2..a2253942 100644 --- a/internal/cmd/loadbalancer/delete_service_test.go +++ b/internal/cmd/loadbalancer/delete_service_test.go @@ -3,9 +3,9 @@ package loadbalancer_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/delete_test.go b/internal/cmd/loadbalancer/delete_test.go index e59dbf60..50539b6c 100644 --- a/internal/cmd/loadbalancer/delete_test.go +++ b/internal/cmd/loadbalancer/delete_test.go @@ -3,9 +3,9 @@ package loadbalancer_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/describe_test.go b/internal/cmd/loadbalancer/describe_test.go index 387457f6..79b97e64 100644 --- a/internal/cmd/loadbalancer/describe_test.go +++ b/internal/cmd/loadbalancer/describe_test.go @@ -7,9 +7,9 @@ import ( "time" "github.com/dustin/go-humanize" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/cmd/util" diff --git a/internal/cmd/loadbalancer/detach_from_network_test.go b/internal/cmd/loadbalancer/detach_from_network_test.go index 05e07c55..67e25d55 100644 --- a/internal/cmd/loadbalancer/detach_from_network_test.go +++ b/internal/cmd/loadbalancer/detach_from_network_test.go @@ -3,9 +3,9 @@ package loadbalancer_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/disable_protection_test.go b/internal/cmd/loadbalancer/disable_protection_test.go index 5d7cb26a..f4f79dab 100644 --- a/internal/cmd/loadbalancer/disable_protection_test.go +++ b/internal/cmd/loadbalancer/disable_protection_test.go @@ -3,9 +3,9 @@ package loadbalancer_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/disable_public_interface_test.go b/internal/cmd/loadbalancer/disable_public_interface_test.go index f38923b5..ef96cef2 100644 --- a/internal/cmd/loadbalancer/disable_public_interface_test.go +++ b/internal/cmd/loadbalancer/disable_public_interface_test.go @@ -3,9 +3,9 @@ package loadbalancer_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/enable_protection_test.go b/internal/cmd/loadbalancer/enable_protection_test.go index eff775fe..a87fd4c6 100644 --- a/internal/cmd/loadbalancer/enable_protection_test.go +++ b/internal/cmd/loadbalancer/enable_protection_test.go @@ -3,9 +3,9 @@ package loadbalancer_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/enable_public_interface_test.go b/internal/cmd/loadbalancer/enable_public_interface_test.go index 2aa1ea4a..9b88d991 100644 --- a/internal/cmd/loadbalancer/enable_public_interface_test.go +++ b/internal/cmd/loadbalancer/enable_public_interface_test.go @@ -3,9 +3,9 @@ package loadbalancer_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/labels_test.go b/internal/cmd/loadbalancer/labels_test.go index 419b93c1..c1cd356c 100644 --- a/internal/cmd/loadbalancer/labels_test.go +++ b/internal/cmd/loadbalancer/labels_test.go @@ -3,9 +3,9 @@ package loadbalancer_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/metrics_test.go b/internal/cmd/loadbalancer/metrics_test.go index 17ecdd1a..fb02ce1d 100644 --- a/internal/cmd/loadbalancer/metrics_test.go +++ b/internal/cmd/loadbalancer/metrics_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/remove_target_test.go b/internal/cmd/loadbalancer/remove_target_test.go index 7e656296..86c6a583 100644 --- a/internal/cmd/loadbalancer/remove_target_test.go +++ b/internal/cmd/loadbalancer/remove_target_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/set_rdns_test.go b/internal/cmd/loadbalancer/set_rdns_test.go index d98c6163..0911b2fc 100644 --- a/internal/cmd/loadbalancer/set_rdns_test.go +++ b/internal/cmd/loadbalancer/set_rdns_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/update_service_test.go b/internal/cmd/loadbalancer/update_service_test.go index 6cc1b2b8..6fae1571 100644 --- a/internal/cmd/loadbalancer/update_service_test.go +++ b/internal/cmd/loadbalancer/update_service_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancer/update_test.go b/internal/cmd/loadbalancer/update_test.go index 86901414..fc12539a 100644 --- a/internal/cmd/loadbalancer/update_test.go +++ b/internal/cmd/loadbalancer/update_test.go @@ -3,9 +3,9 @@ package loadbalancer_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancer" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancertype/describe_test.go b/internal/cmd/loadbalancertype/describe_test.go index d7fc6ce2..0dea1f30 100644 --- a/internal/cmd/loadbalancertype/describe_test.go +++ b/internal/cmd/loadbalancertype/describe_test.go @@ -3,9 +3,9 @@ package loadbalancertype_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancertype" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/loadbalancertype/list_test.go b/internal/cmd/loadbalancertype/list_test.go index 1e28a6f3..48477e0e 100644 --- a/internal/cmd/loadbalancertype/list_test.go +++ b/internal/cmd/loadbalancertype/list_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/loadbalancertype" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/location/describe_test.go b/internal/cmd/location/describe_test.go index 0c75d46f..fd3ae96b 100644 --- a/internal/cmd/location/describe_test.go +++ b/internal/cmd/location/describe_test.go @@ -3,9 +3,9 @@ package location_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/location" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/location/list_test.go b/internal/cmd/location/list_test.go index 9fc67b26..04e66cf4 100644 --- a/internal/cmd/location/list_test.go +++ b/internal/cmd/location/list_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/location" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/network/add_route_test.go b/internal/cmd/network/add_route_test.go index 469c3fa6..de6b4ed9 100644 --- a/internal/cmd/network/add_route_test.go +++ b/internal/cmd/network/add_route_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/network" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/network/add_subnet_test.go b/internal/cmd/network/add_subnet_test.go index b99a9a5a..5982cc23 100644 --- a/internal/cmd/network/add_subnet_test.go +++ b/internal/cmd/network/add_subnet_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/network" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/network/change_ip_range_test.go b/internal/cmd/network/change_ip_range_test.go index 6a0c8b92..16ca89d8 100644 --- a/internal/cmd/network/change_ip_range_test.go +++ b/internal/cmd/network/change_ip_range_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/network" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/network/create_test.go b/internal/cmd/network/create_test.go index 3b139f8f..2603be45 100644 --- a/internal/cmd/network/create_test.go +++ b/internal/cmd/network/create_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/network" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/network/delete_test.go b/internal/cmd/network/delete_test.go index f6a80be8..4db2fc44 100644 --- a/internal/cmd/network/delete_test.go +++ b/internal/cmd/network/delete_test.go @@ -3,9 +3,9 @@ package network_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/network" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/network/describe_test.go b/internal/cmd/network/describe_test.go index 9c63f8d3..11cc033a 100644 --- a/internal/cmd/network/describe_test.go +++ b/internal/cmd/network/describe_test.go @@ -7,9 +7,9 @@ import ( "time" "github.com/dustin/go-humanize" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/network" "github.com/hetznercloud/cli/internal/cmd/util" diff --git a/internal/cmd/network/disable_protection_test.go b/internal/cmd/network/disable_protection_test.go index 7702cf35..65717952 100644 --- a/internal/cmd/network/disable_protection_test.go +++ b/internal/cmd/network/disable_protection_test.go @@ -3,9 +3,9 @@ package network_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/network" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/network/enable_protection_test.go b/internal/cmd/network/enable_protection_test.go index 8ea5487f..de4ec558 100644 --- a/internal/cmd/network/enable_protection_test.go +++ b/internal/cmd/network/enable_protection_test.go @@ -3,9 +3,9 @@ package network_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/network" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/network/expose_routes_to_vswitch_test.go b/internal/cmd/network/expose_routes_to_vswitch_test.go index e6e3df6c..e5cc9605 100644 --- a/internal/cmd/network/expose_routes_to_vswitch_test.go +++ b/internal/cmd/network/expose_routes_to_vswitch_test.go @@ -3,9 +3,9 @@ package network_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/network" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/network/labels_test.go b/internal/cmd/network/labels_test.go index 65eb2a2f..85894ff5 100644 --- a/internal/cmd/network/labels_test.go +++ b/internal/cmd/network/labels_test.go @@ -3,9 +3,9 @@ package network_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/network" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/network/list_test.go b/internal/cmd/network/list_test.go index 5ff50d82..5f12afe0 100644 --- a/internal/cmd/network/list_test.go +++ b/internal/cmd/network/list_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/network" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/network/remove_route_test.go b/internal/cmd/network/remove_route_test.go index 8d4bd564..f0cef285 100644 --- a/internal/cmd/network/remove_route_test.go +++ b/internal/cmd/network/remove_route_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/network" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/network/remove_subnet_test.go b/internal/cmd/network/remove_subnet_test.go index a5e13875..79deb830 100644 --- a/internal/cmd/network/remove_subnet_test.go +++ b/internal/cmd/network/remove_subnet_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/network" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/network/update_test.go b/internal/cmd/network/update_test.go index 91aac231..7fa5b4d0 100644 --- a/internal/cmd/network/update_test.go +++ b/internal/cmd/network/update_test.go @@ -3,9 +3,9 @@ package network_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/network" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/placementgroup/create_test.go b/internal/cmd/placementgroup/create_test.go index c4dbd080..efcf726c 100644 --- a/internal/cmd/placementgroup/create_test.go +++ b/internal/cmd/placementgroup/create_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/placementgroup" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/placementgroup/delete_test.go b/internal/cmd/placementgroup/delete_test.go index 7f584b9d..2433003b 100644 --- a/internal/cmd/placementgroup/delete_test.go +++ b/internal/cmd/placementgroup/delete_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/placementgroup" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/placementgroup/describe_test.go b/internal/cmd/placementgroup/describe_test.go index 171f87c0..463b13f0 100644 --- a/internal/cmd/placementgroup/describe_test.go +++ b/internal/cmd/placementgroup/describe_test.go @@ -6,9 +6,9 @@ import ( "time" "github.com/dustin/go-humanize" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/placementgroup" "github.com/hetznercloud/cli/internal/cmd/util" diff --git a/internal/cmd/placementgroup/labels_test.go b/internal/cmd/placementgroup/labels_test.go index ec487c15..b2dcf6a5 100644 --- a/internal/cmd/placementgroup/labels_test.go +++ b/internal/cmd/placementgroup/labels_test.go @@ -3,9 +3,9 @@ package placementgroup_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/placementgroup" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/placementgroup/list_test.go b/internal/cmd/placementgroup/list_test.go index d5fc09b8..6487c88d 100644 --- a/internal/cmd/placementgroup/list_test.go +++ b/internal/cmd/placementgroup/list_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/placementgroup" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/placementgroup/update_test.go b/internal/cmd/placementgroup/update_test.go index 47e1ae24..1ed4ca01 100644 --- a/internal/cmd/placementgroup/update_test.go +++ b/internal/cmd/placementgroup/update_test.go @@ -3,9 +3,9 @@ package placementgroup_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/placementgroup" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/primaryip/assign_test.go b/internal/cmd/primaryip/assign_test.go index aeda55f1..788c1b07 100644 --- a/internal/cmd/primaryip/assign_test.go +++ b/internal/cmd/primaryip/assign_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/primaryip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/primaryip/create_test.go b/internal/cmd/primaryip/create_test.go index 67df89f9..64c0b9ab 100644 --- a/internal/cmd/primaryip/create_test.go +++ b/internal/cmd/primaryip/create_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/primaryip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/primaryip/delete_test.go b/internal/cmd/primaryip/delete_test.go index b4cd1a93..9a1079db 100644 --- a/internal/cmd/primaryip/delete_test.go +++ b/internal/cmd/primaryip/delete_test.go @@ -3,9 +3,9 @@ package primaryip_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/primaryip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/primaryip/describe_test.go b/internal/cmd/primaryip/describe_test.go index c6b0381f..f5c3251d 100644 --- a/internal/cmd/primaryip/describe_test.go +++ b/internal/cmd/primaryip/describe_test.go @@ -7,9 +7,9 @@ import ( "time" "github.com/dustin/go-humanize" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/primaryip" "github.com/hetznercloud/cli/internal/cmd/util" diff --git a/internal/cmd/primaryip/disable_protection_test.go b/internal/cmd/primaryip/disable_protection_test.go index 4fc44742..57f2aca6 100644 --- a/internal/cmd/primaryip/disable_protection_test.go +++ b/internal/cmd/primaryip/disable_protection_test.go @@ -3,9 +3,9 @@ package primaryip_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/primaryip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/primaryip/enable_protection_test.go b/internal/cmd/primaryip/enable_protection_test.go index 588a1803..53396931 100644 --- a/internal/cmd/primaryip/enable_protection_test.go +++ b/internal/cmd/primaryip/enable_protection_test.go @@ -3,9 +3,9 @@ package primaryip_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/primaryip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/primaryip/labels_test.go b/internal/cmd/primaryip/labels_test.go index 48910f09..b0c662fb 100644 --- a/internal/cmd/primaryip/labels_test.go +++ b/internal/cmd/primaryip/labels_test.go @@ -3,9 +3,9 @@ package primaryip_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/primaryip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/primaryip/list_test.go b/internal/cmd/primaryip/list_test.go index fece94d9..47441434 100644 --- a/internal/cmd/primaryip/list_test.go +++ b/internal/cmd/primaryip/list_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/primaryip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/primaryip/set_rdns_test.go b/internal/cmd/primaryip/set_rdns_test.go index fd1ee6c6..3629cd57 100644 --- a/internal/cmd/primaryip/set_rdns_test.go +++ b/internal/cmd/primaryip/set_rdns_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/primaryip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/primaryip/unassign_test.go b/internal/cmd/primaryip/unassign_test.go index 52712d16..1cec10fd 100644 --- a/internal/cmd/primaryip/unassign_test.go +++ b/internal/cmd/primaryip/unassign_test.go @@ -3,9 +3,9 @@ package primaryip_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/primaryip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/primaryip/update_test.go b/internal/cmd/primaryip/update_test.go index 02c03d4b..13c0b4bb 100644 --- a/internal/cmd/primaryip/update_test.go +++ b/internal/cmd/primaryip/update_test.go @@ -3,9 +3,9 @@ package primaryip_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/primaryip" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/add_to_placement_group_test.go b/internal/cmd/server/add_to_placement_group_test.go index c63766e5..3102464a 100644 --- a/internal/cmd/server/add_to_placement_group_test.go +++ b/internal/cmd/server/add_to_placement_group_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/attach_iso_test.go b/internal/cmd/server/attach_iso_test.go index 69859ad4..bab55b50 100644 --- a/internal/cmd/server/attach_iso_test.go +++ b/internal/cmd/server/attach_iso_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/attach_to_network_test.go b/internal/cmd/server/attach_to_network_test.go index c27e82e7..e088015b 100644 --- a/internal/cmd/server/attach_to_network_test.go +++ b/internal/cmd/server/attach_to_network_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/change_alias_ips_test.go b/internal/cmd/server/change_alias_ips_test.go index 465e0e16..0e8bbf9a 100644 --- a/internal/cmd/server/change_alias_ips_test.go +++ b/internal/cmd/server/change_alias_ips_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/change_type_test.go b/internal/cmd/server/change_type_test.go index 2b52dbb6..62788f11 100644 --- a/internal/cmd/server/change_type_test.go +++ b/internal/cmd/server/change_type_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/create_image_test.go b/internal/cmd/server/create_image_test.go index 70d4d483..ea59ac1a 100644 --- a/internal/cmd/server/create_image_test.go +++ b/internal/cmd/server/create_image_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/create_test.go b/internal/cmd/server/create_test.go index c50c687e..2c526c0c 100644 --- a/internal/cmd/server/create_test.go +++ b/internal/cmd/server/create_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/delete_test.go b/internal/cmd/server/delete_test.go index 279fcedc..5ff84bb1 100644 --- a/internal/cmd/server/delete_test.go +++ b/internal/cmd/server/delete_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/describe_test.go b/internal/cmd/server/describe_test.go index 4114a3d8..dd142fe1 100644 --- a/internal/cmd/server/describe_test.go +++ b/internal/cmd/server/describe_test.go @@ -6,9 +6,9 @@ import ( "time" "github.com/dustin/go-humanize" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/cmd/util" diff --git a/internal/cmd/server/detach_from_network_test.go b/internal/cmd/server/detach_from_network_test.go index 94e66732..c9ca906b 100644 --- a/internal/cmd/server/detach_from_network_test.go +++ b/internal/cmd/server/detach_from_network_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/detach_iso_test.go b/internal/cmd/server/detach_iso_test.go index a493a50e..bb7235ef 100644 --- a/internal/cmd/server/detach_iso_test.go +++ b/internal/cmd/server/detach_iso_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/disable_backup_test.go b/internal/cmd/server/disable_backup_test.go index 3066d3f0..6f65e588 100644 --- a/internal/cmd/server/disable_backup_test.go +++ b/internal/cmd/server/disable_backup_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/disable_protection_test.go b/internal/cmd/server/disable_protection_test.go index 0bef07b3..47a256bb 100644 --- a/internal/cmd/server/disable_protection_test.go +++ b/internal/cmd/server/disable_protection_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/disable_rescue_test.go b/internal/cmd/server/disable_rescue_test.go index 3e0e7d80..64936057 100644 --- a/internal/cmd/server/disable_rescue_test.go +++ b/internal/cmd/server/disable_rescue_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/enable_backup_test.go b/internal/cmd/server/enable_backup_test.go index 50169cce..5010dbd0 100644 --- a/internal/cmd/server/enable_backup_test.go +++ b/internal/cmd/server/enable_backup_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/enable_protection_test.go b/internal/cmd/server/enable_protection_test.go index 3c44b1b5..61e25d1f 100644 --- a/internal/cmd/server/enable_protection_test.go +++ b/internal/cmd/server/enable_protection_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/enable_rescue_test.go b/internal/cmd/server/enable_rescue_test.go index 1bb18a4e..59a4199a 100644 --- a/internal/cmd/server/enable_rescue_test.go +++ b/internal/cmd/server/enable_rescue_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/ip_test.go b/internal/cmd/server/ip_test.go index 67650445..7c8c87fe 100644 --- a/internal/cmd/server/ip_test.go +++ b/internal/cmd/server/ip_test.go @@ -5,9 +5,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/labels_test.go b/internal/cmd/server/labels_test.go index 535b02df..f1a4746c 100644 --- a/internal/cmd/server/labels_test.go +++ b/internal/cmd/server/labels_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/list_test.go b/internal/cmd/server/list_test.go index 0b6f5ae0..709d6034 100644 --- a/internal/cmd/server/list_test.go +++ b/internal/cmd/server/list_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/metrics_test.go b/internal/cmd/server/metrics_test.go index 99ce0194..98e90307 100644 --- a/internal/cmd/server/metrics_test.go +++ b/internal/cmd/server/metrics_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/poweroff_test.go b/internal/cmd/server/poweroff_test.go index 69835c9c..c7fb4b58 100644 --- a/internal/cmd/server/poweroff_test.go +++ b/internal/cmd/server/poweroff_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/poweron_test.go b/internal/cmd/server/poweron_test.go index 920783cb..d12f8130 100644 --- a/internal/cmd/server/poweron_test.go +++ b/internal/cmd/server/poweron_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/reboot_test.go b/internal/cmd/server/reboot_test.go index d55f4c53..9368827e 100644 --- a/internal/cmd/server/reboot_test.go +++ b/internal/cmd/server/reboot_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/rebuild_test.go b/internal/cmd/server/rebuild_test.go index a41795ed..bd3769af 100644 --- a/internal/cmd/server/rebuild_test.go +++ b/internal/cmd/server/rebuild_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/remove_from_placement_group_test.go b/internal/cmd/server/remove_from_placement_group_test.go index 78c29c9e..d7b68130 100644 --- a/internal/cmd/server/remove_from_placement_group_test.go +++ b/internal/cmd/server/remove_from_placement_group_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/request_console_test.go b/internal/cmd/server/request_console_test.go index fbafc3bf..0187bcb3 100644 --- a/internal/cmd/server/request_console_test.go +++ b/internal/cmd/server/request_console_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/reset_password_test.go b/internal/cmd/server/reset_password_test.go index 0f78d51d..fa1eff0c 100644 --- a/internal/cmd/server/reset_password_test.go +++ b/internal/cmd/server/reset_password_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/reset_test.go b/internal/cmd/server/reset_test.go index a0f842f8..a101e6a3 100644 --- a/internal/cmd/server/reset_test.go +++ b/internal/cmd/server/reset_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/set_rdns_test.go b/internal/cmd/server/set_rdns_test.go index 5402bfd7..95a2f2b3 100644 --- a/internal/cmd/server/set_rdns_test.go +++ b/internal/cmd/server/set_rdns_test.go @@ -4,9 +4,9 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/shutdown_test.go b/internal/cmd/server/shutdown_test.go index 18b9d272..be9bcf4e 100644 --- a/internal/cmd/server/shutdown_test.go +++ b/internal/cmd/server/shutdown_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/ssh_test.go b/internal/cmd/server/ssh_test.go index 4793cea4..4b9775f4 100644 --- a/internal/cmd/server/ssh_test.go +++ b/internal/cmd/server/ssh_test.go @@ -4,7 +4,7 @@ import ( "net" "testing" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/server/update_test.go b/internal/cmd/server/update_test.go index 64747c9d..d3e6787c 100644 --- a/internal/cmd/server/update_test.go +++ b/internal/cmd/server/update_test.go @@ -3,9 +3,9 @@ package server_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/server" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/servertype/describe_test.go b/internal/cmd/servertype/describe_test.go index dd23e873..94456084 100644 --- a/internal/cmd/servertype/describe_test.go +++ b/internal/cmd/servertype/describe_test.go @@ -3,9 +3,9 @@ package servertype_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/servertype" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/servertype/list_test.go b/internal/cmd/servertype/list_test.go index 6fa48f84..52ca93c7 100644 --- a/internal/cmd/servertype/list_test.go +++ b/internal/cmd/servertype/list_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/servertype" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/sshkey/create_test.go b/internal/cmd/sshkey/create_test.go index 872577d7..32e049e8 100644 --- a/internal/cmd/sshkey/create_test.go +++ b/internal/cmd/sshkey/create_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/sshkey" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/sshkey/delete_test.go b/internal/cmd/sshkey/delete_test.go index 1cbfbec9..2f481895 100644 --- a/internal/cmd/sshkey/delete_test.go +++ b/internal/cmd/sshkey/delete_test.go @@ -3,9 +3,9 @@ package sshkey_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/sshkey" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/sshkey/describe_test.go b/internal/cmd/sshkey/describe_test.go index e4b9aed8..93fab8b3 100644 --- a/internal/cmd/sshkey/describe_test.go +++ b/internal/cmd/sshkey/describe_test.go @@ -6,9 +6,9 @@ import ( "time" "github.com/dustin/go-humanize" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/sshkey" "github.com/hetznercloud/cli/internal/cmd/util" diff --git a/internal/cmd/sshkey/labels_test.go b/internal/cmd/sshkey/labels_test.go index c5702a0d..fdcd4069 100644 --- a/internal/cmd/sshkey/labels_test.go +++ b/internal/cmd/sshkey/labels_test.go @@ -3,9 +3,9 @@ package sshkey_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/sshkey" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/sshkey/list_test.go b/internal/cmd/sshkey/list_test.go index 0340a5e2..28371f1c 100644 --- a/internal/cmd/sshkey/list_test.go +++ b/internal/cmd/sshkey/list_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" require "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/sshkey" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/sshkey/update_test.go b/internal/cmd/sshkey/update_test.go index b3e74844..0d0127f1 100644 --- a/internal/cmd/sshkey/update_test.go +++ b/internal/cmd/sshkey/update_test.go @@ -3,9 +3,9 @@ package sshkey_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/sshkey" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/volume/attach_test.go b/internal/cmd/volume/attach_test.go index 2b724456..4bbe12c9 100644 --- a/internal/cmd/volume/attach_test.go +++ b/internal/cmd/volume/attach_test.go @@ -3,9 +3,9 @@ package volume_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/volume" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/volume/create_test.go b/internal/cmd/volume/create_test.go index a202df84..2a1de2fa 100644 --- a/internal/cmd/volume/create_test.go +++ b/internal/cmd/volume/create_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/volume" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/volume/delete_test.go b/internal/cmd/volume/delete_test.go index 591ad4ed..1d10bde4 100644 --- a/internal/cmd/volume/delete_test.go +++ b/internal/cmd/volume/delete_test.go @@ -3,9 +3,9 @@ package volume_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/volume" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/volume/describe_test.go b/internal/cmd/volume/describe_test.go index 329e994f..d0aeac98 100644 --- a/internal/cmd/volume/describe_test.go +++ b/internal/cmd/volume/describe_test.go @@ -6,9 +6,9 @@ import ( "time" "github.com/dustin/go-humanize" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/util" "github.com/hetznercloud/cli/internal/cmd/volume" diff --git a/internal/cmd/volume/detach_test.go b/internal/cmd/volume/detach_test.go index 3f886d1f..f2cd4127 100644 --- a/internal/cmd/volume/detach_test.go +++ b/internal/cmd/volume/detach_test.go @@ -3,9 +3,9 @@ package volume_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/volume" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/volume/disable_protection_test.go b/internal/cmd/volume/disable_protection_test.go index 840bca6f..6d2dae17 100644 --- a/internal/cmd/volume/disable_protection_test.go +++ b/internal/cmd/volume/disable_protection_test.go @@ -3,9 +3,9 @@ package volume_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/volume" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/volume/enable_protection_test.go b/internal/cmd/volume/enable_protection_test.go index 9cca011d..f887ea1a 100644 --- a/internal/cmd/volume/enable_protection_test.go +++ b/internal/cmd/volume/enable_protection_test.go @@ -3,9 +3,9 @@ package volume_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/volume" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/volume/labels_test.go b/internal/cmd/volume/labels_test.go index 0f0bda17..94b80299 100644 --- a/internal/cmd/volume/labels_test.go +++ b/internal/cmd/volume/labels_test.go @@ -3,9 +3,9 @@ package volume_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/volume" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/volume/list_test.go b/internal/cmd/volume/list_test.go index 74277b28..d1f404b4 100644 --- a/internal/cmd/volume/list_test.go +++ b/internal/cmd/volume/list_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/volume" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/volume/resize_test.go b/internal/cmd/volume/resize_test.go index 959243b3..c313f1d8 100644 --- a/internal/cmd/volume/resize_test.go +++ b/internal/cmd/volume/resize_test.go @@ -3,9 +3,9 @@ package volume_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/volume" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/cmd/volume/update_test.go b/internal/cmd/volume/update_test.go index 14e70fb7..b90d6343 100644 --- a/internal/cmd/volume/update_test.go +++ b/internal/cmd/volume/update_test.go @@ -3,9 +3,9 @@ package volume_test import ( "testing" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/cmd/volume" "github.com/hetznercloud/cli/internal/testutil" diff --git a/internal/hcapi2/mock/client.go b/internal/hcapi2/mock/client.go index 765d6ad8..e568e408 100644 --- a/internal/hcapi2/mock/client.go +++ b/internal/hcapi2/mock/client.go @@ -1,7 +1,7 @@ package mock import ( - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/hcapi2" "github.com/hetznercloud/cli/internal/state/config" diff --git a/internal/hcapi2/mock/mock_gen.go b/internal/hcapi2/mock/mock_gen.go index d38f3672..ddb674fa 100644 --- a/internal/hcapi2/mock/mock_gen.go +++ b/internal/hcapi2/mock/mock_gen.go @@ -1,21 +1,21 @@ package mock -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_action_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 ActionClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_certificate_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 CertificateClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_datacenter_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 DatacenterClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_image_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 ImageClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_iso_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 ISOClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_firewall_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 FirewallClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_floating_ip_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 FloatingIPClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_primary_ip_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 PrimaryIPClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_location_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 LocationClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_loadbalancer_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 LoadBalancerClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_loadbalancer_type_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 LoadBalancerTypeClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_network_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 NetworkClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_server_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 ServerClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_server_type_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 ServerTypeClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_ssh_key_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 SSHKeyClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_volume_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 VolumeClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_placement_group_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 PlacementGroupClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_rdns_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 RDNSClient -//go:generate go run github.com/golang/mock/mockgen -package mock -destination zz_pricing_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 PricingClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_action_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 ActionClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_certificate_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 CertificateClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_datacenter_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 DatacenterClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_image_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 ImageClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_iso_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 ISOClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_firewall_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 FirewallClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_floating_ip_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 FloatingIPClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_primary_ip_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 PrimaryIPClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_location_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 LocationClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_loadbalancer_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 LoadBalancerClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_loadbalancer_type_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 LoadBalancerTypeClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_network_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 NetworkClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_server_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 ServerClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_server_type_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 ServerTypeClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_ssh_key_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 SSHKeyClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_volume_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 VolumeClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_placement_group_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 PlacementGroupClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_rdns_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 RDNSClient +//go:generate go run go.uber.org/mock/mockgen -package mock -destination zz_pricing_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 PricingClient diff --git a/internal/hcapi2/mock/zz_action_client_mock.go b/internal/hcapi2/mock/zz_action_client_mock.go index f9bdc84e..fef07571 100644 --- a/internal/hcapi2/mock/zz_action_client_mock.go +++ b/internal/hcapi2/mock/zz_action_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: ActionClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_action_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 ActionClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockActionClient is a mock of ActionClient interface. type MockActionClient struct { ctrl *gomock.Controller recorder *MockActionClientMockRecorder + isgomock struct{} } // MockActionClientMockRecorder is the mock recorder for MockActionClient. @@ -36,39 +42,39 @@ func (m *MockActionClient) EXPECT() *MockActionClientMockRecorder { } // All mocks base method. -func (m *MockActionClient) All(arg0 context.Context) ([]*hcloud.Action, error) { +func (m *MockActionClient) All(ctx context.Context) ([]*hcloud.Action, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.Action) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockActionClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockActionClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockActionClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockActionClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockActionClient) AllWithOpts(arg0 context.Context, arg1 hcloud.ActionListOpts) ([]*hcloud.Action, error) { +func (m *MockActionClient) AllWithOpts(ctx context.Context, opts hcloud.ActionListOpts) ([]*hcloud.Action, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.Action) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockActionClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockActionClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockActionClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockActionClient)(nil).AllWithOpts), ctx, opts) } // GetByID mocks base method. -func (m *MockActionClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockActionClient) GetByID(ctx context.Context, id int64) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -76,15 +82,15 @@ func (m *MockActionClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.Ac } // GetByID indicates an expected call of GetByID. -func (mr *MockActionClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockActionClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockActionClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockActionClient)(nil).GetByID), ctx, id) } // List mocks base method. -func (m *MockActionClient) List(arg0 context.Context, arg1 hcloud.ActionListOpts) ([]*hcloud.Action, *hcloud.Response, error) { +func (m *MockActionClient) List(ctx context.Context, opts hcloud.ActionListOpts) ([]*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -92,16 +98,16 @@ func (m *MockActionClient) List(arg0 context.Context, arg1 hcloud.ActionListOpts } // List indicates an expected call of List. -func (mr *MockActionClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockActionClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockActionClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockActionClient)(nil).List), ctx, opts) } // WaitFor mocks base method. -func (m *MockActionClient) WaitFor(arg0 context.Context, arg1 ...*hcloud.Action) error { +func (m *MockActionClient) WaitFor(ctx context.Context, actions ...*hcloud.Action) error { m.ctrl.T.Helper() - varargs := []interface{}{arg0} - for _, a := range arg1 { + varargs := []any{ctx} + for _, a := range actions { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "WaitFor", varargs...) @@ -110,17 +116,17 @@ func (m *MockActionClient) WaitFor(arg0 context.Context, arg1 ...*hcloud.Action) } // WaitFor indicates an expected call of WaitFor. -func (mr *MockActionClientMockRecorder) WaitFor(arg0 interface{}, arg1 ...interface{}) *gomock.Call { +func (mr *MockActionClientMockRecorder) WaitFor(ctx any, actions ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{arg0}, arg1...) + varargs := append([]any{ctx}, actions...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitFor", reflect.TypeOf((*MockActionClient)(nil).WaitFor), varargs...) } // WaitForFunc mocks base method. -func (m *MockActionClient) WaitForFunc(arg0 context.Context, arg1 func(*hcloud.Action) error, arg2 ...*hcloud.Action) error { +func (m *MockActionClient) WaitForFunc(ctx context.Context, handleUpdate func(*hcloud.Action) error, actions ...*hcloud.Action) error { m.ctrl.T.Helper() - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, handleUpdate} + for _, a := range actions { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "WaitForFunc", varargs...) @@ -129,38 +135,38 @@ func (m *MockActionClient) WaitForFunc(arg0 context.Context, arg1 func(*hcloud.A } // WaitForFunc indicates an expected call of WaitForFunc. -func (mr *MockActionClientMockRecorder) WaitForFunc(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { +func (mr *MockActionClientMockRecorder) WaitForFunc(ctx, handleUpdate any, actions ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{arg0, arg1}, arg2...) + varargs := append([]any{ctx, handleUpdate}, actions...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForFunc", reflect.TypeOf((*MockActionClient)(nil).WaitForFunc), varargs...) } // WatchOverallProgress mocks base method. -func (m *MockActionClient) WatchOverallProgress(arg0 context.Context, arg1 []*hcloud.Action) (<-chan int, <-chan error) { +func (m *MockActionClient) WatchOverallProgress(ctx context.Context, actions []*hcloud.Action) (<-chan int, <-chan error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WatchOverallProgress", arg0, arg1) + ret := m.ctrl.Call(m, "WatchOverallProgress", ctx, actions) ret0, _ := ret[0].(<-chan int) ret1, _ := ret[1].(<-chan error) return ret0, ret1 } // WatchOverallProgress indicates an expected call of WatchOverallProgress. -func (mr *MockActionClientMockRecorder) WatchOverallProgress(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockActionClientMockRecorder) WatchOverallProgress(ctx, actions any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOverallProgress", reflect.TypeOf((*MockActionClient)(nil).WatchOverallProgress), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchOverallProgress", reflect.TypeOf((*MockActionClient)(nil).WatchOverallProgress), ctx, actions) } // WatchProgress mocks base method. -func (m *MockActionClient) WatchProgress(arg0 context.Context, arg1 *hcloud.Action) (<-chan int, <-chan error) { +func (m *MockActionClient) WatchProgress(ctx context.Context, action *hcloud.Action) (<-chan int, <-chan error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WatchProgress", arg0, arg1) + ret := m.ctrl.Call(m, "WatchProgress", ctx, action) ret0, _ := ret[0].(<-chan int) ret1, _ := ret[1].(<-chan error) return ret0, ret1 } // WatchProgress indicates an expected call of WatchProgress. -func (mr *MockActionClientMockRecorder) WatchProgress(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockActionClientMockRecorder) WatchProgress(ctx, action any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchProgress", reflect.TypeOf((*MockActionClient)(nil).WatchProgress), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchProgress", reflect.TypeOf((*MockActionClient)(nil).WatchProgress), ctx, action) } diff --git a/internal/hcapi2/mock/zz_certificate_client_mock.go b/internal/hcapi2/mock/zz_certificate_client_mock.go index 2c1e2d41..b915532b 100644 --- a/internal/hcapi2/mock/zz_certificate_client_mock.go +++ b/internal/hcapi2/mock/zz_certificate_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: CertificateClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_certificate_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 CertificateClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockCertificateClient is a mock of CertificateClient interface. type MockCertificateClient struct { ctrl *gomock.Controller recorder *MockCertificateClientMockRecorder + isgomock struct{} } // MockCertificateClientMockRecorder is the mock recorder for MockCertificateClient. @@ -36,39 +42,39 @@ func (m *MockCertificateClient) EXPECT() *MockCertificateClientMockRecorder { } // All mocks base method. -func (m *MockCertificateClient) All(arg0 context.Context) ([]*hcloud.Certificate, error) { +func (m *MockCertificateClient) All(ctx context.Context) ([]*hcloud.Certificate, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.Certificate) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockCertificateClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockCertificateClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockCertificateClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockCertificateClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockCertificateClient) AllWithOpts(arg0 context.Context, arg1 hcloud.CertificateListOpts) ([]*hcloud.Certificate, error) { +func (m *MockCertificateClient) AllWithOpts(ctx context.Context, opts hcloud.CertificateListOpts) ([]*hcloud.Certificate, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.Certificate) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockCertificateClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockCertificateClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockCertificateClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockCertificateClient)(nil).AllWithOpts), ctx, opts) } // Create mocks base method. -func (m *MockCertificateClient) Create(arg0 context.Context, arg1 hcloud.CertificateCreateOpts) (*hcloud.Certificate, *hcloud.Response, error) { +func (m *MockCertificateClient) Create(ctx context.Context, opts hcloud.CertificateCreateOpts) (*hcloud.Certificate, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Create", arg0, arg1) + ret := m.ctrl.Call(m, "Create", ctx, opts) ret0, _ := ret[0].(*hcloud.Certificate) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -76,15 +82,15 @@ func (m *MockCertificateClient) Create(arg0 context.Context, arg1 hcloud.Certifi } // Create indicates an expected call of Create. -func (mr *MockCertificateClientMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockCertificateClientMockRecorder) Create(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockCertificateClient)(nil).Create), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockCertificateClient)(nil).Create), ctx, opts) } // CreateCertificate mocks base method. -func (m *MockCertificateClient) CreateCertificate(arg0 context.Context, arg1 hcloud.CertificateCreateOpts) (hcloud.CertificateCreateResult, *hcloud.Response, error) { +func (m *MockCertificateClient) CreateCertificate(ctx context.Context, opts hcloud.CertificateCreateOpts) (hcloud.CertificateCreateResult, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateCertificate", arg0, arg1) + ret := m.ctrl.Call(m, "CreateCertificate", ctx, opts) ret0, _ := ret[0].(hcloud.CertificateCreateResult) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -92,30 +98,30 @@ func (m *MockCertificateClient) CreateCertificate(arg0 context.Context, arg1 hcl } // CreateCertificate indicates an expected call of CreateCertificate. -func (mr *MockCertificateClientMockRecorder) CreateCertificate(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockCertificateClientMockRecorder) CreateCertificate(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCertificate", reflect.TypeOf((*MockCertificateClient)(nil).CreateCertificate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCertificate", reflect.TypeOf((*MockCertificateClient)(nil).CreateCertificate), ctx, opts) } // Delete mocks base method. -func (m *MockCertificateClient) Delete(arg0 context.Context, arg1 *hcloud.Certificate) (*hcloud.Response, error) { +func (m *MockCertificateClient) Delete(ctx context.Context, certificate *hcloud.Certificate) (*hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0, arg1) + ret := m.ctrl.Call(m, "Delete", ctx, certificate) ret0, _ := ret[0].(*hcloud.Response) ret1, _ := ret[1].(error) return ret0, ret1 } // Delete indicates an expected call of Delete. -func (mr *MockCertificateClientMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockCertificateClientMockRecorder) Delete(ctx, certificate any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockCertificateClient)(nil).Delete), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockCertificateClient)(nil).Delete), ctx, certificate) } // Get mocks base method. -func (m *MockCertificateClient) Get(arg0 context.Context, arg1 string) (*hcloud.Certificate, *hcloud.Response, error) { +func (m *MockCertificateClient) Get(ctx context.Context, idOrName string) (*hcloud.Certificate, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.Certificate) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -123,15 +129,15 @@ func (m *MockCertificateClient) Get(arg0 context.Context, arg1 string) (*hcloud. } // Get indicates an expected call of Get. -func (mr *MockCertificateClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockCertificateClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockCertificateClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockCertificateClient)(nil).Get), ctx, idOrName) } // GetByID mocks base method. -func (m *MockCertificateClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.Certificate, *hcloud.Response, error) { +func (m *MockCertificateClient) GetByID(ctx context.Context, id int64) (*hcloud.Certificate, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.Certificate) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -139,15 +145,15 @@ func (m *MockCertificateClient) GetByID(arg0 context.Context, arg1 int64) (*hclo } // GetByID indicates an expected call of GetByID. -func (mr *MockCertificateClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockCertificateClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockCertificateClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockCertificateClient)(nil).GetByID), ctx, id) } // GetByName mocks base method. -func (m *MockCertificateClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.Certificate, *hcloud.Response, error) { +func (m *MockCertificateClient) GetByName(ctx context.Context, name string) (*hcloud.Certificate, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.Certificate) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -155,9 +161,9 @@ func (m *MockCertificateClient) GetByName(arg0 context.Context, arg1 string) (*h } // GetByName indicates an expected call of GetByName. -func (mr *MockCertificateClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockCertificateClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockCertificateClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockCertificateClient)(nil).GetByName), ctx, name) } // LabelKeys mocks base method. @@ -169,15 +175,15 @@ func (m *MockCertificateClient) LabelKeys(arg0 string) []string { } // LabelKeys indicates an expected call of LabelKeys. -func (mr *MockCertificateClientMockRecorder) LabelKeys(arg0 interface{}) *gomock.Call { +func (mr *MockCertificateClientMockRecorder) LabelKeys(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockCertificateClient)(nil).LabelKeys), arg0) } // List mocks base method. -func (m *MockCertificateClient) List(arg0 context.Context, arg1 hcloud.CertificateListOpts) ([]*hcloud.Certificate, *hcloud.Response, error) { +func (m *MockCertificateClient) List(ctx context.Context, opts hcloud.CertificateListOpts) ([]*hcloud.Certificate, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.Certificate) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -185,9 +191,9 @@ func (m *MockCertificateClient) List(arg0 context.Context, arg1 hcloud.Certifica } // List indicates an expected call of List. -func (mr *MockCertificateClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockCertificateClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockCertificateClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockCertificateClient)(nil).List), ctx, opts) } // Names mocks base method. @@ -205,9 +211,9 @@ func (mr *MockCertificateClientMockRecorder) Names() *gomock.Call { } // RetryIssuance mocks base method. -func (m *MockCertificateClient) RetryIssuance(arg0 context.Context, arg1 *hcloud.Certificate) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockCertificateClient) RetryIssuance(ctx context.Context, certificate *hcloud.Certificate) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RetryIssuance", arg0, arg1) + ret := m.ctrl.Call(m, "RetryIssuance", ctx, certificate) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -215,15 +221,15 @@ func (m *MockCertificateClient) RetryIssuance(arg0 context.Context, arg1 *hcloud } // RetryIssuance indicates an expected call of RetryIssuance. -func (mr *MockCertificateClientMockRecorder) RetryIssuance(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockCertificateClientMockRecorder) RetryIssuance(ctx, certificate any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RetryIssuance", reflect.TypeOf((*MockCertificateClient)(nil).RetryIssuance), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RetryIssuance", reflect.TypeOf((*MockCertificateClient)(nil).RetryIssuance), ctx, certificate) } // Update mocks base method. -func (m *MockCertificateClient) Update(arg0 context.Context, arg1 *hcloud.Certificate, arg2 hcloud.CertificateUpdateOpts) (*hcloud.Certificate, *hcloud.Response, error) { +func (m *MockCertificateClient) Update(ctx context.Context, certificate *hcloud.Certificate, opts hcloud.CertificateUpdateOpts) (*hcloud.Certificate, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Update", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Update", ctx, certificate, opts) ret0, _ := ret[0].(*hcloud.Certificate) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -231,7 +237,7 @@ func (m *MockCertificateClient) Update(arg0 context.Context, arg1 *hcloud.Certif } // Update indicates an expected call of Update. -func (mr *MockCertificateClientMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockCertificateClientMockRecorder) Update(ctx, certificate, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockCertificateClient)(nil).Update), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockCertificateClient)(nil).Update), ctx, certificate, opts) } diff --git a/internal/hcapi2/mock/zz_datacenter_client_mock.go b/internal/hcapi2/mock/zz_datacenter_client_mock.go index 5920d294..6047047c 100644 --- a/internal/hcapi2/mock/zz_datacenter_client_mock.go +++ b/internal/hcapi2/mock/zz_datacenter_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: DatacenterClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_datacenter_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 DatacenterClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockDatacenterClient is a mock of DatacenterClient interface. type MockDatacenterClient struct { ctrl *gomock.Controller recorder *MockDatacenterClientMockRecorder + isgomock struct{} } // MockDatacenterClientMockRecorder is the mock recorder for MockDatacenterClient. @@ -36,39 +42,39 @@ func (m *MockDatacenterClient) EXPECT() *MockDatacenterClientMockRecorder { } // All mocks base method. -func (m *MockDatacenterClient) All(arg0 context.Context) ([]*hcloud.Datacenter, error) { +func (m *MockDatacenterClient) All(ctx context.Context) ([]*hcloud.Datacenter, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.Datacenter) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockDatacenterClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockDatacenterClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockDatacenterClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockDatacenterClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockDatacenterClient) AllWithOpts(arg0 context.Context, arg1 hcloud.DatacenterListOpts) ([]*hcloud.Datacenter, error) { +func (m *MockDatacenterClient) AllWithOpts(ctx context.Context, opts hcloud.DatacenterListOpts) ([]*hcloud.Datacenter, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.Datacenter) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockDatacenterClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatacenterClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockDatacenterClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockDatacenterClient)(nil).AllWithOpts), ctx, opts) } // Get mocks base method. -func (m *MockDatacenterClient) Get(arg0 context.Context, arg1 string) (*hcloud.Datacenter, *hcloud.Response, error) { +func (m *MockDatacenterClient) Get(ctx context.Context, idOrName string) (*hcloud.Datacenter, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.Datacenter) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -76,15 +82,15 @@ func (m *MockDatacenterClient) Get(arg0 context.Context, arg1 string) (*hcloud.D } // Get indicates an expected call of Get. -func (mr *MockDatacenterClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatacenterClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDatacenterClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDatacenterClient)(nil).Get), ctx, idOrName) } // GetByID mocks base method. -func (m *MockDatacenterClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.Datacenter, *hcloud.Response, error) { +func (m *MockDatacenterClient) GetByID(ctx context.Context, id int64) (*hcloud.Datacenter, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.Datacenter) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -92,15 +98,15 @@ func (m *MockDatacenterClient) GetByID(arg0 context.Context, arg1 int64) (*hclou } // GetByID indicates an expected call of GetByID. -func (mr *MockDatacenterClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatacenterClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockDatacenterClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockDatacenterClient)(nil).GetByID), ctx, id) } // GetByName mocks base method. -func (m *MockDatacenterClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.Datacenter, *hcloud.Response, error) { +func (m *MockDatacenterClient) GetByName(ctx context.Context, name string) (*hcloud.Datacenter, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.Datacenter) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -108,15 +114,15 @@ func (m *MockDatacenterClient) GetByName(arg0 context.Context, arg1 string) (*hc } // GetByName indicates an expected call of GetByName. -func (mr *MockDatacenterClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatacenterClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockDatacenterClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockDatacenterClient)(nil).GetByName), ctx, name) } // List mocks base method. -func (m *MockDatacenterClient) List(arg0 context.Context, arg1 hcloud.DatacenterListOpts) ([]*hcloud.Datacenter, *hcloud.Response, error) { +func (m *MockDatacenterClient) List(ctx context.Context, opts hcloud.DatacenterListOpts) ([]*hcloud.Datacenter, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.Datacenter) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -124,9 +130,9 @@ func (m *MockDatacenterClient) List(arg0 context.Context, arg1 hcloud.Datacenter } // List indicates an expected call of List. -func (mr *MockDatacenterClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDatacenterClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockDatacenterClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockDatacenterClient)(nil).List), ctx, opts) } // Names mocks base method. diff --git a/internal/hcapi2/mock/zz_firewall_client_mock.go b/internal/hcapi2/mock/zz_firewall_client_mock.go index 2072427f..8bf6ad05 100644 --- a/internal/hcapi2/mock/zz_firewall_client_mock.go +++ b/internal/hcapi2/mock/zz_firewall_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: FirewallClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_firewall_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 FirewallClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockFirewallClient is a mock of FirewallClient interface. type MockFirewallClient struct { ctrl *gomock.Controller recorder *MockFirewallClientMockRecorder + isgomock struct{} } // MockFirewallClientMockRecorder is the mock recorder for MockFirewallClient. @@ -36,39 +42,39 @@ func (m *MockFirewallClient) EXPECT() *MockFirewallClientMockRecorder { } // All mocks base method. -func (m *MockFirewallClient) All(arg0 context.Context) ([]*hcloud.Firewall, error) { +func (m *MockFirewallClient) All(ctx context.Context) ([]*hcloud.Firewall, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.Firewall) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockFirewallClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockFirewallClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockFirewallClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockFirewallClient) AllWithOpts(arg0 context.Context, arg1 hcloud.FirewallListOpts) ([]*hcloud.Firewall, error) { +func (m *MockFirewallClient) AllWithOpts(ctx context.Context, opts hcloud.FirewallListOpts) ([]*hcloud.Firewall, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.Firewall) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockFirewallClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockFirewallClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockFirewallClient)(nil).AllWithOpts), ctx, opts) } // ApplyResources mocks base method. -func (m *MockFirewallClient) ApplyResources(arg0 context.Context, arg1 *hcloud.Firewall, arg2 []hcloud.FirewallResource) ([]*hcloud.Action, *hcloud.Response, error) { +func (m *MockFirewallClient) ApplyResources(ctx context.Context, firewall *hcloud.Firewall, resources []hcloud.FirewallResource) ([]*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ApplyResources", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ApplyResources", ctx, firewall, resources) ret0, _ := ret[0].([]*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -76,15 +82,15 @@ func (m *MockFirewallClient) ApplyResources(arg0 context.Context, arg1 *hcloud.F } // ApplyResources indicates an expected call of ApplyResources. -func (mr *MockFirewallClientMockRecorder) ApplyResources(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) ApplyResources(ctx, firewall, resources any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyResources", reflect.TypeOf((*MockFirewallClient)(nil).ApplyResources), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyResources", reflect.TypeOf((*MockFirewallClient)(nil).ApplyResources), ctx, firewall, resources) } // Create mocks base method. -func (m *MockFirewallClient) Create(arg0 context.Context, arg1 hcloud.FirewallCreateOpts) (hcloud.FirewallCreateResult, *hcloud.Response, error) { +func (m *MockFirewallClient) Create(ctx context.Context, opts hcloud.FirewallCreateOpts) (hcloud.FirewallCreateResult, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Create", arg0, arg1) + ret := m.ctrl.Call(m, "Create", ctx, opts) ret0, _ := ret[0].(hcloud.FirewallCreateResult) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -92,30 +98,30 @@ func (m *MockFirewallClient) Create(arg0 context.Context, arg1 hcloud.FirewallCr } // Create indicates an expected call of Create. -func (mr *MockFirewallClientMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) Create(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFirewallClient)(nil).Create), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFirewallClient)(nil).Create), ctx, opts) } // Delete mocks base method. -func (m *MockFirewallClient) Delete(arg0 context.Context, arg1 *hcloud.Firewall) (*hcloud.Response, error) { +func (m *MockFirewallClient) Delete(ctx context.Context, firewall *hcloud.Firewall) (*hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0, arg1) + ret := m.ctrl.Call(m, "Delete", ctx, firewall) ret0, _ := ret[0].(*hcloud.Response) ret1, _ := ret[1].(error) return ret0, ret1 } // Delete indicates an expected call of Delete. -func (mr *MockFirewallClientMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) Delete(ctx, firewall any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockFirewallClient)(nil).Delete), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockFirewallClient)(nil).Delete), ctx, firewall) } // Get mocks base method. -func (m *MockFirewallClient) Get(arg0 context.Context, arg1 string) (*hcloud.Firewall, *hcloud.Response, error) { +func (m *MockFirewallClient) Get(ctx context.Context, idOrName string) (*hcloud.Firewall, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.Firewall) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -123,15 +129,15 @@ func (m *MockFirewallClient) Get(arg0 context.Context, arg1 string) (*hcloud.Fir } // Get indicates an expected call of Get. -func (mr *MockFirewallClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockFirewallClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockFirewallClient)(nil).Get), ctx, idOrName) } // GetByID mocks base method. -func (m *MockFirewallClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.Firewall, *hcloud.Response, error) { +func (m *MockFirewallClient) GetByID(ctx context.Context, id int64) (*hcloud.Firewall, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.Firewall) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -139,15 +145,15 @@ func (m *MockFirewallClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud. } // GetByID indicates an expected call of GetByID. -func (mr *MockFirewallClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockFirewallClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockFirewallClient)(nil).GetByID), ctx, id) } // GetByName mocks base method. -func (m *MockFirewallClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.Firewall, *hcloud.Response, error) { +func (m *MockFirewallClient) GetByName(ctx context.Context, name string) (*hcloud.Firewall, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.Firewall) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -155,9 +161,9 @@ func (m *MockFirewallClient) GetByName(arg0 context.Context, arg1 string) (*hclo } // GetByName indicates an expected call of GetByName. -func (mr *MockFirewallClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockFirewallClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockFirewallClient)(nil).GetByName), ctx, name) } // LabelKeys mocks base method. @@ -169,15 +175,15 @@ func (m *MockFirewallClient) LabelKeys(arg0 string) []string { } // LabelKeys indicates an expected call of LabelKeys. -func (mr *MockFirewallClientMockRecorder) LabelKeys(arg0 interface{}) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) LabelKeys(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockFirewallClient)(nil).LabelKeys), arg0) } // List mocks base method. -func (m *MockFirewallClient) List(arg0 context.Context, arg1 hcloud.FirewallListOpts) ([]*hcloud.Firewall, *hcloud.Response, error) { +func (m *MockFirewallClient) List(ctx context.Context, opts hcloud.FirewallListOpts) ([]*hcloud.Firewall, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.Firewall) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -185,9 +191,9 @@ func (m *MockFirewallClient) List(arg0 context.Context, arg1 hcloud.FirewallList } // List indicates an expected call of List. -func (mr *MockFirewallClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockFirewallClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockFirewallClient)(nil).List), ctx, opts) } // Names mocks base method. @@ -205,9 +211,9 @@ func (mr *MockFirewallClientMockRecorder) Names() *gomock.Call { } // RemoveResources mocks base method. -func (m *MockFirewallClient) RemoveResources(arg0 context.Context, arg1 *hcloud.Firewall, arg2 []hcloud.FirewallResource) ([]*hcloud.Action, *hcloud.Response, error) { +func (m *MockFirewallClient) RemoveResources(ctx context.Context, firewall *hcloud.Firewall, resources []hcloud.FirewallResource) ([]*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveResources", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "RemoveResources", ctx, firewall, resources) ret0, _ := ret[0].([]*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -215,15 +221,15 @@ func (m *MockFirewallClient) RemoveResources(arg0 context.Context, arg1 *hcloud. } // RemoveResources indicates an expected call of RemoveResources. -func (mr *MockFirewallClientMockRecorder) RemoveResources(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) RemoveResources(ctx, firewall, resources any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveResources", reflect.TypeOf((*MockFirewallClient)(nil).RemoveResources), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveResources", reflect.TypeOf((*MockFirewallClient)(nil).RemoveResources), ctx, firewall, resources) } // SetRules mocks base method. -func (m *MockFirewallClient) SetRules(arg0 context.Context, arg1 *hcloud.Firewall, arg2 hcloud.FirewallSetRulesOpts) ([]*hcloud.Action, *hcloud.Response, error) { +func (m *MockFirewallClient) SetRules(ctx context.Context, firewall *hcloud.Firewall, opts hcloud.FirewallSetRulesOpts) ([]*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SetRules", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "SetRules", ctx, firewall, opts) ret0, _ := ret[0].([]*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -231,15 +237,15 @@ func (m *MockFirewallClient) SetRules(arg0 context.Context, arg1 *hcloud.Firewal } // SetRules indicates an expected call of SetRules. -func (mr *MockFirewallClientMockRecorder) SetRules(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) SetRules(ctx, firewall, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRules", reflect.TypeOf((*MockFirewallClient)(nil).SetRules), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRules", reflect.TypeOf((*MockFirewallClient)(nil).SetRules), ctx, firewall, opts) } // Update mocks base method. -func (m *MockFirewallClient) Update(arg0 context.Context, arg1 *hcloud.Firewall, arg2 hcloud.FirewallUpdateOpts) (*hcloud.Firewall, *hcloud.Response, error) { +func (m *MockFirewallClient) Update(ctx context.Context, firewall *hcloud.Firewall, opts hcloud.FirewallUpdateOpts) (*hcloud.Firewall, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Update", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Update", ctx, firewall, opts) ret0, _ := ret[0].(*hcloud.Firewall) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -247,7 +253,7 @@ func (m *MockFirewallClient) Update(arg0 context.Context, arg1 *hcloud.Firewall, } // Update indicates an expected call of Update. -func (mr *MockFirewallClientMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockFirewallClientMockRecorder) Update(ctx, firewall, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockFirewallClient)(nil).Update), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockFirewallClient)(nil).Update), ctx, firewall, opts) } diff --git a/internal/hcapi2/mock/zz_floating_ip_client_mock.go b/internal/hcapi2/mock/zz_floating_ip_client_mock.go index 726da3ef..f29b47c2 100644 --- a/internal/hcapi2/mock/zz_floating_ip_client_mock.go +++ b/internal/hcapi2/mock/zz_floating_ip_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: FloatingIPClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_floating_ip_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 FloatingIPClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockFloatingIPClient is a mock of FloatingIPClient interface. type MockFloatingIPClient struct { ctrl *gomock.Controller recorder *MockFloatingIPClientMockRecorder + isgomock struct{} } // MockFloatingIPClientMockRecorder is the mock recorder for MockFloatingIPClient. @@ -36,39 +42,39 @@ func (m *MockFloatingIPClient) EXPECT() *MockFloatingIPClientMockRecorder { } // All mocks base method. -func (m *MockFloatingIPClient) All(arg0 context.Context) ([]*hcloud.FloatingIP, error) { +func (m *MockFloatingIPClient) All(ctx context.Context) ([]*hcloud.FloatingIP, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.FloatingIP) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockFloatingIPClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockFloatingIPClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockFloatingIPClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockFloatingIPClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockFloatingIPClient) AllWithOpts(arg0 context.Context, arg1 hcloud.FloatingIPListOpts) ([]*hcloud.FloatingIP, error) { +func (m *MockFloatingIPClient) AllWithOpts(ctx context.Context, opts hcloud.FloatingIPListOpts) ([]*hcloud.FloatingIP, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.FloatingIP) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockFloatingIPClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockFloatingIPClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockFloatingIPClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockFloatingIPClient)(nil).AllWithOpts), ctx, opts) } // Assign mocks base method. -func (m *MockFloatingIPClient) Assign(arg0 context.Context, arg1 *hcloud.FloatingIP, arg2 *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockFloatingIPClient) Assign(ctx context.Context, floatingIP *hcloud.FloatingIP, server *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Assign", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Assign", ctx, floatingIP, server) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -76,15 +82,15 @@ func (m *MockFloatingIPClient) Assign(arg0 context.Context, arg1 *hcloud.Floatin } // Assign indicates an expected call of Assign. -func (mr *MockFloatingIPClientMockRecorder) Assign(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockFloatingIPClientMockRecorder) Assign(ctx, floatingIP, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Assign", reflect.TypeOf((*MockFloatingIPClient)(nil).Assign), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Assign", reflect.TypeOf((*MockFloatingIPClient)(nil).Assign), ctx, floatingIP, server) } // ChangeDNSPtr mocks base method. -func (m *MockFloatingIPClient) ChangeDNSPtr(arg0 context.Context, arg1 *hcloud.FloatingIP, arg2 string, arg3 *string) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockFloatingIPClient) ChangeDNSPtr(ctx context.Context, floatingIP *hcloud.FloatingIP, ip string, ptr *string) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeDNSPtr", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "ChangeDNSPtr", ctx, floatingIP, ip, ptr) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -92,15 +98,15 @@ func (m *MockFloatingIPClient) ChangeDNSPtr(arg0 context.Context, arg1 *hcloud.F } // ChangeDNSPtr indicates an expected call of ChangeDNSPtr. -func (mr *MockFloatingIPClientMockRecorder) ChangeDNSPtr(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockFloatingIPClientMockRecorder) ChangeDNSPtr(ctx, floatingIP, ip, ptr any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeDNSPtr", reflect.TypeOf((*MockFloatingIPClient)(nil).ChangeDNSPtr), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeDNSPtr", reflect.TypeOf((*MockFloatingIPClient)(nil).ChangeDNSPtr), ctx, floatingIP, ip, ptr) } // ChangeProtection mocks base method. -func (m *MockFloatingIPClient) ChangeProtection(arg0 context.Context, arg1 *hcloud.FloatingIP, arg2 hcloud.FloatingIPChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockFloatingIPClient) ChangeProtection(ctx context.Context, floatingIP *hcloud.FloatingIP, opts hcloud.FloatingIPChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeProtection", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ChangeProtection", ctx, floatingIP, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -108,15 +114,15 @@ func (m *MockFloatingIPClient) ChangeProtection(arg0 context.Context, arg1 *hclo } // ChangeProtection indicates an expected call of ChangeProtection. -func (mr *MockFloatingIPClientMockRecorder) ChangeProtection(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockFloatingIPClientMockRecorder) ChangeProtection(ctx, floatingIP, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeProtection", reflect.TypeOf((*MockFloatingIPClient)(nil).ChangeProtection), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeProtection", reflect.TypeOf((*MockFloatingIPClient)(nil).ChangeProtection), ctx, floatingIP, opts) } // Create mocks base method. -func (m *MockFloatingIPClient) Create(arg0 context.Context, arg1 hcloud.FloatingIPCreateOpts) (hcloud.FloatingIPCreateResult, *hcloud.Response, error) { +func (m *MockFloatingIPClient) Create(ctx context.Context, opts hcloud.FloatingIPCreateOpts) (hcloud.FloatingIPCreateResult, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Create", arg0, arg1) + ret := m.ctrl.Call(m, "Create", ctx, opts) ret0, _ := ret[0].(hcloud.FloatingIPCreateResult) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -124,30 +130,30 @@ func (m *MockFloatingIPClient) Create(arg0 context.Context, arg1 hcloud.Floating } // Create indicates an expected call of Create. -func (mr *MockFloatingIPClientMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockFloatingIPClientMockRecorder) Create(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFloatingIPClient)(nil).Create), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFloatingIPClient)(nil).Create), ctx, opts) } // Delete mocks base method. -func (m *MockFloatingIPClient) Delete(arg0 context.Context, arg1 *hcloud.FloatingIP) (*hcloud.Response, error) { +func (m *MockFloatingIPClient) Delete(ctx context.Context, floatingIP *hcloud.FloatingIP) (*hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0, arg1) + ret := m.ctrl.Call(m, "Delete", ctx, floatingIP) ret0, _ := ret[0].(*hcloud.Response) ret1, _ := ret[1].(error) return ret0, ret1 } // Delete indicates an expected call of Delete. -func (mr *MockFloatingIPClientMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockFloatingIPClientMockRecorder) Delete(ctx, floatingIP any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockFloatingIPClient)(nil).Delete), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockFloatingIPClient)(nil).Delete), ctx, floatingIP) } // Get mocks base method. -func (m *MockFloatingIPClient) Get(arg0 context.Context, arg1 string) (*hcloud.FloatingIP, *hcloud.Response, error) { +func (m *MockFloatingIPClient) Get(ctx context.Context, idOrName string) (*hcloud.FloatingIP, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.FloatingIP) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -155,15 +161,15 @@ func (m *MockFloatingIPClient) Get(arg0 context.Context, arg1 string) (*hcloud.F } // Get indicates an expected call of Get. -func (mr *MockFloatingIPClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockFloatingIPClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockFloatingIPClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockFloatingIPClient)(nil).Get), ctx, idOrName) } // GetByID mocks base method. -func (m *MockFloatingIPClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.FloatingIP, *hcloud.Response, error) { +func (m *MockFloatingIPClient) GetByID(ctx context.Context, id int64) (*hcloud.FloatingIP, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.FloatingIP) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -171,15 +177,15 @@ func (m *MockFloatingIPClient) GetByID(arg0 context.Context, arg1 int64) (*hclou } // GetByID indicates an expected call of GetByID. -func (mr *MockFloatingIPClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockFloatingIPClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockFloatingIPClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockFloatingIPClient)(nil).GetByID), ctx, id) } // GetByName mocks base method. -func (m *MockFloatingIPClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.FloatingIP, *hcloud.Response, error) { +func (m *MockFloatingIPClient) GetByName(ctx context.Context, name string) (*hcloud.FloatingIP, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.FloatingIP) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -187,29 +193,29 @@ func (m *MockFloatingIPClient) GetByName(arg0 context.Context, arg1 string) (*hc } // GetByName indicates an expected call of GetByName. -func (mr *MockFloatingIPClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockFloatingIPClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockFloatingIPClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockFloatingIPClient)(nil).GetByName), ctx, name) } // LabelKeys mocks base method. -func (m *MockFloatingIPClient) LabelKeys(arg0 string) []string { +func (m *MockFloatingIPClient) LabelKeys(idOrName string) []string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LabelKeys", arg0) + ret := m.ctrl.Call(m, "LabelKeys", idOrName) ret0, _ := ret[0].([]string) return ret0 } // LabelKeys indicates an expected call of LabelKeys. -func (mr *MockFloatingIPClientMockRecorder) LabelKeys(arg0 interface{}) *gomock.Call { +func (mr *MockFloatingIPClientMockRecorder) LabelKeys(idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockFloatingIPClient)(nil).LabelKeys), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockFloatingIPClient)(nil).LabelKeys), idOrName) } // List mocks base method. -func (m *MockFloatingIPClient) List(arg0 context.Context, arg1 hcloud.FloatingIPListOpts) ([]*hcloud.FloatingIP, *hcloud.Response, error) { +func (m *MockFloatingIPClient) List(ctx context.Context, opts hcloud.FloatingIPListOpts) ([]*hcloud.FloatingIP, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.FloatingIP) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -217,9 +223,9 @@ func (m *MockFloatingIPClient) List(arg0 context.Context, arg1 hcloud.FloatingIP } // List indicates an expected call of List. -func (mr *MockFloatingIPClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockFloatingIPClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockFloatingIPClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockFloatingIPClient)(nil).List), ctx, opts) } // Names mocks base method. @@ -237,9 +243,9 @@ func (mr *MockFloatingIPClientMockRecorder) Names() *gomock.Call { } // Unassign mocks base method. -func (m *MockFloatingIPClient) Unassign(arg0 context.Context, arg1 *hcloud.FloatingIP) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockFloatingIPClient) Unassign(ctx context.Context, floatingIP *hcloud.FloatingIP) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Unassign", arg0, arg1) + ret := m.ctrl.Call(m, "Unassign", ctx, floatingIP) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -247,15 +253,15 @@ func (m *MockFloatingIPClient) Unassign(arg0 context.Context, arg1 *hcloud.Float } // Unassign indicates an expected call of Unassign. -func (mr *MockFloatingIPClientMockRecorder) Unassign(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockFloatingIPClientMockRecorder) Unassign(ctx, floatingIP any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unassign", reflect.TypeOf((*MockFloatingIPClient)(nil).Unassign), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unassign", reflect.TypeOf((*MockFloatingIPClient)(nil).Unassign), ctx, floatingIP) } // Update mocks base method. -func (m *MockFloatingIPClient) Update(arg0 context.Context, arg1 *hcloud.FloatingIP, arg2 hcloud.FloatingIPUpdateOpts) (*hcloud.FloatingIP, *hcloud.Response, error) { +func (m *MockFloatingIPClient) Update(ctx context.Context, floatingIP *hcloud.FloatingIP, opts hcloud.FloatingIPUpdateOpts) (*hcloud.FloatingIP, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Update", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Update", ctx, floatingIP, opts) ret0, _ := ret[0].(*hcloud.FloatingIP) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -263,7 +269,7 @@ func (m *MockFloatingIPClient) Update(arg0 context.Context, arg1 *hcloud.Floatin } // Update indicates an expected call of Update. -func (mr *MockFloatingIPClientMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockFloatingIPClientMockRecorder) Update(ctx, floatingIP, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockFloatingIPClient)(nil).Update), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockFloatingIPClient)(nil).Update), ctx, floatingIP, opts) } diff --git a/internal/hcapi2/mock/zz_image_client_mock.go b/internal/hcapi2/mock/zz_image_client_mock.go index ead32cc2..23f50dbd 100644 --- a/internal/hcapi2/mock/zz_image_client_mock.go +++ b/internal/hcapi2/mock/zz_image_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: ImageClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_image_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 ImageClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockImageClient is a mock of ImageClient interface. type MockImageClient struct { ctrl *gomock.Controller recorder *MockImageClientMockRecorder + isgomock struct{} } // MockImageClientMockRecorder is the mock recorder for MockImageClient. @@ -36,39 +42,39 @@ func (m *MockImageClient) EXPECT() *MockImageClientMockRecorder { } // All mocks base method. -func (m *MockImageClient) All(arg0 context.Context) ([]*hcloud.Image, error) { +func (m *MockImageClient) All(ctx context.Context) ([]*hcloud.Image, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.Image) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockImageClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockImageClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockImageClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockImageClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockImageClient) AllWithOpts(arg0 context.Context, arg1 hcloud.ImageListOpts) ([]*hcloud.Image, error) { +func (m *MockImageClient) AllWithOpts(ctx context.Context, opts hcloud.ImageListOpts) ([]*hcloud.Image, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.Image) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockImageClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockImageClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockImageClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockImageClient)(nil).AllWithOpts), ctx, opts) } // ChangeProtection mocks base method. -func (m *MockImageClient) ChangeProtection(arg0 context.Context, arg1 *hcloud.Image, arg2 hcloud.ImageChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockImageClient) ChangeProtection(ctx context.Context, image *hcloud.Image, opts hcloud.ImageChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeProtection", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ChangeProtection", ctx, image, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -76,30 +82,30 @@ func (m *MockImageClient) ChangeProtection(arg0 context.Context, arg1 *hcloud.Im } // ChangeProtection indicates an expected call of ChangeProtection. -func (mr *MockImageClientMockRecorder) ChangeProtection(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockImageClientMockRecorder) ChangeProtection(ctx, image, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeProtection", reflect.TypeOf((*MockImageClient)(nil).ChangeProtection), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeProtection", reflect.TypeOf((*MockImageClient)(nil).ChangeProtection), ctx, image, opts) } // Delete mocks base method. -func (m *MockImageClient) Delete(arg0 context.Context, arg1 *hcloud.Image) (*hcloud.Response, error) { +func (m *MockImageClient) Delete(ctx context.Context, image *hcloud.Image) (*hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0, arg1) + ret := m.ctrl.Call(m, "Delete", ctx, image) ret0, _ := ret[0].(*hcloud.Response) ret1, _ := ret[1].(error) return ret0, ret1 } // Delete indicates an expected call of Delete. -func (mr *MockImageClientMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockImageClientMockRecorder) Delete(ctx, image any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockImageClient)(nil).Delete), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockImageClient)(nil).Delete), ctx, image) } // Get mocks base method. -func (m *MockImageClient) Get(arg0 context.Context, arg1 string) (*hcloud.Image, *hcloud.Response, error) { +func (m *MockImageClient) Get(ctx context.Context, idOrName string) (*hcloud.Image, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.Image) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -107,15 +113,15 @@ func (m *MockImageClient) Get(arg0 context.Context, arg1 string) (*hcloud.Image, } // Get indicates an expected call of Get. -func (mr *MockImageClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockImageClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockImageClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockImageClient)(nil).Get), ctx, idOrName) } // GetByID mocks base method. -func (m *MockImageClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.Image, *hcloud.Response, error) { +func (m *MockImageClient) GetByID(ctx context.Context, id int64) (*hcloud.Image, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.Image) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -123,15 +129,15 @@ func (m *MockImageClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.Ima } // GetByID indicates an expected call of GetByID. -func (mr *MockImageClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockImageClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockImageClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockImageClient)(nil).GetByID), ctx, id) } // GetByName mocks base method. -func (m *MockImageClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.Image, *hcloud.Response, error) { +func (m *MockImageClient) GetByName(ctx context.Context, name string) (*hcloud.Image, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.Image) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -139,15 +145,15 @@ func (m *MockImageClient) GetByName(arg0 context.Context, arg1 string) (*hcloud. } // GetByName indicates an expected call of GetByName. -func (mr *MockImageClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockImageClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockImageClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockImageClient)(nil).GetByName), ctx, name) } // GetByNameAndArchitecture mocks base method. -func (m *MockImageClient) GetByNameAndArchitecture(arg0 context.Context, arg1 string, arg2 hcloud.Architecture) (*hcloud.Image, *hcloud.Response, error) { +func (m *MockImageClient) GetByNameAndArchitecture(ctx context.Context, name string, architecture hcloud.Architecture) (*hcloud.Image, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByNameAndArchitecture", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "GetByNameAndArchitecture", ctx, name, architecture) ret0, _ := ret[0].(*hcloud.Image) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -155,15 +161,15 @@ func (m *MockImageClient) GetByNameAndArchitecture(arg0 context.Context, arg1 st } // GetByNameAndArchitecture indicates an expected call of GetByNameAndArchitecture. -func (mr *MockImageClientMockRecorder) GetByNameAndArchitecture(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockImageClientMockRecorder) GetByNameAndArchitecture(ctx, name, architecture any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByNameAndArchitecture", reflect.TypeOf((*MockImageClient)(nil).GetByNameAndArchitecture), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByNameAndArchitecture", reflect.TypeOf((*MockImageClient)(nil).GetByNameAndArchitecture), ctx, name, architecture) } // GetForArchitecture mocks base method. -func (m *MockImageClient) GetForArchitecture(arg0 context.Context, arg1 string, arg2 hcloud.Architecture) (*hcloud.Image, *hcloud.Response, error) { +func (m *MockImageClient) GetForArchitecture(ctx context.Context, idOrName string, architecture hcloud.Architecture) (*hcloud.Image, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetForArchitecture", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "GetForArchitecture", ctx, idOrName, architecture) ret0, _ := ret[0].(*hcloud.Image) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -171,9 +177,9 @@ func (m *MockImageClient) GetForArchitecture(arg0 context.Context, arg1 string, } // GetForArchitecture indicates an expected call of GetForArchitecture. -func (mr *MockImageClientMockRecorder) GetForArchitecture(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockImageClientMockRecorder) GetForArchitecture(ctx, idOrName, architecture any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetForArchitecture", reflect.TypeOf((*MockImageClient)(nil).GetForArchitecture), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetForArchitecture", reflect.TypeOf((*MockImageClient)(nil).GetForArchitecture), ctx, idOrName, architecture) } // LabelKeys mocks base method. @@ -185,15 +191,15 @@ func (m *MockImageClient) LabelKeys(arg0 string) []string { } // LabelKeys indicates an expected call of LabelKeys. -func (mr *MockImageClientMockRecorder) LabelKeys(arg0 interface{}) *gomock.Call { +func (mr *MockImageClientMockRecorder) LabelKeys(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockImageClient)(nil).LabelKeys), arg0) } // List mocks base method. -func (m *MockImageClient) List(arg0 context.Context, arg1 hcloud.ImageListOpts) ([]*hcloud.Image, *hcloud.Response, error) { +func (m *MockImageClient) List(ctx context.Context, opts hcloud.ImageListOpts) ([]*hcloud.Image, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.Image) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -201,9 +207,9 @@ func (m *MockImageClient) List(arg0 context.Context, arg1 hcloud.ImageListOpts) } // List indicates an expected call of List. -func (mr *MockImageClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockImageClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockImageClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockImageClient)(nil).List), ctx, opts) } // Names mocks base method. @@ -221,9 +227,9 @@ func (mr *MockImageClientMockRecorder) Names() *gomock.Call { } // Update mocks base method. -func (m *MockImageClient) Update(arg0 context.Context, arg1 *hcloud.Image, arg2 hcloud.ImageUpdateOpts) (*hcloud.Image, *hcloud.Response, error) { +func (m *MockImageClient) Update(ctx context.Context, image *hcloud.Image, opts hcloud.ImageUpdateOpts) (*hcloud.Image, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Update", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Update", ctx, image, opts) ret0, _ := ret[0].(*hcloud.Image) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -231,7 +237,7 @@ func (m *MockImageClient) Update(arg0 context.Context, arg1 *hcloud.Image, arg2 } // Update indicates an expected call of Update. -func (mr *MockImageClientMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockImageClientMockRecorder) Update(ctx, image, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockImageClient)(nil).Update), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockImageClient)(nil).Update), ctx, image, opts) } diff --git a/internal/hcapi2/mock/zz_iso_client_mock.go b/internal/hcapi2/mock/zz_iso_client_mock.go index f20d1110..be4ca148 100644 --- a/internal/hcapi2/mock/zz_iso_client_mock.go +++ b/internal/hcapi2/mock/zz_iso_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: ISOClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_iso_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 ISOClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockISOClient is a mock of ISOClient interface. type MockISOClient struct { ctrl *gomock.Controller recorder *MockISOClientMockRecorder + isgomock struct{} } // MockISOClientMockRecorder is the mock recorder for MockISOClient. @@ -36,39 +42,39 @@ func (m *MockISOClient) EXPECT() *MockISOClientMockRecorder { } // All mocks base method. -func (m *MockISOClient) All(arg0 context.Context) ([]*hcloud.ISO, error) { +func (m *MockISOClient) All(ctx context.Context) ([]*hcloud.ISO, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.ISO) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockISOClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockISOClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockISOClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockISOClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockISOClient) AllWithOpts(arg0 context.Context, arg1 hcloud.ISOListOpts) ([]*hcloud.ISO, error) { +func (m *MockISOClient) AllWithOpts(ctx context.Context, opts hcloud.ISOListOpts) ([]*hcloud.ISO, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.ISO) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockISOClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockISOClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockISOClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockISOClient)(nil).AllWithOpts), ctx, opts) } // Get mocks base method. -func (m *MockISOClient) Get(arg0 context.Context, arg1 string) (*hcloud.ISO, *hcloud.Response, error) { +func (m *MockISOClient) Get(ctx context.Context, idOrName string) (*hcloud.ISO, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.ISO) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -76,15 +82,15 @@ func (m *MockISOClient) Get(arg0 context.Context, arg1 string) (*hcloud.ISO, *hc } // Get indicates an expected call of Get. -func (mr *MockISOClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockISOClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockISOClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockISOClient)(nil).Get), ctx, idOrName) } // GetByID mocks base method. -func (m *MockISOClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.ISO, *hcloud.Response, error) { +func (m *MockISOClient) GetByID(ctx context.Context, id int64) (*hcloud.ISO, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.ISO) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -92,15 +98,15 @@ func (m *MockISOClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.ISO, } // GetByID indicates an expected call of GetByID. -func (mr *MockISOClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockISOClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockISOClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockISOClient)(nil).GetByID), ctx, id) } // GetByName mocks base method. -func (m *MockISOClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.ISO, *hcloud.Response, error) { +func (m *MockISOClient) GetByName(ctx context.Context, name string) (*hcloud.ISO, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.ISO) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -108,15 +114,15 @@ func (m *MockISOClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.IS } // GetByName indicates an expected call of GetByName. -func (mr *MockISOClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockISOClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockISOClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockISOClient)(nil).GetByName), ctx, name) } // List mocks base method. -func (m *MockISOClient) List(arg0 context.Context, arg1 hcloud.ISOListOpts) ([]*hcloud.ISO, *hcloud.Response, error) { +func (m *MockISOClient) List(ctx context.Context, opts hcloud.ISOListOpts) ([]*hcloud.ISO, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.ISO) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -124,9 +130,9 @@ func (m *MockISOClient) List(arg0 context.Context, arg1 hcloud.ISOListOpts) ([]* } // List indicates an expected call of List. -func (mr *MockISOClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockISOClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockISOClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockISOClient)(nil).List), ctx, opts) } // Names mocks base method. diff --git a/internal/hcapi2/mock/zz_loadbalancer_client_mock.go b/internal/hcapi2/mock/zz_loadbalancer_client_mock.go index bd1180ad..f868884e 100644 --- a/internal/hcapi2/mock/zz_loadbalancer_client_mock.go +++ b/internal/hcapi2/mock/zz_loadbalancer_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: LoadBalancerClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_loadbalancer_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 LoadBalancerClient +// // Package mock is a generated GoMock package. package mock @@ -9,14 +14,15 @@ import ( net "net" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockLoadBalancerClient is a mock of LoadBalancerClient interface. type MockLoadBalancerClient struct { ctrl *gomock.Controller recorder *MockLoadBalancerClientMockRecorder + isgomock struct{} } // MockLoadBalancerClientMockRecorder is the mock recorder for MockLoadBalancerClient. @@ -37,9 +43,9 @@ func (m *MockLoadBalancerClient) EXPECT() *MockLoadBalancerClientMockRecorder { } // AddIPTarget mocks base method. -func (m *MockLoadBalancerClient) AddIPTarget(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 hcloud.LoadBalancerAddIPTargetOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) AddIPTarget(ctx context.Context, loadBalancer *hcloud.LoadBalancer, opts hcloud.LoadBalancerAddIPTargetOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddIPTarget", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddIPTarget", ctx, loadBalancer, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -47,15 +53,15 @@ func (m *MockLoadBalancerClient) AddIPTarget(arg0 context.Context, arg1 *hcloud. } // AddIPTarget indicates an expected call of AddIPTarget. -func (mr *MockLoadBalancerClientMockRecorder) AddIPTarget(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) AddIPTarget(ctx, loadBalancer, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddIPTarget", reflect.TypeOf((*MockLoadBalancerClient)(nil).AddIPTarget), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddIPTarget", reflect.TypeOf((*MockLoadBalancerClient)(nil).AddIPTarget), ctx, loadBalancer, opts) } // AddLabelSelectorTarget mocks base method. -func (m *MockLoadBalancerClient) AddLabelSelectorTarget(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 hcloud.LoadBalancerAddLabelSelectorTargetOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) AddLabelSelectorTarget(ctx context.Context, loadBalancer *hcloud.LoadBalancer, opts hcloud.LoadBalancerAddLabelSelectorTargetOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddLabelSelectorTarget", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddLabelSelectorTarget", ctx, loadBalancer, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -63,15 +69,15 @@ func (m *MockLoadBalancerClient) AddLabelSelectorTarget(arg0 context.Context, ar } // AddLabelSelectorTarget indicates an expected call of AddLabelSelectorTarget. -func (mr *MockLoadBalancerClientMockRecorder) AddLabelSelectorTarget(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) AddLabelSelectorTarget(ctx, loadBalancer, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLabelSelectorTarget", reflect.TypeOf((*MockLoadBalancerClient)(nil).AddLabelSelectorTarget), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLabelSelectorTarget", reflect.TypeOf((*MockLoadBalancerClient)(nil).AddLabelSelectorTarget), ctx, loadBalancer, opts) } // AddServerTarget mocks base method. -func (m *MockLoadBalancerClient) AddServerTarget(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 hcloud.LoadBalancerAddServerTargetOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) AddServerTarget(ctx context.Context, loadBalancer *hcloud.LoadBalancer, opts hcloud.LoadBalancerAddServerTargetOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddServerTarget", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddServerTarget", ctx, loadBalancer, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -79,15 +85,15 @@ func (m *MockLoadBalancerClient) AddServerTarget(arg0 context.Context, arg1 *hcl } // AddServerTarget indicates an expected call of AddServerTarget. -func (mr *MockLoadBalancerClientMockRecorder) AddServerTarget(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) AddServerTarget(ctx, loadBalancer, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddServerTarget", reflect.TypeOf((*MockLoadBalancerClient)(nil).AddServerTarget), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddServerTarget", reflect.TypeOf((*MockLoadBalancerClient)(nil).AddServerTarget), ctx, loadBalancer, opts) } // AddService mocks base method. -func (m *MockLoadBalancerClient) AddService(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 hcloud.LoadBalancerAddServiceOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) AddService(ctx context.Context, loadBalancer *hcloud.LoadBalancer, opts hcloud.LoadBalancerAddServiceOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddService", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddService", ctx, loadBalancer, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -95,45 +101,45 @@ func (m *MockLoadBalancerClient) AddService(arg0 context.Context, arg1 *hcloud.L } // AddService indicates an expected call of AddService. -func (mr *MockLoadBalancerClientMockRecorder) AddService(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) AddService(ctx, loadBalancer, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddService", reflect.TypeOf((*MockLoadBalancerClient)(nil).AddService), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddService", reflect.TypeOf((*MockLoadBalancerClient)(nil).AddService), ctx, loadBalancer, opts) } // All mocks base method. -func (m *MockLoadBalancerClient) All(arg0 context.Context) ([]*hcloud.LoadBalancer, error) { +func (m *MockLoadBalancerClient) All(ctx context.Context) ([]*hcloud.LoadBalancer, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.LoadBalancer) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockLoadBalancerClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockLoadBalancerClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockLoadBalancerClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockLoadBalancerClient) AllWithOpts(arg0 context.Context, arg1 hcloud.LoadBalancerListOpts) ([]*hcloud.LoadBalancer, error) { +func (m *MockLoadBalancerClient) AllWithOpts(ctx context.Context, opts hcloud.LoadBalancerListOpts) ([]*hcloud.LoadBalancer, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.LoadBalancer) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockLoadBalancerClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockLoadBalancerClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockLoadBalancerClient)(nil).AllWithOpts), ctx, opts) } // AttachToNetwork mocks base method. -func (m *MockLoadBalancerClient) AttachToNetwork(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 hcloud.LoadBalancerAttachToNetworkOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) AttachToNetwork(ctx context.Context, loadBalancer *hcloud.LoadBalancer, opts hcloud.LoadBalancerAttachToNetworkOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AttachToNetwork", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AttachToNetwork", ctx, loadBalancer, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -141,15 +147,15 @@ func (m *MockLoadBalancerClient) AttachToNetwork(arg0 context.Context, arg1 *hcl } // AttachToNetwork indicates an expected call of AttachToNetwork. -func (mr *MockLoadBalancerClientMockRecorder) AttachToNetwork(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) AttachToNetwork(ctx, loadBalancer, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachToNetwork", reflect.TypeOf((*MockLoadBalancerClient)(nil).AttachToNetwork), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachToNetwork", reflect.TypeOf((*MockLoadBalancerClient)(nil).AttachToNetwork), ctx, loadBalancer, opts) } // ChangeAlgorithm mocks base method. -func (m *MockLoadBalancerClient) ChangeAlgorithm(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 hcloud.LoadBalancerChangeAlgorithmOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) ChangeAlgorithm(ctx context.Context, loadBalancer *hcloud.LoadBalancer, opts hcloud.LoadBalancerChangeAlgorithmOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeAlgorithm", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ChangeAlgorithm", ctx, loadBalancer, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -157,15 +163,15 @@ func (m *MockLoadBalancerClient) ChangeAlgorithm(arg0 context.Context, arg1 *hcl } // ChangeAlgorithm indicates an expected call of ChangeAlgorithm. -func (mr *MockLoadBalancerClientMockRecorder) ChangeAlgorithm(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) ChangeAlgorithm(ctx, loadBalancer, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeAlgorithm", reflect.TypeOf((*MockLoadBalancerClient)(nil).ChangeAlgorithm), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeAlgorithm", reflect.TypeOf((*MockLoadBalancerClient)(nil).ChangeAlgorithm), ctx, loadBalancer, opts) } // ChangeDNSPtr mocks base method. -func (m *MockLoadBalancerClient) ChangeDNSPtr(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 string, arg3 *string) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) ChangeDNSPtr(ctx context.Context, lb *hcloud.LoadBalancer, ip string, ptr *string) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeDNSPtr", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "ChangeDNSPtr", ctx, lb, ip, ptr) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -173,15 +179,15 @@ func (m *MockLoadBalancerClient) ChangeDNSPtr(arg0 context.Context, arg1 *hcloud } // ChangeDNSPtr indicates an expected call of ChangeDNSPtr. -func (mr *MockLoadBalancerClientMockRecorder) ChangeDNSPtr(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) ChangeDNSPtr(ctx, lb, ip, ptr any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeDNSPtr", reflect.TypeOf((*MockLoadBalancerClient)(nil).ChangeDNSPtr), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeDNSPtr", reflect.TypeOf((*MockLoadBalancerClient)(nil).ChangeDNSPtr), ctx, lb, ip, ptr) } // ChangeProtection mocks base method. -func (m *MockLoadBalancerClient) ChangeProtection(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 hcloud.LoadBalancerChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) ChangeProtection(ctx context.Context, loadBalancer *hcloud.LoadBalancer, opts hcloud.LoadBalancerChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeProtection", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ChangeProtection", ctx, loadBalancer, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -189,15 +195,15 @@ func (m *MockLoadBalancerClient) ChangeProtection(arg0 context.Context, arg1 *hc } // ChangeProtection indicates an expected call of ChangeProtection. -func (mr *MockLoadBalancerClientMockRecorder) ChangeProtection(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) ChangeProtection(ctx, loadBalancer, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeProtection", reflect.TypeOf((*MockLoadBalancerClient)(nil).ChangeProtection), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeProtection", reflect.TypeOf((*MockLoadBalancerClient)(nil).ChangeProtection), ctx, loadBalancer, opts) } // ChangeType mocks base method. -func (m *MockLoadBalancerClient) ChangeType(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 hcloud.LoadBalancerChangeTypeOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) ChangeType(ctx context.Context, loadBalancer *hcloud.LoadBalancer, opts hcloud.LoadBalancerChangeTypeOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeType", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ChangeType", ctx, loadBalancer, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -205,15 +211,15 @@ func (m *MockLoadBalancerClient) ChangeType(arg0 context.Context, arg1 *hcloud.L } // ChangeType indicates an expected call of ChangeType. -func (mr *MockLoadBalancerClientMockRecorder) ChangeType(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) ChangeType(ctx, loadBalancer, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeType", reflect.TypeOf((*MockLoadBalancerClient)(nil).ChangeType), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeType", reflect.TypeOf((*MockLoadBalancerClient)(nil).ChangeType), ctx, loadBalancer, opts) } // Create mocks base method. -func (m *MockLoadBalancerClient) Create(arg0 context.Context, arg1 hcloud.LoadBalancerCreateOpts) (hcloud.LoadBalancerCreateResult, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) Create(ctx context.Context, opts hcloud.LoadBalancerCreateOpts) (hcloud.LoadBalancerCreateResult, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Create", arg0, arg1) + ret := m.ctrl.Call(m, "Create", ctx, opts) ret0, _ := ret[0].(hcloud.LoadBalancerCreateResult) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -221,30 +227,30 @@ func (m *MockLoadBalancerClient) Create(arg0 context.Context, arg1 hcloud.LoadBa } // Create indicates an expected call of Create. -func (mr *MockLoadBalancerClientMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) Create(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockLoadBalancerClient)(nil).Create), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockLoadBalancerClient)(nil).Create), ctx, opts) } // Delete mocks base method. -func (m *MockLoadBalancerClient) Delete(arg0 context.Context, arg1 *hcloud.LoadBalancer) (*hcloud.Response, error) { +func (m *MockLoadBalancerClient) Delete(ctx context.Context, loadBalancer *hcloud.LoadBalancer) (*hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0, arg1) + ret := m.ctrl.Call(m, "Delete", ctx, loadBalancer) ret0, _ := ret[0].(*hcloud.Response) ret1, _ := ret[1].(error) return ret0, ret1 } // Delete indicates an expected call of Delete. -func (mr *MockLoadBalancerClientMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) Delete(ctx, loadBalancer any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockLoadBalancerClient)(nil).Delete), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockLoadBalancerClient)(nil).Delete), ctx, loadBalancer) } // DeleteService mocks base method. -func (m *MockLoadBalancerClient) DeleteService(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 int) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) DeleteService(ctx context.Context, loadBalancer *hcloud.LoadBalancer, listenPort int) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteService", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "DeleteService", ctx, loadBalancer, listenPort) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -252,15 +258,15 @@ func (m *MockLoadBalancerClient) DeleteService(arg0 context.Context, arg1 *hclou } // DeleteService indicates an expected call of DeleteService. -func (mr *MockLoadBalancerClientMockRecorder) DeleteService(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) DeleteService(ctx, loadBalancer, listenPort any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteService", reflect.TypeOf((*MockLoadBalancerClient)(nil).DeleteService), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteService", reflect.TypeOf((*MockLoadBalancerClient)(nil).DeleteService), ctx, loadBalancer, listenPort) } // DetachFromNetwork mocks base method. -func (m *MockLoadBalancerClient) DetachFromNetwork(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 hcloud.LoadBalancerDetachFromNetworkOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) DetachFromNetwork(ctx context.Context, loadBalancer *hcloud.LoadBalancer, opts hcloud.LoadBalancerDetachFromNetworkOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DetachFromNetwork", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "DetachFromNetwork", ctx, loadBalancer, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -268,15 +274,15 @@ func (m *MockLoadBalancerClient) DetachFromNetwork(arg0 context.Context, arg1 *h } // DetachFromNetwork indicates an expected call of DetachFromNetwork. -func (mr *MockLoadBalancerClientMockRecorder) DetachFromNetwork(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) DetachFromNetwork(ctx, loadBalancer, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachFromNetwork", reflect.TypeOf((*MockLoadBalancerClient)(nil).DetachFromNetwork), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachFromNetwork", reflect.TypeOf((*MockLoadBalancerClient)(nil).DetachFromNetwork), ctx, loadBalancer, opts) } // DisablePublicInterface mocks base method. -func (m *MockLoadBalancerClient) DisablePublicInterface(arg0 context.Context, arg1 *hcloud.LoadBalancer) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) DisablePublicInterface(ctx context.Context, loadBalancer *hcloud.LoadBalancer) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DisablePublicInterface", arg0, arg1) + ret := m.ctrl.Call(m, "DisablePublicInterface", ctx, loadBalancer) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -284,15 +290,15 @@ func (m *MockLoadBalancerClient) DisablePublicInterface(arg0 context.Context, ar } // DisablePublicInterface indicates an expected call of DisablePublicInterface. -func (mr *MockLoadBalancerClientMockRecorder) DisablePublicInterface(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) DisablePublicInterface(ctx, loadBalancer any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisablePublicInterface", reflect.TypeOf((*MockLoadBalancerClient)(nil).DisablePublicInterface), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisablePublicInterface", reflect.TypeOf((*MockLoadBalancerClient)(nil).DisablePublicInterface), ctx, loadBalancer) } // EnablePublicInterface mocks base method. -func (m *MockLoadBalancerClient) EnablePublicInterface(arg0 context.Context, arg1 *hcloud.LoadBalancer) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) EnablePublicInterface(ctx context.Context, loadBalancer *hcloud.LoadBalancer) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnablePublicInterface", arg0, arg1) + ret := m.ctrl.Call(m, "EnablePublicInterface", ctx, loadBalancer) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -300,15 +306,15 @@ func (m *MockLoadBalancerClient) EnablePublicInterface(arg0 context.Context, arg } // EnablePublicInterface indicates an expected call of EnablePublicInterface. -func (mr *MockLoadBalancerClientMockRecorder) EnablePublicInterface(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) EnablePublicInterface(ctx, loadBalancer any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnablePublicInterface", reflect.TypeOf((*MockLoadBalancerClient)(nil).EnablePublicInterface), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnablePublicInterface", reflect.TypeOf((*MockLoadBalancerClient)(nil).EnablePublicInterface), ctx, loadBalancer) } // Get mocks base method. -func (m *MockLoadBalancerClient) Get(arg0 context.Context, arg1 string) (*hcloud.LoadBalancer, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) Get(ctx context.Context, idOrName string) (*hcloud.LoadBalancer, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.LoadBalancer) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -316,15 +322,15 @@ func (m *MockLoadBalancerClient) Get(arg0 context.Context, arg1 string) (*hcloud } // Get indicates an expected call of Get. -func (mr *MockLoadBalancerClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockLoadBalancerClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockLoadBalancerClient)(nil).Get), ctx, idOrName) } // GetByID mocks base method. -func (m *MockLoadBalancerClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.LoadBalancer, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) GetByID(ctx context.Context, id int64) (*hcloud.LoadBalancer, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.LoadBalancer) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -332,15 +338,15 @@ func (m *MockLoadBalancerClient) GetByID(arg0 context.Context, arg1 int64) (*hcl } // GetByID indicates an expected call of GetByID. -func (mr *MockLoadBalancerClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockLoadBalancerClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockLoadBalancerClient)(nil).GetByID), ctx, id) } // GetByName mocks base method. -func (m *MockLoadBalancerClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.LoadBalancer, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) GetByName(ctx context.Context, name string) (*hcloud.LoadBalancer, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.LoadBalancer) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -348,15 +354,15 @@ func (m *MockLoadBalancerClient) GetByName(arg0 context.Context, arg1 string) (* } // GetByName indicates an expected call of GetByName. -func (mr *MockLoadBalancerClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockLoadBalancerClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockLoadBalancerClient)(nil).GetByName), ctx, name) } // GetMetrics mocks base method. -func (m *MockLoadBalancerClient) GetMetrics(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 hcloud.LoadBalancerGetMetricsOpts) (*hcloud.LoadBalancerMetrics, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) GetMetrics(ctx context.Context, lb *hcloud.LoadBalancer, opts hcloud.LoadBalancerGetMetricsOpts) (*hcloud.LoadBalancerMetrics, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetMetrics", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "GetMetrics", ctx, lb, opts) ret0, _ := ret[0].(*hcloud.LoadBalancerMetrics) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -364,9 +370,9 @@ func (m *MockLoadBalancerClient) GetMetrics(arg0 context.Context, arg1 *hcloud.L } // GetMetrics indicates an expected call of GetMetrics. -func (mr *MockLoadBalancerClientMockRecorder) GetMetrics(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) GetMetrics(ctx, lb, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetrics", reflect.TypeOf((*MockLoadBalancerClient)(nil).GetMetrics), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetrics", reflect.TypeOf((*MockLoadBalancerClient)(nil).GetMetrics), ctx, lb, opts) } // LabelKeys mocks base method. @@ -378,15 +384,15 @@ func (m *MockLoadBalancerClient) LabelKeys(arg0 string) []string { } // LabelKeys indicates an expected call of LabelKeys. -func (mr *MockLoadBalancerClientMockRecorder) LabelKeys(arg0 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) LabelKeys(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockLoadBalancerClient)(nil).LabelKeys), arg0) } // List mocks base method. -func (m *MockLoadBalancerClient) List(arg0 context.Context, arg1 hcloud.LoadBalancerListOpts) ([]*hcloud.LoadBalancer, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) List(ctx context.Context, opts hcloud.LoadBalancerListOpts) ([]*hcloud.LoadBalancer, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.LoadBalancer) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -394,23 +400,23 @@ func (m *MockLoadBalancerClient) List(arg0 context.Context, arg1 hcloud.LoadBala } // List indicates an expected call of List. -func (mr *MockLoadBalancerClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockLoadBalancerClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockLoadBalancerClient)(nil).List), ctx, opts) } // LoadBalancerName mocks base method. -func (m *MockLoadBalancerClient) LoadBalancerName(arg0 int64) string { +func (m *MockLoadBalancerClient) LoadBalancerName(id int64) string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LoadBalancerName", arg0) + ret := m.ctrl.Call(m, "LoadBalancerName", id) ret0, _ := ret[0].(string) return ret0 } // LoadBalancerName indicates an expected call of LoadBalancerName. -func (mr *MockLoadBalancerClientMockRecorder) LoadBalancerName(arg0 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) LoadBalancerName(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadBalancerName", reflect.TypeOf((*MockLoadBalancerClient)(nil).LoadBalancerName), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadBalancerName", reflect.TypeOf((*MockLoadBalancerClient)(nil).LoadBalancerName), id) } // Names mocks base method. @@ -428,9 +434,9 @@ func (mr *MockLoadBalancerClientMockRecorder) Names() *gomock.Call { } // RemoveIPTarget mocks base method. -func (m *MockLoadBalancerClient) RemoveIPTarget(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 net.IP) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) RemoveIPTarget(ctx context.Context, loadBalancer *hcloud.LoadBalancer, ip net.IP) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveIPTarget", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "RemoveIPTarget", ctx, loadBalancer, ip) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -438,15 +444,15 @@ func (m *MockLoadBalancerClient) RemoveIPTarget(arg0 context.Context, arg1 *hclo } // RemoveIPTarget indicates an expected call of RemoveIPTarget. -func (mr *MockLoadBalancerClientMockRecorder) RemoveIPTarget(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) RemoveIPTarget(ctx, loadBalancer, ip any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveIPTarget", reflect.TypeOf((*MockLoadBalancerClient)(nil).RemoveIPTarget), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveIPTarget", reflect.TypeOf((*MockLoadBalancerClient)(nil).RemoveIPTarget), ctx, loadBalancer, ip) } // RemoveLabelSelectorTarget mocks base method. -func (m *MockLoadBalancerClient) RemoveLabelSelectorTarget(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 string) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) RemoveLabelSelectorTarget(ctx context.Context, loadBalancer *hcloud.LoadBalancer, labelSelector string) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveLabelSelectorTarget", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "RemoveLabelSelectorTarget", ctx, loadBalancer, labelSelector) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -454,15 +460,15 @@ func (m *MockLoadBalancerClient) RemoveLabelSelectorTarget(arg0 context.Context, } // RemoveLabelSelectorTarget indicates an expected call of RemoveLabelSelectorTarget. -func (mr *MockLoadBalancerClientMockRecorder) RemoveLabelSelectorTarget(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) RemoveLabelSelectorTarget(ctx, loadBalancer, labelSelector any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveLabelSelectorTarget", reflect.TypeOf((*MockLoadBalancerClient)(nil).RemoveLabelSelectorTarget), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveLabelSelectorTarget", reflect.TypeOf((*MockLoadBalancerClient)(nil).RemoveLabelSelectorTarget), ctx, loadBalancer, labelSelector) } // RemoveServerTarget mocks base method. -func (m *MockLoadBalancerClient) RemoveServerTarget(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) RemoveServerTarget(ctx context.Context, loadBalancer *hcloud.LoadBalancer, server *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveServerTarget", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "RemoveServerTarget", ctx, loadBalancer, server) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -470,15 +476,15 @@ func (m *MockLoadBalancerClient) RemoveServerTarget(arg0 context.Context, arg1 * } // RemoveServerTarget indicates an expected call of RemoveServerTarget. -func (mr *MockLoadBalancerClientMockRecorder) RemoveServerTarget(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) RemoveServerTarget(ctx, loadBalancer, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveServerTarget", reflect.TypeOf((*MockLoadBalancerClient)(nil).RemoveServerTarget), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveServerTarget", reflect.TypeOf((*MockLoadBalancerClient)(nil).RemoveServerTarget), ctx, loadBalancer, server) } // Update mocks base method. -func (m *MockLoadBalancerClient) Update(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 hcloud.LoadBalancerUpdateOpts) (*hcloud.LoadBalancer, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) Update(ctx context.Context, loadBalancer *hcloud.LoadBalancer, opts hcloud.LoadBalancerUpdateOpts) (*hcloud.LoadBalancer, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Update", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Update", ctx, loadBalancer, opts) ret0, _ := ret[0].(*hcloud.LoadBalancer) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -486,15 +492,15 @@ func (m *MockLoadBalancerClient) Update(arg0 context.Context, arg1 *hcloud.LoadB } // Update indicates an expected call of Update. -func (mr *MockLoadBalancerClientMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) Update(ctx, loadBalancer, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockLoadBalancerClient)(nil).Update), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockLoadBalancerClient)(nil).Update), ctx, loadBalancer, opts) } // UpdateService mocks base method. -func (m *MockLoadBalancerClient) UpdateService(arg0 context.Context, arg1 *hcloud.LoadBalancer, arg2 int, arg3 hcloud.LoadBalancerUpdateServiceOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockLoadBalancerClient) UpdateService(ctx context.Context, loadBalancer *hcloud.LoadBalancer, listenPort int, opts hcloud.LoadBalancerUpdateServiceOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateService", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "UpdateService", ctx, loadBalancer, listenPort, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -502,7 +508,7 @@ func (m *MockLoadBalancerClient) UpdateService(arg0 context.Context, arg1 *hclou } // UpdateService indicates an expected call of UpdateService. -func (mr *MockLoadBalancerClientMockRecorder) UpdateService(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockLoadBalancerClientMockRecorder) UpdateService(ctx, loadBalancer, listenPort, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateService", reflect.TypeOf((*MockLoadBalancerClient)(nil).UpdateService), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateService", reflect.TypeOf((*MockLoadBalancerClient)(nil).UpdateService), ctx, loadBalancer, listenPort, opts) } diff --git a/internal/hcapi2/mock/zz_loadbalancer_type_client_mock.go b/internal/hcapi2/mock/zz_loadbalancer_type_client_mock.go index 161951c2..d0b9b78e 100644 --- a/internal/hcapi2/mock/zz_loadbalancer_type_client_mock.go +++ b/internal/hcapi2/mock/zz_loadbalancer_type_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: LoadBalancerTypeClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_loadbalancer_type_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 LoadBalancerTypeClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockLoadBalancerTypeClient is a mock of LoadBalancerTypeClient interface. type MockLoadBalancerTypeClient struct { ctrl *gomock.Controller recorder *MockLoadBalancerTypeClientMockRecorder + isgomock struct{} } // MockLoadBalancerTypeClientMockRecorder is the mock recorder for MockLoadBalancerTypeClient. @@ -36,39 +42,39 @@ func (m *MockLoadBalancerTypeClient) EXPECT() *MockLoadBalancerTypeClientMockRec } // All mocks base method. -func (m *MockLoadBalancerTypeClient) All(arg0 context.Context) ([]*hcloud.LoadBalancerType, error) { +func (m *MockLoadBalancerTypeClient) All(ctx context.Context) ([]*hcloud.LoadBalancerType, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.LoadBalancerType) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockLoadBalancerTypeClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockLoadBalancerTypeClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockLoadBalancerTypeClient) AllWithOpts(arg0 context.Context, arg1 hcloud.LoadBalancerTypeListOpts) ([]*hcloud.LoadBalancerType, error) { +func (m *MockLoadBalancerTypeClient) AllWithOpts(ctx context.Context, opts hcloud.LoadBalancerTypeListOpts) ([]*hcloud.LoadBalancerType, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.LoadBalancerType) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockLoadBalancerTypeClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLoadBalancerTypeClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).AllWithOpts), ctx, opts) } // Get mocks base method. -func (m *MockLoadBalancerTypeClient) Get(arg0 context.Context, arg1 string) (*hcloud.LoadBalancerType, *hcloud.Response, error) { +func (m *MockLoadBalancerTypeClient) Get(ctx context.Context, idOrName string) (*hcloud.LoadBalancerType, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.LoadBalancerType) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -76,15 +82,15 @@ func (m *MockLoadBalancerTypeClient) Get(arg0 context.Context, arg1 string) (*hc } // Get indicates an expected call of Get. -func (mr *MockLoadBalancerTypeClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLoadBalancerTypeClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).Get), ctx, idOrName) } // GetByID mocks base method. -func (m *MockLoadBalancerTypeClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.LoadBalancerType, *hcloud.Response, error) { +func (m *MockLoadBalancerTypeClient) GetByID(ctx context.Context, id int64) (*hcloud.LoadBalancerType, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.LoadBalancerType) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -92,15 +98,15 @@ func (m *MockLoadBalancerTypeClient) GetByID(arg0 context.Context, arg1 int64) ( } // GetByID indicates an expected call of GetByID. -func (mr *MockLoadBalancerTypeClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLoadBalancerTypeClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).GetByID), ctx, id) } // GetByName mocks base method. -func (m *MockLoadBalancerTypeClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.LoadBalancerType, *hcloud.Response, error) { +func (m *MockLoadBalancerTypeClient) GetByName(ctx context.Context, name string) (*hcloud.LoadBalancerType, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.LoadBalancerType) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -108,15 +114,15 @@ func (m *MockLoadBalancerTypeClient) GetByName(arg0 context.Context, arg1 string } // GetByName indicates an expected call of GetByName. -func (mr *MockLoadBalancerTypeClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLoadBalancerTypeClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).GetByName), ctx, name) } // List mocks base method. -func (m *MockLoadBalancerTypeClient) List(arg0 context.Context, arg1 hcloud.LoadBalancerTypeListOpts) ([]*hcloud.LoadBalancerType, *hcloud.Response, error) { +func (m *MockLoadBalancerTypeClient) List(ctx context.Context, opts hcloud.LoadBalancerTypeListOpts) ([]*hcloud.LoadBalancerType, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.LoadBalancerType) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -124,37 +130,37 @@ func (m *MockLoadBalancerTypeClient) List(arg0 context.Context, arg1 hcloud.Load } // List indicates an expected call of List. -func (mr *MockLoadBalancerTypeClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLoadBalancerTypeClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).List), ctx, opts) } // LoadBalancerTypeDescription mocks base method. -func (m *MockLoadBalancerTypeClient) LoadBalancerTypeDescription(arg0 int64) string { +func (m *MockLoadBalancerTypeClient) LoadBalancerTypeDescription(id int64) string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LoadBalancerTypeDescription", arg0) + ret := m.ctrl.Call(m, "LoadBalancerTypeDescription", id) ret0, _ := ret[0].(string) return ret0 } // LoadBalancerTypeDescription indicates an expected call of LoadBalancerTypeDescription. -func (mr *MockLoadBalancerTypeClientMockRecorder) LoadBalancerTypeDescription(arg0 interface{}) *gomock.Call { +func (mr *MockLoadBalancerTypeClientMockRecorder) LoadBalancerTypeDescription(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadBalancerTypeDescription", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).LoadBalancerTypeDescription), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadBalancerTypeDescription", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).LoadBalancerTypeDescription), id) } // LoadBalancerTypeName mocks base method. -func (m *MockLoadBalancerTypeClient) LoadBalancerTypeName(arg0 int64) string { +func (m *MockLoadBalancerTypeClient) LoadBalancerTypeName(id int64) string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LoadBalancerTypeName", arg0) + ret := m.ctrl.Call(m, "LoadBalancerTypeName", id) ret0, _ := ret[0].(string) return ret0 } // LoadBalancerTypeName indicates an expected call of LoadBalancerTypeName. -func (mr *MockLoadBalancerTypeClientMockRecorder) LoadBalancerTypeName(arg0 interface{}) *gomock.Call { +func (mr *MockLoadBalancerTypeClientMockRecorder) LoadBalancerTypeName(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadBalancerTypeName", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).LoadBalancerTypeName), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadBalancerTypeName", reflect.TypeOf((*MockLoadBalancerTypeClient)(nil).LoadBalancerTypeName), id) } // Names mocks base method. diff --git a/internal/hcapi2/mock/zz_location_client_mock.go b/internal/hcapi2/mock/zz_location_client_mock.go index 4f447c72..b6f3fab1 100644 --- a/internal/hcapi2/mock/zz_location_client_mock.go +++ b/internal/hcapi2/mock/zz_location_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: LocationClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_location_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 LocationClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockLocationClient is a mock of LocationClient interface. type MockLocationClient struct { ctrl *gomock.Controller recorder *MockLocationClientMockRecorder + isgomock struct{} } // MockLocationClientMockRecorder is the mock recorder for MockLocationClient. @@ -36,39 +42,39 @@ func (m *MockLocationClient) EXPECT() *MockLocationClientMockRecorder { } // All mocks base method. -func (m *MockLocationClient) All(arg0 context.Context) ([]*hcloud.Location, error) { +func (m *MockLocationClient) All(ctx context.Context) ([]*hcloud.Location, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.Location) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockLocationClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockLocationClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockLocationClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockLocationClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockLocationClient) AllWithOpts(arg0 context.Context, arg1 hcloud.LocationListOpts) ([]*hcloud.Location, error) { +func (m *MockLocationClient) AllWithOpts(ctx context.Context, opts hcloud.LocationListOpts) ([]*hcloud.Location, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.Location) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockLocationClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLocationClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockLocationClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockLocationClient)(nil).AllWithOpts), ctx, opts) } // Get mocks base method. -func (m *MockLocationClient) Get(arg0 context.Context, arg1 string) (*hcloud.Location, *hcloud.Response, error) { +func (m *MockLocationClient) Get(ctx context.Context, idOrName string) (*hcloud.Location, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.Location) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -76,15 +82,15 @@ func (m *MockLocationClient) Get(arg0 context.Context, arg1 string) (*hcloud.Loc } // Get indicates an expected call of Get. -func (mr *MockLocationClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLocationClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockLocationClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockLocationClient)(nil).Get), ctx, idOrName) } // GetByID mocks base method. -func (m *MockLocationClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.Location, *hcloud.Response, error) { +func (m *MockLocationClient) GetByID(ctx context.Context, id int64) (*hcloud.Location, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.Location) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -92,15 +98,15 @@ func (m *MockLocationClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud. } // GetByID indicates an expected call of GetByID. -func (mr *MockLocationClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLocationClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockLocationClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockLocationClient)(nil).GetByID), ctx, id) } // GetByName mocks base method. -func (m *MockLocationClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.Location, *hcloud.Response, error) { +func (m *MockLocationClient) GetByName(ctx context.Context, name string) (*hcloud.Location, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.Location) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -108,15 +114,15 @@ func (m *MockLocationClient) GetByName(arg0 context.Context, arg1 string) (*hclo } // GetByName indicates an expected call of GetByName. -func (mr *MockLocationClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLocationClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockLocationClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockLocationClient)(nil).GetByName), ctx, name) } // List mocks base method. -func (m *MockLocationClient) List(arg0 context.Context, arg1 hcloud.LocationListOpts) ([]*hcloud.Location, *hcloud.Response, error) { +func (m *MockLocationClient) List(ctx context.Context, opts hcloud.LocationListOpts) ([]*hcloud.Location, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.Location) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -124,9 +130,9 @@ func (m *MockLocationClient) List(arg0 context.Context, arg1 hcloud.LocationList } // List indicates an expected call of List. -func (mr *MockLocationClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockLocationClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockLocationClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockLocationClient)(nil).List), ctx, opts) } // Names mocks base method. diff --git a/internal/hcapi2/mock/zz_network_client_mock.go b/internal/hcapi2/mock/zz_network_client_mock.go index 0feb35c7..e07de1b5 100644 --- a/internal/hcapi2/mock/zz_network_client_mock.go +++ b/internal/hcapi2/mock/zz_network_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: NetworkClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_network_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 NetworkClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockNetworkClient is a mock of NetworkClient interface. type MockNetworkClient struct { ctrl *gomock.Controller recorder *MockNetworkClientMockRecorder + isgomock struct{} } // MockNetworkClientMockRecorder is the mock recorder for MockNetworkClient. @@ -36,9 +42,9 @@ func (m *MockNetworkClient) EXPECT() *MockNetworkClientMockRecorder { } // AddRoute mocks base method. -func (m *MockNetworkClient) AddRoute(arg0 context.Context, arg1 *hcloud.Network, arg2 hcloud.NetworkAddRouteOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockNetworkClient) AddRoute(ctx context.Context, network *hcloud.Network, opts hcloud.NetworkAddRouteOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddRoute", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddRoute", ctx, network, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -46,15 +52,15 @@ func (m *MockNetworkClient) AddRoute(arg0 context.Context, arg1 *hcloud.Network, } // AddRoute indicates an expected call of AddRoute. -func (mr *MockNetworkClientMockRecorder) AddRoute(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) AddRoute(ctx, network, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRoute", reflect.TypeOf((*MockNetworkClient)(nil).AddRoute), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRoute", reflect.TypeOf((*MockNetworkClient)(nil).AddRoute), ctx, network, opts) } // AddSubnet mocks base method. -func (m *MockNetworkClient) AddSubnet(arg0 context.Context, arg1 *hcloud.Network, arg2 hcloud.NetworkAddSubnetOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockNetworkClient) AddSubnet(ctx context.Context, network *hcloud.Network, opts hcloud.NetworkAddSubnetOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddSubnet", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddSubnet", ctx, network, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -62,45 +68,45 @@ func (m *MockNetworkClient) AddSubnet(arg0 context.Context, arg1 *hcloud.Network } // AddSubnet indicates an expected call of AddSubnet. -func (mr *MockNetworkClientMockRecorder) AddSubnet(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) AddSubnet(ctx, network, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockNetworkClient)(nil).AddSubnet), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubnet", reflect.TypeOf((*MockNetworkClient)(nil).AddSubnet), ctx, network, opts) } // All mocks base method. -func (m *MockNetworkClient) All(arg0 context.Context) ([]*hcloud.Network, error) { +func (m *MockNetworkClient) All(ctx context.Context) ([]*hcloud.Network, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.Network) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockNetworkClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockNetworkClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockNetworkClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockNetworkClient) AllWithOpts(arg0 context.Context, arg1 hcloud.NetworkListOpts) ([]*hcloud.Network, error) { +func (m *MockNetworkClient) AllWithOpts(ctx context.Context, opts hcloud.NetworkListOpts) ([]*hcloud.Network, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.Network) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockNetworkClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockNetworkClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockNetworkClient)(nil).AllWithOpts), ctx, opts) } // ChangeIPRange mocks base method. -func (m *MockNetworkClient) ChangeIPRange(arg0 context.Context, arg1 *hcloud.Network, arg2 hcloud.NetworkChangeIPRangeOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockNetworkClient) ChangeIPRange(ctx context.Context, network *hcloud.Network, opts hcloud.NetworkChangeIPRangeOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeIPRange", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ChangeIPRange", ctx, network, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -108,15 +114,15 @@ func (m *MockNetworkClient) ChangeIPRange(arg0 context.Context, arg1 *hcloud.Net } // ChangeIPRange indicates an expected call of ChangeIPRange. -func (mr *MockNetworkClientMockRecorder) ChangeIPRange(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) ChangeIPRange(ctx, network, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeIPRange", reflect.TypeOf((*MockNetworkClient)(nil).ChangeIPRange), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeIPRange", reflect.TypeOf((*MockNetworkClient)(nil).ChangeIPRange), ctx, network, opts) } // ChangeProtection mocks base method. -func (m *MockNetworkClient) ChangeProtection(arg0 context.Context, arg1 *hcloud.Network, arg2 hcloud.NetworkChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockNetworkClient) ChangeProtection(ctx context.Context, network *hcloud.Network, opts hcloud.NetworkChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeProtection", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ChangeProtection", ctx, network, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -124,15 +130,15 @@ func (m *MockNetworkClient) ChangeProtection(arg0 context.Context, arg1 *hcloud. } // ChangeProtection indicates an expected call of ChangeProtection. -func (mr *MockNetworkClientMockRecorder) ChangeProtection(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) ChangeProtection(ctx, network, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeProtection", reflect.TypeOf((*MockNetworkClient)(nil).ChangeProtection), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeProtection", reflect.TypeOf((*MockNetworkClient)(nil).ChangeProtection), ctx, network, opts) } // Create mocks base method. -func (m *MockNetworkClient) Create(arg0 context.Context, arg1 hcloud.NetworkCreateOpts) (*hcloud.Network, *hcloud.Response, error) { +func (m *MockNetworkClient) Create(ctx context.Context, opts hcloud.NetworkCreateOpts) (*hcloud.Network, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Create", arg0, arg1) + ret := m.ctrl.Call(m, "Create", ctx, opts) ret0, _ := ret[0].(*hcloud.Network) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -140,30 +146,30 @@ func (m *MockNetworkClient) Create(arg0 context.Context, arg1 hcloud.NetworkCrea } // Create indicates an expected call of Create. -func (mr *MockNetworkClientMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) Create(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockNetworkClient)(nil).Create), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockNetworkClient)(nil).Create), ctx, opts) } // Delete mocks base method. -func (m *MockNetworkClient) Delete(arg0 context.Context, arg1 *hcloud.Network) (*hcloud.Response, error) { +func (m *MockNetworkClient) Delete(ctx context.Context, network *hcloud.Network) (*hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0, arg1) + ret := m.ctrl.Call(m, "Delete", ctx, network) ret0, _ := ret[0].(*hcloud.Response) ret1, _ := ret[1].(error) return ret0, ret1 } // Delete indicates an expected call of Delete. -func (mr *MockNetworkClientMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) Delete(ctx, network any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockNetworkClient)(nil).Delete), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockNetworkClient)(nil).Delete), ctx, network) } // DeleteRoute mocks base method. -func (m *MockNetworkClient) DeleteRoute(arg0 context.Context, arg1 *hcloud.Network, arg2 hcloud.NetworkDeleteRouteOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockNetworkClient) DeleteRoute(ctx context.Context, network *hcloud.Network, opts hcloud.NetworkDeleteRouteOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteRoute", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "DeleteRoute", ctx, network, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -171,15 +177,15 @@ func (m *MockNetworkClient) DeleteRoute(arg0 context.Context, arg1 *hcloud.Netwo } // DeleteRoute indicates an expected call of DeleteRoute. -func (mr *MockNetworkClientMockRecorder) DeleteRoute(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) DeleteRoute(ctx, network, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRoute", reflect.TypeOf((*MockNetworkClient)(nil).DeleteRoute), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRoute", reflect.TypeOf((*MockNetworkClient)(nil).DeleteRoute), ctx, network, opts) } // DeleteSubnet mocks base method. -func (m *MockNetworkClient) DeleteSubnet(arg0 context.Context, arg1 *hcloud.Network, arg2 hcloud.NetworkDeleteSubnetOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockNetworkClient) DeleteSubnet(ctx context.Context, network *hcloud.Network, opts hcloud.NetworkDeleteSubnetOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteSubnet", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "DeleteSubnet", ctx, network, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -187,15 +193,15 @@ func (m *MockNetworkClient) DeleteSubnet(arg0 context.Context, arg1 *hcloud.Netw } // DeleteSubnet indicates an expected call of DeleteSubnet. -func (mr *MockNetworkClientMockRecorder) DeleteSubnet(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) DeleteSubnet(ctx, network, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSubnet", reflect.TypeOf((*MockNetworkClient)(nil).DeleteSubnet), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSubnet", reflect.TypeOf((*MockNetworkClient)(nil).DeleteSubnet), ctx, network, opts) } // Get mocks base method. -func (m *MockNetworkClient) Get(arg0 context.Context, arg1 string) (*hcloud.Network, *hcloud.Response, error) { +func (m *MockNetworkClient) Get(ctx context.Context, idOrName string) (*hcloud.Network, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.Network) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -203,15 +209,15 @@ func (m *MockNetworkClient) Get(arg0 context.Context, arg1 string) (*hcloud.Netw } // Get indicates an expected call of Get. -func (mr *MockNetworkClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockNetworkClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockNetworkClient)(nil).Get), ctx, idOrName) } // GetByID mocks base method. -func (m *MockNetworkClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.Network, *hcloud.Response, error) { +func (m *MockNetworkClient) GetByID(ctx context.Context, id int64) (*hcloud.Network, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.Network) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -219,15 +225,15 @@ func (m *MockNetworkClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.N } // GetByID indicates an expected call of GetByID. -func (mr *MockNetworkClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockNetworkClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockNetworkClient)(nil).GetByID), ctx, id) } // GetByName mocks base method. -func (m *MockNetworkClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.Network, *hcloud.Response, error) { +func (m *MockNetworkClient) GetByName(ctx context.Context, name string) (*hcloud.Network, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.Network) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -235,9 +241,9 @@ func (m *MockNetworkClient) GetByName(arg0 context.Context, arg1 string) (*hclou } // GetByName indicates an expected call of GetByName. -func (mr *MockNetworkClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockNetworkClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockNetworkClient)(nil).GetByName), ctx, name) } // LabelKeys mocks base method. @@ -249,15 +255,15 @@ func (m *MockNetworkClient) LabelKeys(arg0 string) []string { } // LabelKeys indicates an expected call of LabelKeys. -func (mr *MockNetworkClientMockRecorder) LabelKeys(arg0 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) LabelKeys(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockNetworkClient)(nil).LabelKeys), arg0) } // List mocks base method. -func (m *MockNetworkClient) List(arg0 context.Context, arg1 hcloud.NetworkListOpts) ([]*hcloud.Network, *hcloud.Response, error) { +func (m *MockNetworkClient) List(ctx context.Context, opts hcloud.NetworkListOpts) ([]*hcloud.Network, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.Network) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -265,9 +271,9 @@ func (m *MockNetworkClient) List(arg0 context.Context, arg1 hcloud.NetworkListOp } // List indicates an expected call of List. -func (mr *MockNetworkClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockNetworkClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockNetworkClient)(nil).List), ctx, opts) } // Name mocks base method. @@ -279,7 +285,7 @@ func (m *MockNetworkClient) Name(arg0 int64) string { } // Name indicates an expected call of Name. -func (mr *MockNetworkClientMockRecorder) Name(arg0 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) Name(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockNetworkClient)(nil).Name), arg0) } @@ -299,9 +305,9 @@ func (mr *MockNetworkClientMockRecorder) Names() *gomock.Call { } // Update mocks base method. -func (m *MockNetworkClient) Update(arg0 context.Context, arg1 *hcloud.Network, arg2 hcloud.NetworkUpdateOpts) (*hcloud.Network, *hcloud.Response, error) { +func (m *MockNetworkClient) Update(ctx context.Context, network *hcloud.Network, opts hcloud.NetworkUpdateOpts) (*hcloud.Network, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Update", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Update", ctx, network, opts) ret0, _ := ret[0].(*hcloud.Network) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -309,7 +315,7 @@ func (m *MockNetworkClient) Update(arg0 context.Context, arg1 *hcloud.Network, a } // Update indicates an expected call of Update. -func (mr *MockNetworkClientMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockNetworkClientMockRecorder) Update(ctx, network, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockNetworkClient)(nil).Update), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockNetworkClient)(nil).Update), ctx, network, opts) } diff --git a/internal/hcapi2/mock/zz_placement_group_client_mock.go b/internal/hcapi2/mock/zz_placement_group_client_mock.go index f3720b11..6f05bb07 100644 --- a/internal/hcapi2/mock/zz_placement_group_client_mock.go +++ b/internal/hcapi2/mock/zz_placement_group_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: PlacementGroupClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_placement_group_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 PlacementGroupClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockPlacementGroupClient is a mock of PlacementGroupClient interface. type MockPlacementGroupClient struct { ctrl *gomock.Controller recorder *MockPlacementGroupClientMockRecorder + isgomock struct{} } // MockPlacementGroupClientMockRecorder is the mock recorder for MockPlacementGroupClient. @@ -36,39 +42,39 @@ func (m *MockPlacementGroupClient) EXPECT() *MockPlacementGroupClientMockRecorde } // All mocks base method. -func (m *MockPlacementGroupClient) All(arg0 context.Context) ([]*hcloud.PlacementGroup, error) { +func (m *MockPlacementGroupClient) All(ctx context.Context) ([]*hcloud.PlacementGroup, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.PlacementGroup) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockPlacementGroupClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockPlacementGroupClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockPlacementGroupClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockPlacementGroupClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockPlacementGroupClient) AllWithOpts(arg0 context.Context, arg1 hcloud.PlacementGroupListOpts) ([]*hcloud.PlacementGroup, error) { +func (m *MockPlacementGroupClient) AllWithOpts(ctx context.Context, opts hcloud.PlacementGroupListOpts) ([]*hcloud.PlacementGroup, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.PlacementGroup) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockPlacementGroupClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPlacementGroupClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockPlacementGroupClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockPlacementGroupClient)(nil).AllWithOpts), ctx, opts) } // Create mocks base method. -func (m *MockPlacementGroupClient) Create(arg0 context.Context, arg1 hcloud.PlacementGroupCreateOpts) (hcloud.PlacementGroupCreateResult, *hcloud.Response, error) { +func (m *MockPlacementGroupClient) Create(ctx context.Context, opts hcloud.PlacementGroupCreateOpts) (hcloud.PlacementGroupCreateResult, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Create", arg0, arg1) + ret := m.ctrl.Call(m, "Create", ctx, opts) ret0, _ := ret[0].(hcloud.PlacementGroupCreateResult) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -76,30 +82,30 @@ func (m *MockPlacementGroupClient) Create(arg0 context.Context, arg1 hcloud.Plac } // Create indicates an expected call of Create. -func (mr *MockPlacementGroupClientMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPlacementGroupClientMockRecorder) Create(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockPlacementGroupClient)(nil).Create), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockPlacementGroupClient)(nil).Create), ctx, opts) } // Delete mocks base method. -func (m *MockPlacementGroupClient) Delete(arg0 context.Context, arg1 *hcloud.PlacementGroup) (*hcloud.Response, error) { +func (m *MockPlacementGroupClient) Delete(ctx context.Context, placementGroup *hcloud.PlacementGroup) (*hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0, arg1) + ret := m.ctrl.Call(m, "Delete", ctx, placementGroup) ret0, _ := ret[0].(*hcloud.Response) ret1, _ := ret[1].(error) return ret0, ret1 } // Delete indicates an expected call of Delete. -func (mr *MockPlacementGroupClientMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPlacementGroupClientMockRecorder) Delete(ctx, placementGroup any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPlacementGroupClient)(nil).Delete), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPlacementGroupClient)(nil).Delete), ctx, placementGroup) } // Get mocks base method. -func (m *MockPlacementGroupClient) Get(arg0 context.Context, arg1 string) (*hcloud.PlacementGroup, *hcloud.Response, error) { +func (m *MockPlacementGroupClient) Get(ctx context.Context, idOrName string) (*hcloud.PlacementGroup, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.PlacementGroup) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -107,15 +113,15 @@ func (m *MockPlacementGroupClient) Get(arg0 context.Context, arg1 string) (*hclo } // Get indicates an expected call of Get. -func (mr *MockPlacementGroupClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPlacementGroupClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPlacementGroupClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPlacementGroupClient)(nil).Get), ctx, idOrName) } // GetByID mocks base method. -func (m *MockPlacementGroupClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.PlacementGroup, *hcloud.Response, error) { +func (m *MockPlacementGroupClient) GetByID(ctx context.Context, id int64) (*hcloud.PlacementGroup, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.PlacementGroup) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -123,15 +129,15 @@ func (m *MockPlacementGroupClient) GetByID(arg0 context.Context, arg1 int64) (*h } // GetByID indicates an expected call of GetByID. -func (mr *MockPlacementGroupClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPlacementGroupClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockPlacementGroupClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockPlacementGroupClient)(nil).GetByID), ctx, id) } // GetByName mocks base method. -func (m *MockPlacementGroupClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.PlacementGroup, *hcloud.Response, error) { +func (m *MockPlacementGroupClient) GetByName(ctx context.Context, name string) (*hcloud.PlacementGroup, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.PlacementGroup) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -139,9 +145,9 @@ func (m *MockPlacementGroupClient) GetByName(arg0 context.Context, arg1 string) } // GetByName indicates an expected call of GetByName. -func (mr *MockPlacementGroupClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPlacementGroupClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockPlacementGroupClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockPlacementGroupClient)(nil).GetByName), ctx, name) } // LabelKeys mocks base method. @@ -153,15 +159,15 @@ func (m *MockPlacementGroupClient) LabelKeys(arg0 string) []string { } // LabelKeys indicates an expected call of LabelKeys. -func (mr *MockPlacementGroupClientMockRecorder) LabelKeys(arg0 interface{}) *gomock.Call { +func (mr *MockPlacementGroupClientMockRecorder) LabelKeys(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockPlacementGroupClient)(nil).LabelKeys), arg0) } // List mocks base method. -func (m *MockPlacementGroupClient) List(arg0 context.Context, arg1 hcloud.PlacementGroupListOpts) ([]*hcloud.PlacementGroup, *hcloud.Response, error) { +func (m *MockPlacementGroupClient) List(ctx context.Context, opts hcloud.PlacementGroupListOpts) ([]*hcloud.PlacementGroup, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.PlacementGroup) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -169,9 +175,9 @@ func (m *MockPlacementGroupClient) List(arg0 context.Context, arg1 hcloud.Placem } // List indicates an expected call of List. -func (mr *MockPlacementGroupClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPlacementGroupClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPlacementGroupClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPlacementGroupClient)(nil).List), ctx, opts) } // Names mocks base method. @@ -189,9 +195,9 @@ func (mr *MockPlacementGroupClientMockRecorder) Names() *gomock.Call { } // Update mocks base method. -func (m *MockPlacementGroupClient) Update(arg0 context.Context, arg1 *hcloud.PlacementGroup, arg2 hcloud.PlacementGroupUpdateOpts) (*hcloud.PlacementGroup, *hcloud.Response, error) { +func (m *MockPlacementGroupClient) Update(ctx context.Context, placementGroup *hcloud.PlacementGroup, opts hcloud.PlacementGroupUpdateOpts) (*hcloud.PlacementGroup, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Update", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Update", ctx, placementGroup, opts) ret0, _ := ret[0].(*hcloud.PlacementGroup) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -199,7 +205,7 @@ func (m *MockPlacementGroupClient) Update(arg0 context.Context, arg1 *hcloud.Pla } // Update indicates an expected call of Update. -func (mr *MockPlacementGroupClientMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockPlacementGroupClientMockRecorder) Update(ctx, placementGroup, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockPlacementGroupClient)(nil).Update), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockPlacementGroupClient)(nil).Update), ctx, placementGroup, opts) } diff --git a/internal/hcapi2/mock/zz_pricing_client_mock.go b/internal/hcapi2/mock/zz_pricing_client_mock.go index 064da646..81492f6c 100644 --- a/internal/hcapi2/mock/zz_pricing_client_mock.go +++ b/internal/hcapi2/mock/zz_pricing_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: PricingClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_pricing_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 PricingClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockPricingClient is a mock of PricingClient interface. type MockPricingClient struct { ctrl *gomock.Controller recorder *MockPricingClientMockRecorder + isgomock struct{} } // MockPricingClientMockRecorder is the mock recorder for MockPricingClient. @@ -36,9 +42,9 @@ func (m *MockPricingClient) EXPECT() *MockPricingClientMockRecorder { } // Get mocks base method. -func (m *MockPricingClient) Get(arg0 context.Context) (hcloud.Pricing, *hcloud.Response, error) { +func (m *MockPricingClient) Get(ctx context.Context) (hcloud.Pricing, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0) + ret := m.ctrl.Call(m, "Get", ctx) ret0, _ := ret[0].(hcloud.Pricing) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -46,7 +52,7 @@ func (m *MockPricingClient) Get(arg0 context.Context) (hcloud.Pricing, *hcloud.R } // Get indicates an expected call of Get. -func (mr *MockPricingClientMockRecorder) Get(arg0 interface{}) *gomock.Call { +func (mr *MockPricingClientMockRecorder) Get(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPricingClient)(nil).Get), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPricingClient)(nil).Get), ctx) } diff --git a/internal/hcapi2/mock/zz_primary_ip_client_mock.go b/internal/hcapi2/mock/zz_primary_ip_client_mock.go index 88abc5cc..85b4b571 100644 --- a/internal/hcapi2/mock/zz_primary_ip_client_mock.go +++ b/internal/hcapi2/mock/zz_primary_ip_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: PrimaryIPClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_primary_ip_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 PrimaryIPClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockPrimaryIPClient is a mock of PrimaryIPClient interface. type MockPrimaryIPClient struct { ctrl *gomock.Controller recorder *MockPrimaryIPClientMockRecorder + isgomock struct{} } // MockPrimaryIPClientMockRecorder is the mock recorder for MockPrimaryIPClient. @@ -36,39 +42,39 @@ func (m *MockPrimaryIPClient) EXPECT() *MockPrimaryIPClientMockRecorder { } // All mocks base method. -func (m *MockPrimaryIPClient) All(arg0 context.Context) ([]*hcloud.PrimaryIP, error) { +func (m *MockPrimaryIPClient) All(ctx context.Context) ([]*hcloud.PrimaryIP, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.PrimaryIP) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockPrimaryIPClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockPrimaryIPClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockPrimaryIPClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockPrimaryIPClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockPrimaryIPClient) AllWithOpts(arg0 context.Context, arg1 hcloud.PrimaryIPListOpts) ([]*hcloud.PrimaryIP, error) { +func (m *MockPrimaryIPClient) AllWithOpts(ctx context.Context, opts hcloud.PrimaryIPListOpts) ([]*hcloud.PrimaryIP, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.PrimaryIP) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockPrimaryIPClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPrimaryIPClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockPrimaryIPClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockPrimaryIPClient)(nil).AllWithOpts), ctx, opts) } // Assign mocks base method. -func (m *MockPrimaryIPClient) Assign(arg0 context.Context, arg1 hcloud.PrimaryIPAssignOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockPrimaryIPClient) Assign(ctx context.Context, opts hcloud.PrimaryIPAssignOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Assign", arg0, arg1) + ret := m.ctrl.Call(m, "Assign", ctx, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -76,15 +82,15 @@ func (m *MockPrimaryIPClient) Assign(arg0 context.Context, arg1 hcloud.PrimaryIP } // Assign indicates an expected call of Assign. -func (mr *MockPrimaryIPClientMockRecorder) Assign(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPrimaryIPClientMockRecorder) Assign(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Assign", reflect.TypeOf((*MockPrimaryIPClient)(nil).Assign), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Assign", reflect.TypeOf((*MockPrimaryIPClient)(nil).Assign), ctx, opts) } // ChangeDNSPtr mocks base method. -func (m *MockPrimaryIPClient) ChangeDNSPtr(arg0 context.Context, arg1 hcloud.PrimaryIPChangeDNSPtrOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockPrimaryIPClient) ChangeDNSPtr(ctx context.Context, opts hcloud.PrimaryIPChangeDNSPtrOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeDNSPtr", arg0, arg1) + ret := m.ctrl.Call(m, "ChangeDNSPtr", ctx, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -92,15 +98,15 @@ func (m *MockPrimaryIPClient) ChangeDNSPtr(arg0 context.Context, arg1 hcloud.Pri } // ChangeDNSPtr indicates an expected call of ChangeDNSPtr. -func (mr *MockPrimaryIPClientMockRecorder) ChangeDNSPtr(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPrimaryIPClientMockRecorder) ChangeDNSPtr(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeDNSPtr", reflect.TypeOf((*MockPrimaryIPClient)(nil).ChangeDNSPtr), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeDNSPtr", reflect.TypeOf((*MockPrimaryIPClient)(nil).ChangeDNSPtr), ctx, opts) } // ChangeProtection mocks base method. -func (m *MockPrimaryIPClient) ChangeProtection(arg0 context.Context, arg1 hcloud.PrimaryIPChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockPrimaryIPClient) ChangeProtection(ctx context.Context, opts hcloud.PrimaryIPChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeProtection", arg0, arg1) + ret := m.ctrl.Call(m, "ChangeProtection", ctx, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -108,15 +114,15 @@ func (m *MockPrimaryIPClient) ChangeProtection(arg0 context.Context, arg1 hcloud } // ChangeProtection indicates an expected call of ChangeProtection. -func (mr *MockPrimaryIPClientMockRecorder) ChangeProtection(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPrimaryIPClientMockRecorder) ChangeProtection(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeProtection", reflect.TypeOf((*MockPrimaryIPClient)(nil).ChangeProtection), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeProtection", reflect.TypeOf((*MockPrimaryIPClient)(nil).ChangeProtection), ctx, opts) } // Create mocks base method. -func (m *MockPrimaryIPClient) Create(arg0 context.Context, arg1 hcloud.PrimaryIPCreateOpts) (*hcloud.PrimaryIPCreateResult, *hcloud.Response, error) { +func (m *MockPrimaryIPClient) Create(ctx context.Context, reqBody hcloud.PrimaryIPCreateOpts) (*hcloud.PrimaryIPCreateResult, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Create", arg0, arg1) + ret := m.ctrl.Call(m, "Create", ctx, reqBody) ret0, _ := ret[0].(*hcloud.PrimaryIPCreateResult) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -124,30 +130,30 @@ func (m *MockPrimaryIPClient) Create(arg0 context.Context, arg1 hcloud.PrimaryIP } // Create indicates an expected call of Create. -func (mr *MockPrimaryIPClientMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPrimaryIPClientMockRecorder) Create(ctx, reqBody any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockPrimaryIPClient)(nil).Create), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockPrimaryIPClient)(nil).Create), ctx, reqBody) } // Delete mocks base method. -func (m *MockPrimaryIPClient) Delete(arg0 context.Context, arg1 *hcloud.PrimaryIP) (*hcloud.Response, error) { +func (m *MockPrimaryIPClient) Delete(ctx context.Context, primaryIP *hcloud.PrimaryIP) (*hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0, arg1) + ret := m.ctrl.Call(m, "Delete", ctx, primaryIP) ret0, _ := ret[0].(*hcloud.Response) ret1, _ := ret[1].(error) return ret0, ret1 } // Delete indicates an expected call of Delete. -func (mr *MockPrimaryIPClientMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPrimaryIPClientMockRecorder) Delete(ctx, primaryIP any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPrimaryIPClient)(nil).Delete), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPrimaryIPClient)(nil).Delete), ctx, primaryIP) } // Get mocks base method. -func (m *MockPrimaryIPClient) Get(arg0 context.Context, arg1 string) (*hcloud.PrimaryIP, *hcloud.Response, error) { +func (m *MockPrimaryIPClient) Get(ctx context.Context, idOrName string) (*hcloud.PrimaryIP, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.PrimaryIP) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -155,15 +161,15 @@ func (m *MockPrimaryIPClient) Get(arg0 context.Context, arg1 string) (*hcloud.Pr } // Get indicates an expected call of Get. -func (mr *MockPrimaryIPClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPrimaryIPClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPrimaryIPClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPrimaryIPClient)(nil).Get), ctx, idOrName) } // GetByID mocks base method. -func (m *MockPrimaryIPClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.PrimaryIP, *hcloud.Response, error) { +func (m *MockPrimaryIPClient) GetByID(ctx context.Context, id int64) (*hcloud.PrimaryIP, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.PrimaryIP) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -171,15 +177,15 @@ func (m *MockPrimaryIPClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud } // GetByID indicates an expected call of GetByID. -func (mr *MockPrimaryIPClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPrimaryIPClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockPrimaryIPClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockPrimaryIPClient)(nil).GetByID), ctx, id) } // GetByIP mocks base method. -func (m *MockPrimaryIPClient) GetByIP(arg0 context.Context, arg1 string) (*hcloud.PrimaryIP, *hcloud.Response, error) { +func (m *MockPrimaryIPClient) GetByIP(ctx context.Context, ip string) (*hcloud.PrimaryIP, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByIP", arg0, arg1) + ret := m.ctrl.Call(m, "GetByIP", ctx, ip) ret0, _ := ret[0].(*hcloud.PrimaryIP) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -187,15 +193,15 @@ func (m *MockPrimaryIPClient) GetByIP(arg0 context.Context, arg1 string) (*hclou } // GetByIP indicates an expected call of GetByIP. -func (mr *MockPrimaryIPClientMockRecorder) GetByIP(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPrimaryIPClientMockRecorder) GetByIP(ctx, ip any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByIP", reflect.TypeOf((*MockPrimaryIPClient)(nil).GetByIP), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByIP", reflect.TypeOf((*MockPrimaryIPClient)(nil).GetByIP), ctx, ip) } // GetByName mocks base method. -func (m *MockPrimaryIPClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.PrimaryIP, *hcloud.Response, error) { +func (m *MockPrimaryIPClient) GetByName(ctx context.Context, name string) (*hcloud.PrimaryIP, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.PrimaryIP) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -203,9 +209,9 @@ func (m *MockPrimaryIPClient) GetByName(arg0 context.Context, arg1 string) (*hcl } // GetByName indicates an expected call of GetByName. -func (mr *MockPrimaryIPClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPrimaryIPClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockPrimaryIPClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockPrimaryIPClient)(nil).GetByName), ctx, name) } // IPv4Names mocks base method. @@ -237,23 +243,23 @@ func (mr *MockPrimaryIPClientMockRecorder) IPv6Names() *gomock.Call { } // LabelKeys mocks base method. -func (m *MockPrimaryIPClient) LabelKeys(arg0 string) []string { +func (m *MockPrimaryIPClient) LabelKeys(idOrName string) []string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LabelKeys", arg0) + ret := m.ctrl.Call(m, "LabelKeys", idOrName) ret0, _ := ret[0].([]string) return ret0 } // LabelKeys indicates an expected call of LabelKeys. -func (mr *MockPrimaryIPClientMockRecorder) LabelKeys(arg0 interface{}) *gomock.Call { +func (mr *MockPrimaryIPClientMockRecorder) LabelKeys(idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockPrimaryIPClient)(nil).LabelKeys), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockPrimaryIPClient)(nil).LabelKeys), idOrName) } // List mocks base method. -func (m *MockPrimaryIPClient) List(arg0 context.Context, arg1 hcloud.PrimaryIPListOpts) ([]*hcloud.PrimaryIP, *hcloud.Response, error) { +func (m *MockPrimaryIPClient) List(ctx context.Context, opts hcloud.PrimaryIPListOpts) ([]*hcloud.PrimaryIP, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.PrimaryIP) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -261,9 +267,9 @@ func (m *MockPrimaryIPClient) List(arg0 context.Context, arg1 hcloud.PrimaryIPLi } // List indicates an expected call of List. -func (mr *MockPrimaryIPClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPrimaryIPClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPrimaryIPClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPrimaryIPClient)(nil).List), ctx, opts) } // Names mocks base method. @@ -281,9 +287,9 @@ func (mr *MockPrimaryIPClientMockRecorder) Names() *gomock.Call { } // Unassign mocks base method. -func (m *MockPrimaryIPClient) Unassign(arg0 context.Context, arg1 int64) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockPrimaryIPClient) Unassign(ctx context.Context, id int64) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Unassign", arg0, arg1) + ret := m.ctrl.Call(m, "Unassign", ctx, id) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -291,15 +297,15 @@ func (m *MockPrimaryIPClient) Unassign(arg0 context.Context, arg1 int64) (*hclou } // Unassign indicates an expected call of Unassign. -func (mr *MockPrimaryIPClientMockRecorder) Unassign(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPrimaryIPClientMockRecorder) Unassign(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unassign", reflect.TypeOf((*MockPrimaryIPClient)(nil).Unassign), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unassign", reflect.TypeOf((*MockPrimaryIPClient)(nil).Unassign), ctx, id) } // Update mocks base method. -func (m *MockPrimaryIPClient) Update(arg0 context.Context, arg1 *hcloud.PrimaryIP, arg2 hcloud.PrimaryIPUpdateOpts) (*hcloud.PrimaryIP, *hcloud.Response, error) { +func (m *MockPrimaryIPClient) Update(ctx context.Context, primaryIP *hcloud.PrimaryIP, reqBody hcloud.PrimaryIPUpdateOpts) (*hcloud.PrimaryIP, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Update", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Update", ctx, primaryIP, reqBody) ret0, _ := ret[0].(*hcloud.PrimaryIP) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -307,7 +313,7 @@ func (m *MockPrimaryIPClient) Update(arg0 context.Context, arg1 *hcloud.PrimaryI } // Update indicates an expected call of Update. -func (mr *MockPrimaryIPClientMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockPrimaryIPClientMockRecorder) Update(ctx, primaryIP, reqBody any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockPrimaryIPClient)(nil).Update), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockPrimaryIPClient)(nil).Update), ctx, primaryIP, reqBody) } diff --git a/internal/hcapi2/mock/zz_rdns_client_mock.go b/internal/hcapi2/mock/zz_rdns_client_mock.go index e059944d..cc8ab5db 100644 --- a/internal/hcapi2/mock/zz_rdns_client_mock.go +++ b/internal/hcapi2/mock/zz_rdns_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: RDNSClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_rdns_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 RDNSClient +// // Package mock is a generated GoMock package. package mock @@ -9,14 +14,15 @@ import ( net "net" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockRDNSClient is a mock of RDNSClient interface. type MockRDNSClient struct { ctrl *gomock.Controller recorder *MockRDNSClientMockRecorder + isgomock struct{} } // MockRDNSClientMockRecorder is the mock recorder for MockRDNSClient. @@ -37,9 +43,9 @@ func (m *MockRDNSClient) EXPECT() *MockRDNSClientMockRecorder { } // ChangeDNSPtr mocks base method. -func (m *MockRDNSClient) ChangeDNSPtr(arg0 context.Context, arg1 hcloud.RDNSSupporter, arg2 net.IP, arg3 *string) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockRDNSClient) ChangeDNSPtr(ctx context.Context, rdns hcloud.RDNSSupporter, ip net.IP, ptr *string) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeDNSPtr", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "ChangeDNSPtr", ctx, rdns, ip, ptr) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -47,7 +53,7 @@ func (m *MockRDNSClient) ChangeDNSPtr(arg0 context.Context, arg1 hcloud.RDNSSupp } // ChangeDNSPtr indicates an expected call of ChangeDNSPtr. -func (mr *MockRDNSClientMockRecorder) ChangeDNSPtr(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockRDNSClientMockRecorder) ChangeDNSPtr(ctx, rdns, ip, ptr any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeDNSPtr", reflect.TypeOf((*MockRDNSClient)(nil).ChangeDNSPtr), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeDNSPtr", reflect.TypeOf((*MockRDNSClient)(nil).ChangeDNSPtr), ctx, rdns, ip, ptr) } diff --git a/internal/hcapi2/mock/zz_server_client_mock.go b/internal/hcapi2/mock/zz_server_client_mock.go index 0db3bd4e..29256a6b 100644 --- a/internal/hcapi2/mock/zz_server_client_mock.go +++ b/internal/hcapi2/mock/zz_server_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: ServerClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_server_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 ServerClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockServerClient is a mock of ServerClient interface. type MockServerClient struct { ctrl *gomock.Controller recorder *MockServerClientMockRecorder + isgomock struct{} } // MockServerClientMockRecorder is the mock recorder for MockServerClient. @@ -36,9 +42,9 @@ func (m *MockServerClient) EXPECT() *MockServerClientMockRecorder { } // AddToPlacementGroup mocks base method. -func (m *MockServerClient) AddToPlacementGroup(arg0 context.Context, arg1 *hcloud.Server, arg2 *hcloud.PlacementGroup) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) AddToPlacementGroup(ctx context.Context, server *hcloud.Server, placementGroup *hcloud.PlacementGroup) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddToPlacementGroup", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddToPlacementGroup", ctx, server, placementGroup) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -46,45 +52,45 @@ func (m *MockServerClient) AddToPlacementGroup(arg0 context.Context, arg1 *hclou } // AddToPlacementGroup indicates an expected call of AddToPlacementGroup. -func (mr *MockServerClientMockRecorder) AddToPlacementGroup(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) AddToPlacementGroup(ctx, server, placementGroup any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddToPlacementGroup", reflect.TypeOf((*MockServerClient)(nil).AddToPlacementGroup), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddToPlacementGroup", reflect.TypeOf((*MockServerClient)(nil).AddToPlacementGroup), ctx, server, placementGroup) } // All mocks base method. -func (m *MockServerClient) All(arg0 context.Context) ([]*hcloud.Server, error) { +func (m *MockServerClient) All(ctx context.Context) ([]*hcloud.Server, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.Server) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockServerClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockServerClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockServerClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockServerClient) AllWithOpts(arg0 context.Context, arg1 hcloud.ServerListOpts) ([]*hcloud.Server, error) { +func (m *MockServerClient) AllWithOpts(ctx context.Context, opts hcloud.ServerListOpts) ([]*hcloud.Server, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.Server) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockServerClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockServerClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockServerClient)(nil).AllWithOpts), ctx, opts) } // AttachISO mocks base method. -func (m *MockServerClient) AttachISO(arg0 context.Context, arg1 *hcloud.Server, arg2 *hcloud.ISO) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) AttachISO(ctx context.Context, server *hcloud.Server, iso *hcloud.ISO) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AttachISO", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AttachISO", ctx, server, iso) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -92,15 +98,15 @@ func (m *MockServerClient) AttachISO(arg0 context.Context, arg1 *hcloud.Server, } // AttachISO indicates an expected call of AttachISO. -func (mr *MockServerClientMockRecorder) AttachISO(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) AttachISO(ctx, server, iso any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachISO", reflect.TypeOf((*MockServerClient)(nil).AttachISO), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachISO", reflect.TypeOf((*MockServerClient)(nil).AttachISO), ctx, server, iso) } // AttachToNetwork mocks base method. -func (m *MockServerClient) AttachToNetwork(arg0 context.Context, arg1 *hcloud.Server, arg2 hcloud.ServerAttachToNetworkOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) AttachToNetwork(ctx context.Context, server *hcloud.Server, opts hcloud.ServerAttachToNetworkOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AttachToNetwork", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AttachToNetwork", ctx, server, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -108,15 +114,15 @@ func (m *MockServerClient) AttachToNetwork(arg0 context.Context, arg1 *hcloud.Se } // AttachToNetwork indicates an expected call of AttachToNetwork. -func (mr *MockServerClientMockRecorder) AttachToNetwork(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) AttachToNetwork(ctx, server, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachToNetwork", reflect.TypeOf((*MockServerClient)(nil).AttachToNetwork), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachToNetwork", reflect.TypeOf((*MockServerClient)(nil).AttachToNetwork), ctx, server, opts) } // ChangeAliasIPs mocks base method. -func (m *MockServerClient) ChangeAliasIPs(arg0 context.Context, arg1 *hcloud.Server, arg2 hcloud.ServerChangeAliasIPsOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) ChangeAliasIPs(ctx context.Context, server *hcloud.Server, opts hcloud.ServerChangeAliasIPsOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeAliasIPs", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ChangeAliasIPs", ctx, server, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -124,15 +130,15 @@ func (m *MockServerClient) ChangeAliasIPs(arg0 context.Context, arg1 *hcloud.Ser } // ChangeAliasIPs indicates an expected call of ChangeAliasIPs. -func (mr *MockServerClientMockRecorder) ChangeAliasIPs(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) ChangeAliasIPs(ctx, server, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeAliasIPs", reflect.TypeOf((*MockServerClient)(nil).ChangeAliasIPs), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeAliasIPs", reflect.TypeOf((*MockServerClient)(nil).ChangeAliasIPs), ctx, server, opts) } // ChangeDNSPtr mocks base method. -func (m *MockServerClient) ChangeDNSPtr(arg0 context.Context, arg1 *hcloud.Server, arg2 string, arg3 *string) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) ChangeDNSPtr(ctx context.Context, server *hcloud.Server, ip string, ptr *string) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeDNSPtr", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "ChangeDNSPtr", ctx, server, ip, ptr) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -140,15 +146,15 @@ func (m *MockServerClient) ChangeDNSPtr(arg0 context.Context, arg1 *hcloud.Serve } // ChangeDNSPtr indicates an expected call of ChangeDNSPtr. -func (mr *MockServerClientMockRecorder) ChangeDNSPtr(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) ChangeDNSPtr(ctx, server, ip, ptr any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeDNSPtr", reflect.TypeOf((*MockServerClient)(nil).ChangeDNSPtr), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeDNSPtr", reflect.TypeOf((*MockServerClient)(nil).ChangeDNSPtr), ctx, server, ip, ptr) } // ChangeProtection mocks base method. -func (m *MockServerClient) ChangeProtection(arg0 context.Context, arg1 *hcloud.Server, arg2 hcloud.ServerChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) ChangeProtection(ctx context.Context, server *hcloud.Server, opts hcloud.ServerChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeProtection", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ChangeProtection", ctx, server, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -156,15 +162,15 @@ func (m *MockServerClient) ChangeProtection(arg0 context.Context, arg1 *hcloud.S } // ChangeProtection indicates an expected call of ChangeProtection. -func (mr *MockServerClientMockRecorder) ChangeProtection(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) ChangeProtection(ctx, server, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeProtection", reflect.TypeOf((*MockServerClient)(nil).ChangeProtection), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeProtection", reflect.TypeOf((*MockServerClient)(nil).ChangeProtection), ctx, server, opts) } // ChangeType mocks base method. -func (m *MockServerClient) ChangeType(arg0 context.Context, arg1 *hcloud.Server, arg2 hcloud.ServerChangeTypeOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) ChangeType(ctx context.Context, server *hcloud.Server, opts hcloud.ServerChangeTypeOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeType", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ChangeType", ctx, server, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -172,15 +178,15 @@ func (m *MockServerClient) ChangeType(arg0 context.Context, arg1 *hcloud.Server, } // ChangeType indicates an expected call of ChangeType. -func (mr *MockServerClientMockRecorder) ChangeType(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) ChangeType(ctx, server, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeType", reflect.TypeOf((*MockServerClient)(nil).ChangeType), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeType", reflect.TypeOf((*MockServerClient)(nil).ChangeType), ctx, server, opts) } // Create mocks base method. -func (m *MockServerClient) Create(arg0 context.Context, arg1 hcloud.ServerCreateOpts) (hcloud.ServerCreateResult, *hcloud.Response, error) { +func (m *MockServerClient) Create(ctx context.Context, opts hcloud.ServerCreateOpts) (hcloud.ServerCreateResult, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Create", arg0, arg1) + ret := m.ctrl.Call(m, "Create", ctx, opts) ret0, _ := ret[0].(hcloud.ServerCreateResult) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -188,15 +194,15 @@ func (m *MockServerClient) Create(arg0 context.Context, arg1 hcloud.ServerCreate } // Create indicates an expected call of Create. -func (mr *MockServerClientMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) Create(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockServerClient)(nil).Create), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockServerClient)(nil).Create), ctx, opts) } // CreateImage mocks base method. -func (m *MockServerClient) CreateImage(arg0 context.Context, arg1 *hcloud.Server, arg2 *hcloud.ServerCreateImageOpts) (hcloud.ServerCreateImageResult, *hcloud.Response, error) { +func (m *MockServerClient) CreateImage(ctx context.Context, server *hcloud.Server, opts *hcloud.ServerCreateImageOpts) (hcloud.ServerCreateImageResult, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateImage", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "CreateImage", ctx, server, opts) ret0, _ := ret[0].(hcloud.ServerCreateImageResult) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -204,30 +210,30 @@ func (m *MockServerClient) CreateImage(arg0 context.Context, arg1 *hcloud.Server } // CreateImage indicates an expected call of CreateImage. -func (mr *MockServerClientMockRecorder) CreateImage(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) CreateImage(ctx, server, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateImage", reflect.TypeOf((*MockServerClient)(nil).CreateImage), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateImage", reflect.TypeOf((*MockServerClient)(nil).CreateImage), ctx, server, opts) } // Delete mocks base method. -func (m *MockServerClient) Delete(arg0 context.Context, arg1 *hcloud.Server) (*hcloud.Response, error) { +func (m *MockServerClient) Delete(ctx context.Context, server *hcloud.Server) (*hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0, arg1) + ret := m.ctrl.Call(m, "Delete", ctx, server) ret0, _ := ret[0].(*hcloud.Response) ret1, _ := ret[1].(error) return ret0, ret1 } // Delete indicates an expected call of Delete. -func (mr *MockServerClientMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) Delete(ctx, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockServerClient)(nil).Delete), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockServerClient)(nil).Delete), ctx, server) } // DeleteWithResult mocks base method. -func (m *MockServerClient) DeleteWithResult(arg0 context.Context, arg1 *hcloud.Server) (*hcloud.ServerDeleteResult, *hcloud.Response, error) { +func (m *MockServerClient) DeleteWithResult(ctx context.Context, server *hcloud.Server) (*hcloud.ServerDeleteResult, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteWithResult", arg0, arg1) + ret := m.ctrl.Call(m, "DeleteWithResult", ctx, server) ret0, _ := ret[0].(*hcloud.ServerDeleteResult) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -235,15 +241,15 @@ func (m *MockServerClient) DeleteWithResult(arg0 context.Context, arg1 *hcloud.S } // DeleteWithResult indicates an expected call of DeleteWithResult. -func (mr *MockServerClientMockRecorder) DeleteWithResult(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) DeleteWithResult(ctx, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteWithResult", reflect.TypeOf((*MockServerClient)(nil).DeleteWithResult), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteWithResult", reflect.TypeOf((*MockServerClient)(nil).DeleteWithResult), ctx, server) } // DetachFromNetwork mocks base method. -func (m *MockServerClient) DetachFromNetwork(arg0 context.Context, arg1 *hcloud.Server, arg2 hcloud.ServerDetachFromNetworkOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) DetachFromNetwork(ctx context.Context, server *hcloud.Server, opts hcloud.ServerDetachFromNetworkOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DetachFromNetwork", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "DetachFromNetwork", ctx, server, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -251,15 +257,15 @@ func (m *MockServerClient) DetachFromNetwork(arg0 context.Context, arg1 *hcloud. } // DetachFromNetwork indicates an expected call of DetachFromNetwork. -func (mr *MockServerClientMockRecorder) DetachFromNetwork(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) DetachFromNetwork(ctx, server, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachFromNetwork", reflect.TypeOf((*MockServerClient)(nil).DetachFromNetwork), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachFromNetwork", reflect.TypeOf((*MockServerClient)(nil).DetachFromNetwork), ctx, server, opts) } // DetachISO mocks base method. -func (m *MockServerClient) DetachISO(arg0 context.Context, arg1 *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) DetachISO(ctx context.Context, server *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DetachISO", arg0, arg1) + ret := m.ctrl.Call(m, "DetachISO", ctx, server) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -267,15 +273,15 @@ func (m *MockServerClient) DetachISO(arg0 context.Context, arg1 *hcloud.Server) } // DetachISO indicates an expected call of DetachISO. -func (mr *MockServerClientMockRecorder) DetachISO(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) DetachISO(ctx, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachISO", reflect.TypeOf((*MockServerClient)(nil).DetachISO), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachISO", reflect.TypeOf((*MockServerClient)(nil).DetachISO), ctx, server) } // DisableBackup mocks base method. -func (m *MockServerClient) DisableBackup(arg0 context.Context, arg1 *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) DisableBackup(ctx context.Context, server *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DisableBackup", arg0, arg1) + ret := m.ctrl.Call(m, "DisableBackup", ctx, server) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -283,15 +289,15 @@ func (m *MockServerClient) DisableBackup(arg0 context.Context, arg1 *hcloud.Serv } // DisableBackup indicates an expected call of DisableBackup. -func (mr *MockServerClientMockRecorder) DisableBackup(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) DisableBackup(ctx, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableBackup", reflect.TypeOf((*MockServerClient)(nil).DisableBackup), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableBackup", reflect.TypeOf((*MockServerClient)(nil).DisableBackup), ctx, server) } // DisableRescue mocks base method. -func (m *MockServerClient) DisableRescue(arg0 context.Context, arg1 *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) DisableRescue(ctx context.Context, server *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DisableRescue", arg0, arg1) + ret := m.ctrl.Call(m, "DisableRescue", ctx, server) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -299,15 +305,15 @@ func (m *MockServerClient) DisableRescue(arg0 context.Context, arg1 *hcloud.Serv } // DisableRescue indicates an expected call of DisableRescue. -func (mr *MockServerClientMockRecorder) DisableRescue(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) DisableRescue(ctx, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableRescue", reflect.TypeOf((*MockServerClient)(nil).DisableRescue), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableRescue", reflect.TypeOf((*MockServerClient)(nil).DisableRescue), ctx, server) } // EnableBackup mocks base method. -func (m *MockServerClient) EnableBackup(arg0 context.Context, arg1 *hcloud.Server, arg2 string) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) EnableBackup(ctx context.Context, server *hcloud.Server, window string) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnableBackup", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "EnableBackup", ctx, server, window) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -315,15 +321,15 @@ func (m *MockServerClient) EnableBackup(arg0 context.Context, arg1 *hcloud.Serve } // EnableBackup indicates an expected call of EnableBackup. -func (mr *MockServerClientMockRecorder) EnableBackup(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) EnableBackup(ctx, server, window any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableBackup", reflect.TypeOf((*MockServerClient)(nil).EnableBackup), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableBackup", reflect.TypeOf((*MockServerClient)(nil).EnableBackup), ctx, server, window) } // EnableRescue mocks base method. -func (m *MockServerClient) EnableRescue(arg0 context.Context, arg1 *hcloud.Server, arg2 hcloud.ServerEnableRescueOpts) (hcloud.ServerEnableRescueResult, *hcloud.Response, error) { +func (m *MockServerClient) EnableRescue(ctx context.Context, server *hcloud.Server, opts hcloud.ServerEnableRescueOpts) (hcloud.ServerEnableRescueResult, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnableRescue", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "EnableRescue", ctx, server, opts) ret0, _ := ret[0].(hcloud.ServerEnableRescueResult) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -331,15 +337,15 @@ func (m *MockServerClient) EnableRescue(arg0 context.Context, arg1 *hcloud.Serve } // EnableRescue indicates an expected call of EnableRescue. -func (mr *MockServerClientMockRecorder) EnableRescue(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) EnableRescue(ctx, server, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableRescue", reflect.TypeOf((*MockServerClient)(nil).EnableRescue), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableRescue", reflect.TypeOf((*MockServerClient)(nil).EnableRescue), ctx, server, opts) } // Get mocks base method. -func (m *MockServerClient) Get(arg0 context.Context, arg1 string) (*hcloud.Server, *hcloud.Response, error) { +func (m *MockServerClient) Get(ctx context.Context, idOrName string) (*hcloud.Server, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.Server) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -347,15 +353,15 @@ func (m *MockServerClient) Get(arg0 context.Context, arg1 string) (*hcloud.Serve } // Get indicates an expected call of Get. -func (mr *MockServerClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockServerClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockServerClient)(nil).Get), ctx, idOrName) } // GetByID mocks base method. -func (m *MockServerClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.Server, *hcloud.Response, error) { +func (m *MockServerClient) GetByID(ctx context.Context, id int64) (*hcloud.Server, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.Server) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -363,15 +369,15 @@ func (m *MockServerClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.Se } // GetByID indicates an expected call of GetByID. -func (mr *MockServerClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockServerClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockServerClient)(nil).GetByID), ctx, id) } // GetByName mocks base method. -func (m *MockServerClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.Server, *hcloud.Response, error) { +func (m *MockServerClient) GetByName(ctx context.Context, name string) (*hcloud.Server, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.Server) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -379,15 +385,15 @@ func (m *MockServerClient) GetByName(arg0 context.Context, arg1 string) (*hcloud } // GetByName indicates an expected call of GetByName. -func (mr *MockServerClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockServerClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockServerClient)(nil).GetByName), ctx, name) } // GetMetrics mocks base method. -func (m *MockServerClient) GetMetrics(arg0 context.Context, arg1 *hcloud.Server, arg2 hcloud.ServerGetMetricsOpts) (*hcloud.ServerMetrics, *hcloud.Response, error) { +func (m *MockServerClient) GetMetrics(ctx context.Context, server *hcloud.Server, opts hcloud.ServerGetMetricsOpts) (*hcloud.ServerMetrics, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetMetrics", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "GetMetrics", ctx, server, opts) ret0, _ := ret[0].(*hcloud.ServerMetrics) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -395,29 +401,29 @@ func (m *MockServerClient) GetMetrics(arg0 context.Context, arg1 *hcloud.Server, } // GetMetrics indicates an expected call of GetMetrics. -func (mr *MockServerClientMockRecorder) GetMetrics(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) GetMetrics(ctx, server, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetrics", reflect.TypeOf((*MockServerClient)(nil).GetMetrics), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetrics", reflect.TypeOf((*MockServerClient)(nil).GetMetrics), ctx, server, opts) } // LabelKeys mocks base method. -func (m *MockServerClient) LabelKeys(arg0 string) []string { +func (m *MockServerClient) LabelKeys(idOrName string) []string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LabelKeys", arg0) + ret := m.ctrl.Call(m, "LabelKeys", idOrName) ret0, _ := ret[0].([]string) return ret0 } // LabelKeys indicates an expected call of LabelKeys. -func (mr *MockServerClientMockRecorder) LabelKeys(arg0 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) LabelKeys(idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockServerClient)(nil).LabelKeys), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockServerClient)(nil).LabelKeys), idOrName) } // List mocks base method. -func (m *MockServerClient) List(arg0 context.Context, arg1 hcloud.ServerListOpts) ([]*hcloud.Server, *hcloud.Response, error) { +func (m *MockServerClient) List(ctx context.Context, opts hcloud.ServerListOpts) ([]*hcloud.Server, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.Server) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -425,9 +431,9 @@ func (m *MockServerClient) List(arg0 context.Context, arg1 hcloud.ServerListOpts } // List indicates an expected call of List. -func (mr *MockServerClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockServerClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockServerClient)(nil).List), ctx, opts) } // Names mocks base method. @@ -445,9 +451,9 @@ func (mr *MockServerClientMockRecorder) Names() *gomock.Call { } // Poweroff mocks base method. -func (m *MockServerClient) Poweroff(arg0 context.Context, arg1 *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) Poweroff(ctx context.Context, server *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Poweroff", arg0, arg1) + ret := m.ctrl.Call(m, "Poweroff", ctx, server) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -455,15 +461,15 @@ func (m *MockServerClient) Poweroff(arg0 context.Context, arg1 *hcloud.Server) ( } // Poweroff indicates an expected call of Poweroff. -func (mr *MockServerClientMockRecorder) Poweroff(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) Poweroff(ctx, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Poweroff", reflect.TypeOf((*MockServerClient)(nil).Poweroff), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Poweroff", reflect.TypeOf((*MockServerClient)(nil).Poweroff), ctx, server) } // Poweron mocks base method. -func (m *MockServerClient) Poweron(arg0 context.Context, arg1 *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) Poweron(ctx context.Context, server *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Poweron", arg0, arg1) + ret := m.ctrl.Call(m, "Poweron", ctx, server) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -471,15 +477,15 @@ func (m *MockServerClient) Poweron(arg0 context.Context, arg1 *hcloud.Server) (* } // Poweron indicates an expected call of Poweron. -func (mr *MockServerClientMockRecorder) Poweron(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) Poweron(ctx, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Poweron", reflect.TypeOf((*MockServerClient)(nil).Poweron), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Poweron", reflect.TypeOf((*MockServerClient)(nil).Poweron), ctx, server) } // Reboot mocks base method. -func (m *MockServerClient) Reboot(arg0 context.Context, arg1 *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) Reboot(ctx context.Context, server *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Reboot", arg0, arg1) + ret := m.ctrl.Call(m, "Reboot", ctx, server) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -487,15 +493,15 @@ func (m *MockServerClient) Reboot(arg0 context.Context, arg1 *hcloud.Server) (*h } // Reboot indicates an expected call of Reboot. -func (mr *MockServerClientMockRecorder) Reboot(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) Reboot(ctx, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reboot", reflect.TypeOf((*MockServerClient)(nil).Reboot), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reboot", reflect.TypeOf((*MockServerClient)(nil).Reboot), ctx, server) } // Rebuild mocks base method. -func (m *MockServerClient) Rebuild(arg0 context.Context, arg1 *hcloud.Server, arg2 hcloud.ServerRebuildOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) Rebuild(ctx context.Context, server *hcloud.Server, opts hcloud.ServerRebuildOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Rebuild", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Rebuild", ctx, server, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -503,15 +509,15 @@ func (m *MockServerClient) Rebuild(arg0 context.Context, arg1 *hcloud.Server, ar } // Rebuild indicates an expected call of Rebuild. -func (mr *MockServerClientMockRecorder) Rebuild(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) Rebuild(ctx, server, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rebuild", reflect.TypeOf((*MockServerClient)(nil).Rebuild), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rebuild", reflect.TypeOf((*MockServerClient)(nil).Rebuild), ctx, server, opts) } // RebuildWithResult mocks base method. -func (m *MockServerClient) RebuildWithResult(arg0 context.Context, arg1 *hcloud.Server, arg2 hcloud.ServerRebuildOpts) (hcloud.ServerRebuildResult, *hcloud.Response, error) { +func (m *MockServerClient) RebuildWithResult(ctx context.Context, server *hcloud.Server, opts hcloud.ServerRebuildOpts) (hcloud.ServerRebuildResult, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RebuildWithResult", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "RebuildWithResult", ctx, server, opts) ret0, _ := ret[0].(hcloud.ServerRebuildResult) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -519,15 +525,15 @@ func (m *MockServerClient) RebuildWithResult(arg0 context.Context, arg1 *hcloud. } // RebuildWithResult indicates an expected call of RebuildWithResult. -func (mr *MockServerClientMockRecorder) RebuildWithResult(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) RebuildWithResult(ctx, server, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RebuildWithResult", reflect.TypeOf((*MockServerClient)(nil).RebuildWithResult), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RebuildWithResult", reflect.TypeOf((*MockServerClient)(nil).RebuildWithResult), ctx, server, opts) } // RemoveFromPlacementGroup mocks base method. -func (m *MockServerClient) RemoveFromPlacementGroup(arg0 context.Context, arg1 *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) RemoveFromPlacementGroup(ctx context.Context, server *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveFromPlacementGroup", arg0, arg1) + ret := m.ctrl.Call(m, "RemoveFromPlacementGroup", ctx, server) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -535,15 +541,15 @@ func (m *MockServerClient) RemoveFromPlacementGroup(arg0 context.Context, arg1 * } // RemoveFromPlacementGroup indicates an expected call of RemoveFromPlacementGroup. -func (mr *MockServerClientMockRecorder) RemoveFromPlacementGroup(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) RemoveFromPlacementGroup(ctx, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveFromPlacementGroup", reflect.TypeOf((*MockServerClient)(nil).RemoveFromPlacementGroup), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveFromPlacementGroup", reflect.TypeOf((*MockServerClient)(nil).RemoveFromPlacementGroup), ctx, server) } // RequestConsole mocks base method. -func (m *MockServerClient) RequestConsole(arg0 context.Context, arg1 *hcloud.Server) (hcloud.ServerRequestConsoleResult, *hcloud.Response, error) { +func (m *MockServerClient) RequestConsole(ctx context.Context, server *hcloud.Server) (hcloud.ServerRequestConsoleResult, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RequestConsole", arg0, arg1) + ret := m.ctrl.Call(m, "RequestConsole", ctx, server) ret0, _ := ret[0].(hcloud.ServerRequestConsoleResult) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -551,15 +557,15 @@ func (m *MockServerClient) RequestConsole(arg0 context.Context, arg1 *hcloud.Ser } // RequestConsole indicates an expected call of RequestConsole. -func (mr *MockServerClientMockRecorder) RequestConsole(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) RequestConsole(ctx, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestConsole", reflect.TypeOf((*MockServerClient)(nil).RequestConsole), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestConsole", reflect.TypeOf((*MockServerClient)(nil).RequestConsole), ctx, server) } // Reset mocks base method. -func (m *MockServerClient) Reset(arg0 context.Context, arg1 *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) Reset(ctx context.Context, server *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Reset", arg0, arg1) + ret := m.ctrl.Call(m, "Reset", ctx, server) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -567,15 +573,15 @@ func (m *MockServerClient) Reset(arg0 context.Context, arg1 *hcloud.Server) (*hc } // Reset indicates an expected call of Reset. -func (mr *MockServerClientMockRecorder) Reset(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) Reset(ctx, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockServerClient)(nil).Reset), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockServerClient)(nil).Reset), ctx, server) } // ResetPassword mocks base method. -func (m *MockServerClient) ResetPassword(arg0 context.Context, arg1 *hcloud.Server) (hcloud.ServerResetPasswordResult, *hcloud.Response, error) { +func (m *MockServerClient) ResetPassword(ctx context.Context, server *hcloud.Server) (hcloud.ServerResetPasswordResult, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ResetPassword", arg0, arg1) + ret := m.ctrl.Call(m, "ResetPassword", ctx, server) ret0, _ := ret[0].(hcloud.ServerResetPasswordResult) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -583,29 +589,29 @@ func (m *MockServerClient) ResetPassword(arg0 context.Context, arg1 *hcloud.Serv } // ResetPassword indicates an expected call of ResetPassword. -func (mr *MockServerClientMockRecorder) ResetPassword(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) ResetPassword(ctx, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResetPassword", reflect.TypeOf((*MockServerClient)(nil).ResetPassword), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResetPassword", reflect.TypeOf((*MockServerClient)(nil).ResetPassword), ctx, server) } // ServerName mocks base method. -func (m *MockServerClient) ServerName(arg0 int64) string { +func (m *MockServerClient) ServerName(id int64) string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ServerName", arg0) + ret := m.ctrl.Call(m, "ServerName", id) ret0, _ := ret[0].(string) return ret0 } // ServerName indicates an expected call of ServerName. -func (mr *MockServerClientMockRecorder) ServerName(arg0 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) ServerName(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerName", reflect.TypeOf((*MockServerClient)(nil).ServerName), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerName", reflect.TypeOf((*MockServerClient)(nil).ServerName), id) } // Shutdown mocks base method. -func (m *MockServerClient) Shutdown(arg0 context.Context, arg1 *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockServerClient) Shutdown(ctx context.Context, server *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Shutdown", arg0, arg1) + ret := m.ctrl.Call(m, "Shutdown", ctx, server) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -613,15 +619,15 @@ func (m *MockServerClient) Shutdown(arg0 context.Context, arg1 *hcloud.Server) ( } // Shutdown indicates an expected call of Shutdown. -func (mr *MockServerClientMockRecorder) Shutdown(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) Shutdown(ctx, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shutdown", reflect.TypeOf((*MockServerClient)(nil).Shutdown), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shutdown", reflect.TypeOf((*MockServerClient)(nil).Shutdown), ctx, server) } // Update mocks base method. -func (m *MockServerClient) Update(arg0 context.Context, arg1 *hcloud.Server, arg2 hcloud.ServerUpdateOpts) (*hcloud.Server, *hcloud.Response, error) { +func (m *MockServerClient) Update(ctx context.Context, server *hcloud.Server, opts hcloud.ServerUpdateOpts) (*hcloud.Server, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Update", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Update", ctx, server, opts) ret0, _ := ret[0].(*hcloud.Server) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -629,7 +635,7 @@ func (m *MockServerClient) Update(arg0 context.Context, arg1 *hcloud.Server, arg } // Update indicates an expected call of Update. -func (mr *MockServerClientMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockServerClientMockRecorder) Update(ctx, server, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockServerClient)(nil).Update), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockServerClient)(nil).Update), ctx, server, opts) } diff --git a/internal/hcapi2/mock/zz_server_type_client_mock.go b/internal/hcapi2/mock/zz_server_type_client_mock.go index 612eda89..18d9f629 100644 --- a/internal/hcapi2/mock/zz_server_type_client_mock.go +++ b/internal/hcapi2/mock/zz_server_type_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: ServerTypeClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_server_type_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 ServerTypeClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockServerTypeClient is a mock of ServerTypeClient interface. type MockServerTypeClient struct { ctrl *gomock.Controller recorder *MockServerTypeClientMockRecorder + isgomock struct{} } // MockServerTypeClientMockRecorder is the mock recorder for MockServerTypeClient. @@ -36,39 +42,39 @@ func (m *MockServerTypeClient) EXPECT() *MockServerTypeClientMockRecorder { } // All mocks base method. -func (m *MockServerTypeClient) All(arg0 context.Context) ([]*hcloud.ServerType, error) { +func (m *MockServerTypeClient) All(ctx context.Context) ([]*hcloud.ServerType, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.ServerType) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockServerTypeClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockServerTypeClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockServerTypeClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockServerTypeClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockServerTypeClient) AllWithOpts(arg0 context.Context, arg1 hcloud.ServerTypeListOpts) ([]*hcloud.ServerType, error) { +func (m *MockServerTypeClient) AllWithOpts(ctx context.Context, opts hcloud.ServerTypeListOpts) ([]*hcloud.ServerType, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.ServerType) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockServerTypeClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerTypeClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockServerTypeClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockServerTypeClient)(nil).AllWithOpts), ctx, opts) } // Get mocks base method. -func (m *MockServerTypeClient) Get(arg0 context.Context, arg1 string) (*hcloud.ServerType, *hcloud.Response, error) { +func (m *MockServerTypeClient) Get(ctx context.Context, idOrName string) (*hcloud.ServerType, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.ServerType) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -76,15 +82,15 @@ func (m *MockServerTypeClient) Get(arg0 context.Context, arg1 string) (*hcloud.S } // Get indicates an expected call of Get. -func (mr *MockServerTypeClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerTypeClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockServerTypeClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockServerTypeClient)(nil).Get), ctx, idOrName) } // GetByID mocks base method. -func (m *MockServerTypeClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.ServerType, *hcloud.Response, error) { +func (m *MockServerTypeClient) GetByID(ctx context.Context, id int64) (*hcloud.ServerType, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.ServerType) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -92,15 +98,15 @@ func (m *MockServerTypeClient) GetByID(arg0 context.Context, arg1 int64) (*hclou } // GetByID indicates an expected call of GetByID. -func (mr *MockServerTypeClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerTypeClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockServerTypeClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockServerTypeClient)(nil).GetByID), ctx, id) } // GetByName mocks base method. -func (m *MockServerTypeClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.ServerType, *hcloud.Response, error) { +func (m *MockServerTypeClient) GetByName(ctx context.Context, name string) (*hcloud.ServerType, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.ServerType) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -108,15 +114,15 @@ func (m *MockServerTypeClient) GetByName(arg0 context.Context, arg1 string) (*hc } // GetByName indicates an expected call of GetByName. -func (mr *MockServerTypeClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerTypeClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockServerTypeClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockServerTypeClient)(nil).GetByName), ctx, name) } // List mocks base method. -func (m *MockServerTypeClient) List(arg0 context.Context, arg1 hcloud.ServerTypeListOpts) ([]*hcloud.ServerType, *hcloud.Response, error) { +func (m *MockServerTypeClient) List(ctx context.Context, opts hcloud.ServerTypeListOpts) ([]*hcloud.ServerType, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.ServerType) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -124,9 +130,9 @@ func (m *MockServerTypeClient) List(arg0 context.Context, arg1 hcloud.ServerType } // List indicates an expected call of List. -func (mr *MockServerTypeClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServerTypeClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockServerTypeClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockServerTypeClient)(nil).List), ctx, opts) } // Names mocks base method. @@ -144,29 +150,29 @@ func (mr *MockServerTypeClientMockRecorder) Names() *gomock.Call { } // ServerTypeDescription mocks base method. -func (m *MockServerTypeClient) ServerTypeDescription(arg0 int64) string { +func (m *MockServerTypeClient) ServerTypeDescription(id int64) string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ServerTypeDescription", arg0) + ret := m.ctrl.Call(m, "ServerTypeDescription", id) ret0, _ := ret[0].(string) return ret0 } // ServerTypeDescription indicates an expected call of ServerTypeDescription. -func (mr *MockServerTypeClientMockRecorder) ServerTypeDescription(arg0 interface{}) *gomock.Call { +func (mr *MockServerTypeClientMockRecorder) ServerTypeDescription(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerTypeDescription", reflect.TypeOf((*MockServerTypeClient)(nil).ServerTypeDescription), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerTypeDescription", reflect.TypeOf((*MockServerTypeClient)(nil).ServerTypeDescription), id) } // ServerTypeName mocks base method. -func (m *MockServerTypeClient) ServerTypeName(arg0 int64) string { +func (m *MockServerTypeClient) ServerTypeName(id int64) string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ServerTypeName", arg0) + ret := m.ctrl.Call(m, "ServerTypeName", id) ret0, _ := ret[0].(string) return ret0 } // ServerTypeName indicates an expected call of ServerTypeName. -func (mr *MockServerTypeClientMockRecorder) ServerTypeName(arg0 interface{}) *gomock.Call { +func (mr *MockServerTypeClientMockRecorder) ServerTypeName(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerTypeName", reflect.TypeOf((*MockServerTypeClient)(nil).ServerTypeName), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerTypeName", reflect.TypeOf((*MockServerTypeClient)(nil).ServerTypeName), id) } diff --git a/internal/hcapi2/mock/zz_ssh_key_client_mock.go b/internal/hcapi2/mock/zz_ssh_key_client_mock.go index e2f55d37..02744be3 100644 --- a/internal/hcapi2/mock/zz_ssh_key_client_mock.go +++ b/internal/hcapi2/mock/zz_ssh_key_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: SSHKeyClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_ssh_key_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 SSHKeyClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockSSHKeyClient is a mock of SSHKeyClient interface. type MockSSHKeyClient struct { ctrl *gomock.Controller recorder *MockSSHKeyClientMockRecorder + isgomock struct{} } // MockSSHKeyClientMockRecorder is the mock recorder for MockSSHKeyClient. @@ -36,39 +42,39 @@ func (m *MockSSHKeyClient) EXPECT() *MockSSHKeyClientMockRecorder { } // All mocks base method. -func (m *MockSSHKeyClient) All(arg0 context.Context) ([]*hcloud.SSHKey, error) { +func (m *MockSSHKeyClient) All(ctx context.Context) ([]*hcloud.SSHKey, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.SSHKey) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockSSHKeyClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockSSHKeyClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockSSHKeyClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockSSHKeyClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockSSHKeyClient) AllWithOpts(arg0 context.Context, arg1 hcloud.SSHKeyListOpts) ([]*hcloud.SSHKey, error) { +func (m *MockSSHKeyClient) AllWithOpts(ctx context.Context, opts hcloud.SSHKeyListOpts) ([]*hcloud.SSHKey, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.SSHKey) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockSSHKeyClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockSSHKeyClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockSSHKeyClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockSSHKeyClient)(nil).AllWithOpts), ctx, opts) } // Create mocks base method. -func (m *MockSSHKeyClient) Create(arg0 context.Context, arg1 hcloud.SSHKeyCreateOpts) (*hcloud.SSHKey, *hcloud.Response, error) { +func (m *MockSSHKeyClient) Create(ctx context.Context, opts hcloud.SSHKeyCreateOpts) (*hcloud.SSHKey, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Create", arg0, arg1) + ret := m.ctrl.Call(m, "Create", ctx, opts) ret0, _ := ret[0].(*hcloud.SSHKey) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -76,30 +82,30 @@ func (m *MockSSHKeyClient) Create(arg0 context.Context, arg1 hcloud.SSHKeyCreate } // Create indicates an expected call of Create. -func (mr *MockSSHKeyClientMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockSSHKeyClientMockRecorder) Create(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockSSHKeyClient)(nil).Create), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockSSHKeyClient)(nil).Create), ctx, opts) } // Delete mocks base method. -func (m *MockSSHKeyClient) Delete(arg0 context.Context, arg1 *hcloud.SSHKey) (*hcloud.Response, error) { +func (m *MockSSHKeyClient) Delete(ctx context.Context, sshKey *hcloud.SSHKey) (*hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0, arg1) + ret := m.ctrl.Call(m, "Delete", ctx, sshKey) ret0, _ := ret[0].(*hcloud.Response) ret1, _ := ret[1].(error) return ret0, ret1 } // Delete indicates an expected call of Delete. -func (mr *MockSSHKeyClientMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockSSHKeyClientMockRecorder) Delete(ctx, sshKey any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockSSHKeyClient)(nil).Delete), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockSSHKeyClient)(nil).Delete), ctx, sshKey) } // Get mocks base method. -func (m *MockSSHKeyClient) Get(arg0 context.Context, arg1 string) (*hcloud.SSHKey, *hcloud.Response, error) { +func (m *MockSSHKeyClient) Get(ctx context.Context, idOrName string) (*hcloud.SSHKey, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.SSHKey) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -107,15 +113,15 @@ func (m *MockSSHKeyClient) Get(arg0 context.Context, arg1 string) (*hcloud.SSHKe } // Get indicates an expected call of Get. -func (mr *MockSSHKeyClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockSSHKeyClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSSHKeyClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSSHKeyClient)(nil).Get), ctx, idOrName) } // GetByFingerprint mocks base method. -func (m *MockSSHKeyClient) GetByFingerprint(arg0 context.Context, arg1 string) (*hcloud.SSHKey, *hcloud.Response, error) { +func (m *MockSSHKeyClient) GetByFingerprint(ctx context.Context, fingerprint string) (*hcloud.SSHKey, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByFingerprint", arg0, arg1) + ret := m.ctrl.Call(m, "GetByFingerprint", ctx, fingerprint) ret0, _ := ret[0].(*hcloud.SSHKey) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -123,15 +129,15 @@ func (m *MockSSHKeyClient) GetByFingerprint(arg0 context.Context, arg1 string) ( } // GetByFingerprint indicates an expected call of GetByFingerprint. -func (mr *MockSSHKeyClientMockRecorder) GetByFingerprint(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockSSHKeyClientMockRecorder) GetByFingerprint(ctx, fingerprint any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByFingerprint", reflect.TypeOf((*MockSSHKeyClient)(nil).GetByFingerprint), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByFingerprint", reflect.TypeOf((*MockSSHKeyClient)(nil).GetByFingerprint), ctx, fingerprint) } // GetByID mocks base method. -func (m *MockSSHKeyClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.SSHKey, *hcloud.Response, error) { +func (m *MockSSHKeyClient) GetByID(ctx context.Context, id int64) (*hcloud.SSHKey, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.SSHKey) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -139,15 +145,15 @@ func (m *MockSSHKeyClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.SS } // GetByID indicates an expected call of GetByID. -func (mr *MockSSHKeyClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockSSHKeyClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockSSHKeyClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockSSHKeyClient)(nil).GetByID), ctx, id) } // GetByName mocks base method. -func (m *MockSSHKeyClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.SSHKey, *hcloud.Response, error) { +func (m *MockSSHKeyClient) GetByName(ctx context.Context, name string) (*hcloud.SSHKey, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.SSHKey) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -155,29 +161,29 @@ func (m *MockSSHKeyClient) GetByName(arg0 context.Context, arg1 string) (*hcloud } // GetByName indicates an expected call of GetByName. -func (mr *MockSSHKeyClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockSSHKeyClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockSSHKeyClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockSSHKeyClient)(nil).GetByName), ctx, name) } // LabelKeys mocks base method. -func (m *MockSSHKeyClient) LabelKeys(arg0 string) []string { +func (m *MockSSHKeyClient) LabelKeys(idOrName string) []string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LabelKeys", arg0) + ret := m.ctrl.Call(m, "LabelKeys", idOrName) ret0, _ := ret[0].([]string) return ret0 } // LabelKeys indicates an expected call of LabelKeys. -func (mr *MockSSHKeyClientMockRecorder) LabelKeys(arg0 interface{}) *gomock.Call { +func (mr *MockSSHKeyClientMockRecorder) LabelKeys(idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockSSHKeyClient)(nil).LabelKeys), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockSSHKeyClient)(nil).LabelKeys), idOrName) } // List mocks base method. -func (m *MockSSHKeyClient) List(arg0 context.Context, arg1 hcloud.SSHKeyListOpts) ([]*hcloud.SSHKey, *hcloud.Response, error) { +func (m *MockSSHKeyClient) List(ctx context.Context, opts hcloud.SSHKeyListOpts) ([]*hcloud.SSHKey, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.SSHKey) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -185,9 +191,9 @@ func (m *MockSSHKeyClient) List(arg0 context.Context, arg1 hcloud.SSHKeyListOpts } // List indicates an expected call of List. -func (mr *MockSSHKeyClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockSSHKeyClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockSSHKeyClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockSSHKeyClient)(nil).List), ctx, opts) } // Names mocks base method. @@ -205,9 +211,9 @@ func (mr *MockSSHKeyClientMockRecorder) Names() *gomock.Call { } // Update mocks base method. -func (m *MockSSHKeyClient) Update(arg0 context.Context, arg1 *hcloud.SSHKey, arg2 hcloud.SSHKeyUpdateOpts) (*hcloud.SSHKey, *hcloud.Response, error) { +func (m *MockSSHKeyClient) Update(ctx context.Context, sshKey *hcloud.SSHKey, opts hcloud.SSHKeyUpdateOpts) (*hcloud.SSHKey, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Update", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Update", ctx, sshKey, opts) ret0, _ := ret[0].(*hcloud.SSHKey) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -215,7 +221,7 @@ func (m *MockSSHKeyClient) Update(arg0 context.Context, arg1 *hcloud.SSHKey, arg } // Update indicates an expected call of Update. -func (mr *MockSSHKeyClientMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockSSHKeyClientMockRecorder) Update(ctx, sshKey, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockSSHKeyClient)(nil).Update), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockSSHKeyClient)(nil).Update), ctx, sshKey, opts) } diff --git a/internal/hcapi2/mock/zz_volume_client_mock.go b/internal/hcapi2/mock/zz_volume_client_mock.go index 0f776411..61905209 100644 --- a/internal/hcapi2/mock/zz_volume_client_mock.go +++ b/internal/hcapi2/mock/zz_volume_client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/hcapi2 (interfaces: VolumeClient) +// +// Generated by this command: +// +// mockgen -package mock -destination zz_volume_client_mock.go github.com/hetznercloud/cli/internal/hcapi2 VolumeClient +// // Package mock is a generated GoMock package. package mock @@ -8,14 +13,15 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" + gomock "go.uber.org/mock/gomock" ) // MockVolumeClient is a mock of VolumeClient interface. type MockVolumeClient struct { ctrl *gomock.Controller recorder *MockVolumeClientMockRecorder + isgomock struct{} } // MockVolumeClientMockRecorder is the mock recorder for MockVolumeClient. @@ -36,39 +42,39 @@ func (m *MockVolumeClient) EXPECT() *MockVolumeClientMockRecorder { } // All mocks base method. -func (m *MockVolumeClient) All(arg0 context.Context) ([]*hcloud.Volume, error) { +func (m *MockVolumeClient) All(ctx context.Context) ([]*hcloud.Volume, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "All", arg0) + ret := m.ctrl.Call(m, "All", ctx) ret0, _ := ret[0].([]*hcloud.Volume) ret1, _ := ret[1].(error) return ret0, ret1 } // All indicates an expected call of All. -func (mr *MockVolumeClientMockRecorder) All(arg0 interface{}) *gomock.Call { +func (mr *MockVolumeClientMockRecorder) All(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockVolumeClient)(nil).All), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockVolumeClient)(nil).All), ctx) } // AllWithOpts mocks base method. -func (m *MockVolumeClient) AllWithOpts(arg0 context.Context, arg1 hcloud.VolumeListOpts) ([]*hcloud.Volume, error) { +func (m *MockVolumeClient) AllWithOpts(ctx context.Context, opts hcloud.VolumeListOpts) ([]*hcloud.Volume, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AllWithOpts", arg0, arg1) + ret := m.ctrl.Call(m, "AllWithOpts", ctx, opts) ret0, _ := ret[0].([]*hcloud.Volume) ret1, _ := ret[1].(error) return ret0, ret1 } // AllWithOpts indicates an expected call of AllWithOpts. -func (mr *MockVolumeClientMockRecorder) AllWithOpts(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockVolumeClientMockRecorder) AllWithOpts(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockVolumeClient)(nil).AllWithOpts), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllWithOpts", reflect.TypeOf((*MockVolumeClient)(nil).AllWithOpts), ctx, opts) } // Attach mocks base method. -func (m *MockVolumeClient) Attach(arg0 context.Context, arg1 *hcloud.Volume, arg2 *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockVolumeClient) Attach(ctx context.Context, volume *hcloud.Volume, server *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Attach", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Attach", ctx, volume, server) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -76,15 +82,15 @@ func (m *MockVolumeClient) Attach(arg0 context.Context, arg1 *hcloud.Volume, arg } // Attach indicates an expected call of Attach. -func (mr *MockVolumeClientMockRecorder) Attach(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockVolumeClientMockRecorder) Attach(ctx, volume, server any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Attach", reflect.TypeOf((*MockVolumeClient)(nil).Attach), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Attach", reflect.TypeOf((*MockVolumeClient)(nil).Attach), ctx, volume, server) } // AttachWithOpts mocks base method. -func (m *MockVolumeClient) AttachWithOpts(arg0 context.Context, arg1 *hcloud.Volume, arg2 hcloud.VolumeAttachOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockVolumeClient) AttachWithOpts(ctx context.Context, volume *hcloud.Volume, opts hcloud.VolumeAttachOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AttachWithOpts", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AttachWithOpts", ctx, volume, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -92,15 +98,15 @@ func (m *MockVolumeClient) AttachWithOpts(arg0 context.Context, arg1 *hcloud.Vol } // AttachWithOpts indicates an expected call of AttachWithOpts. -func (mr *MockVolumeClientMockRecorder) AttachWithOpts(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockVolumeClientMockRecorder) AttachWithOpts(ctx, volume, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachWithOpts", reflect.TypeOf((*MockVolumeClient)(nil).AttachWithOpts), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachWithOpts", reflect.TypeOf((*MockVolumeClient)(nil).AttachWithOpts), ctx, volume, opts) } // ChangeProtection mocks base method. -func (m *MockVolumeClient) ChangeProtection(arg0 context.Context, arg1 *hcloud.Volume, arg2 hcloud.VolumeChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockVolumeClient) ChangeProtection(ctx context.Context, volume *hcloud.Volume, opts hcloud.VolumeChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ChangeProtection", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ChangeProtection", ctx, volume, opts) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -108,15 +114,15 @@ func (m *MockVolumeClient) ChangeProtection(arg0 context.Context, arg1 *hcloud.V } // ChangeProtection indicates an expected call of ChangeProtection. -func (mr *MockVolumeClientMockRecorder) ChangeProtection(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockVolumeClientMockRecorder) ChangeProtection(ctx, volume, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeProtection", reflect.TypeOf((*MockVolumeClient)(nil).ChangeProtection), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeProtection", reflect.TypeOf((*MockVolumeClient)(nil).ChangeProtection), ctx, volume, opts) } // Create mocks base method. -func (m *MockVolumeClient) Create(arg0 context.Context, arg1 hcloud.VolumeCreateOpts) (hcloud.VolumeCreateResult, *hcloud.Response, error) { +func (m *MockVolumeClient) Create(ctx context.Context, opts hcloud.VolumeCreateOpts) (hcloud.VolumeCreateResult, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Create", arg0, arg1) + ret := m.ctrl.Call(m, "Create", ctx, opts) ret0, _ := ret[0].(hcloud.VolumeCreateResult) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -124,30 +130,30 @@ func (m *MockVolumeClient) Create(arg0 context.Context, arg1 hcloud.VolumeCreate } // Create indicates an expected call of Create. -func (mr *MockVolumeClientMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockVolumeClientMockRecorder) Create(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockVolumeClient)(nil).Create), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockVolumeClient)(nil).Create), ctx, opts) } // Delete mocks base method. -func (m *MockVolumeClient) Delete(arg0 context.Context, arg1 *hcloud.Volume) (*hcloud.Response, error) { +func (m *MockVolumeClient) Delete(ctx context.Context, volume *hcloud.Volume) (*hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0, arg1) + ret := m.ctrl.Call(m, "Delete", ctx, volume) ret0, _ := ret[0].(*hcloud.Response) ret1, _ := ret[1].(error) return ret0, ret1 } // Delete indicates an expected call of Delete. -func (mr *MockVolumeClientMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockVolumeClientMockRecorder) Delete(ctx, volume any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockVolumeClient)(nil).Delete), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockVolumeClient)(nil).Delete), ctx, volume) } // Detach mocks base method. -func (m *MockVolumeClient) Detach(arg0 context.Context, arg1 *hcloud.Volume) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockVolumeClient) Detach(ctx context.Context, volume *hcloud.Volume) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Detach", arg0, arg1) + ret := m.ctrl.Call(m, "Detach", ctx, volume) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -155,15 +161,15 @@ func (m *MockVolumeClient) Detach(arg0 context.Context, arg1 *hcloud.Volume) (*h } // Detach indicates an expected call of Detach. -func (mr *MockVolumeClientMockRecorder) Detach(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockVolumeClientMockRecorder) Detach(ctx, volume any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Detach", reflect.TypeOf((*MockVolumeClient)(nil).Detach), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Detach", reflect.TypeOf((*MockVolumeClient)(nil).Detach), ctx, volume) } // Get mocks base method. -func (m *MockVolumeClient) Get(arg0 context.Context, arg1 string) (*hcloud.Volume, *hcloud.Response, error) { +func (m *MockVolumeClient) Get(ctx context.Context, idOrName string) (*hcloud.Volume, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", ctx, idOrName) ret0, _ := ret[0].(*hcloud.Volume) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -171,15 +177,15 @@ func (m *MockVolumeClient) Get(arg0 context.Context, arg1 string) (*hcloud.Volum } // Get indicates an expected call of Get. -func (mr *MockVolumeClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockVolumeClientMockRecorder) Get(ctx, idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockVolumeClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockVolumeClient)(nil).Get), ctx, idOrName) } // GetByID mocks base method. -func (m *MockVolumeClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.Volume, *hcloud.Response, error) { +func (m *MockVolumeClient) GetByID(ctx context.Context, id int64) (*hcloud.Volume, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetByID", ctx, id) ret0, _ := ret[0].(*hcloud.Volume) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -187,15 +193,15 @@ func (m *MockVolumeClient) GetByID(arg0 context.Context, arg1 int64) (*hcloud.Vo } // GetByID indicates an expected call of GetByID. -func (mr *MockVolumeClientMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockVolumeClientMockRecorder) GetByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockVolumeClient)(nil).GetByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockVolumeClient)(nil).GetByID), ctx, id) } // GetByName mocks base method. -func (m *MockVolumeClient) GetByName(arg0 context.Context, arg1 string) (*hcloud.Volume, *hcloud.Response, error) { +func (m *MockVolumeClient) GetByName(ctx context.Context, name string) (*hcloud.Volume, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetByName", arg0, arg1) + ret := m.ctrl.Call(m, "GetByName", ctx, name) ret0, _ := ret[0].(*hcloud.Volume) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -203,29 +209,29 @@ func (m *MockVolumeClient) GetByName(arg0 context.Context, arg1 string) (*hcloud } // GetByName indicates an expected call of GetByName. -func (mr *MockVolumeClientMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockVolumeClientMockRecorder) GetByName(ctx, name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockVolumeClient)(nil).GetByName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockVolumeClient)(nil).GetByName), ctx, name) } // LabelKeys mocks base method. -func (m *MockVolumeClient) LabelKeys(arg0 string) []string { +func (m *MockVolumeClient) LabelKeys(idOrName string) []string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LabelKeys", arg0) + ret := m.ctrl.Call(m, "LabelKeys", idOrName) ret0, _ := ret[0].([]string) return ret0 } // LabelKeys indicates an expected call of LabelKeys. -func (mr *MockVolumeClientMockRecorder) LabelKeys(arg0 interface{}) *gomock.Call { +func (mr *MockVolumeClientMockRecorder) LabelKeys(idOrName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockVolumeClient)(nil).LabelKeys), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LabelKeys", reflect.TypeOf((*MockVolumeClient)(nil).LabelKeys), idOrName) } // List mocks base method. -func (m *MockVolumeClient) List(arg0 context.Context, arg1 hcloud.VolumeListOpts) ([]*hcloud.Volume, *hcloud.Response, error) { +func (m *MockVolumeClient) List(ctx context.Context, opts hcloud.VolumeListOpts) ([]*hcloud.Volume, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) + ret := m.ctrl.Call(m, "List", ctx, opts) ret0, _ := ret[0].([]*hcloud.Volume) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -233,9 +239,9 @@ func (m *MockVolumeClient) List(arg0 context.Context, arg1 hcloud.VolumeListOpts } // List indicates an expected call of List. -func (mr *MockVolumeClientMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockVolumeClientMockRecorder) List(ctx, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockVolumeClient)(nil).List), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockVolumeClient)(nil).List), ctx, opts) } // Names mocks base method. @@ -253,9 +259,9 @@ func (mr *MockVolumeClientMockRecorder) Names() *gomock.Call { } // Resize mocks base method. -func (m *MockVolumeClient) Resize(arg0 context.Context, arg1 *hcloud.Volume, arg2 int) (*hcloud.Action, *hcloud.Response, error) { +func (m *MockVolumeClient) Resize(ctx context.Context, volume *hcloud.Volume, size int) (*hcloud.Action, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Resize", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Resize", ctx, volume, size) ret0, _ := ret[0].(*hcloud.Action) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -263,15 +269,15 @@ func (m *MockVolumeClient) Resize(arg0 context.Context, arg1 *hcloud.Volume, arg } // Resize indicates an expected call of Resize. -func (mr *MockVolumeClientMockRecorder) Resize(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockVolumeClientMockRecorder) Resize(ctx, volume, size any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resize", reflect.TypeOf((*MockVolumeClient)(nil).Resize), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resize", reflect.TypeOf((*MockVolumeClient)(nil).Resize), ctx, volume, size) } // Update mocks base method. -func (m *MockVolumeClient) Update(arg0 context.Context, arg1 *hcloud.Volume, arg2 hcloud.VolumeUpdateOpts) (*hcloud.Volume, *hcloud.Response, error) { +func (m *MockVolumeClient) Update(ctx context.Context, volume *hcloud.Volume, opts hcloud.VolumeUpdateOpts) (*hcloud.Volume, *hcloud.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Update", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Update", ctx, volume, opts) ret0, _ := ret[0].(*hcloud.Volume) ret1, _ := ret[1].(*hcloud.Response) ret2, _ := ret[2].(error) @@ -279,7 +285,7 @@ func (m *MockVolumeClient) Update(arg0 context.Context, arg1 *hcloud.Volume, arg } // Update indicates an expected call of Update. -func (mr *MockVolumeClientMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockVolumeClientMockRecorder) Update(ctx, volume, opts any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockVolumeClient)(nil).Update), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockVolumeClient)(nil).Update), ctx, volume, opts) } diff --git a/internal/state/actions_test.go b/internal/state/actions_test.go index 4c32ef1a..cd625e97 100644 --- a/internal/state/actions_test.go +++ b/internal/state/actions_test.go @@ -7,9 +7,9 @@ import ( "strings" "testing" - gomock "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + gomock "go.uber.org/mock/gomock" hcapi2_mock "github.com/hetznercloud/cli/internal/hcapi2/mock" "github.com/hetznercloud/hcloud-go/v2/hcloud" diff --git a/internal/state/command_helpers.go b/internal/state/command_helpers.go index e18f5c78..14551658 100644 --- a/internal/state/command_helpers.go +++ b/internal/state/command_helpers.go @@ -8,7 +8,7 @@ import ( "github.com/hetznercloud/hcloud-go/v2/hcloud" ) -//go:generate go run github.com/golang/mock/mockgen -package state -destination zz_command_helper_mock.go . ActionWaiter,TokenEnsurer +//go:generate go run go.uber.org/mock/mockgen -package state -destination zz_command_helper_mock.go . ActionWaiter,TokenEnsurer type ActionWaiter interface { WaitForActions(context.Context, *cobra.Command, ...*hcloud.Action) error diff --git a/internal/state/zz_command_helper_mock.go b/internal/state/zz_command_helper_mock.go index 29dd0eef..052a1c6c 100644 --- a/internal/state/zz_command_helper_mock.go +++ b/internal/state/zz_command_helper_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/state (interfaces: ActionWaiter,TokenEnsurer) +// +// Generated by this command: +// +// mockgen -package state -destination zz_command_helper_mock.go . ActionWaiter,TokenEnsurer +// // Package state is a generated GoMock package. package state @@ -8,15 +13,16 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" hcloud "github.com/hetznercloud/hcloud-go/v2/hcloud" cobra "github.com/spf13/cobra" + gomock "go.uber.org/mock/gomock" ) // MockActionWaiter is a mock of ActionWaiter interface. type MockActionWaiter struct { ctrl *gomock.Controller recorder *MockActionWaiterMockRecorder + isgomock struct{} } // MockActionWaiterMockRecorder is the mock recorder for MockActionWaiter. @@ -39,7 +45,7 @@ func (m *MockActionWaiter) EXPECT() *MockActionWaiterMockRecorder { // WaitForActions mocks base method. func (m *MockActionWaiter) WaitForActions(arg0 context.Context, arg1 *cobra.Command, arg2 ...*hcloud.Action) error { m.ctrl.T.Helper() - varargs := []interface{}{arg0, arg1} + varargs := []any{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) } @@ -49,9 +55,9 @@ func (m *MockActionWaiter) WaitForActions(arg0 context.Context, arg1 *cobra.Comm } // WaitForActions indicates an expected call of WaitForActions. -func (mr *MockActionWaiterMockRecorder) WaitForActions(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { +func (mr *MockActionWaiterMockRecorder) WaitForActions(arg0, arg1 any, arg2 ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{arg0, arg1}, arg2...) + varargs := append([]any{arg0, arg1}, arg2...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForActions", reflect.TypeOf((*MockActionWaiter)(nil).WaitForActions), varargs...) } @@ -59,6 +65,7 @@ func (mr *MockActionWaiterMockRecorder) WaitForActions(arg0, arg1 interface{}, a type MockTokenEnsurer struct { ctrl *gomock.Controller recorder *MockTokenEnsurerMockRecorder + isgomock struct{} } // MockTokenEnsurerMockRecorder is the mock recorder for MockTokenEnsurer. @@ -79,15 +86,15 @@ func (m *MockTokenEnsurer) EXPECT() *MockTokenEnsurerMockRecorder { } // EnsureToken mocks base method. -func (m *MockTokenEnsurer) EnsureToken(arg0 *cobra.Command, arg1 []string) error { +func (m *MockTokenEnsurer) EnsureToken(cmd *cobra.Command, args []string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnsureToken", arg0, arg1) + ret := m.ctrl.Call(m, "EnsureToken", cmd, args) ret0, _ := ret[0].(error) return ret0 } // EnsureToken indicates an expected call of EnsureToken. -func (mr *MockTokenEnsurerMockRecorder) EnsureToken(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockTokenEnsurerMockRecorder) EnsureToken(cmd, args any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureToken", reflect.TypeOf((*MockTokenEnsurer)(nil).EnsureToken), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureToken", reflect.TypeOf((*MockTokenEnsurer)(nil).EnsureToken), cmd, args) } diff --git a/internal/testutil/fixture.go b/internal/testutil/fixture.go index 68e1c413..fa165496 100644 --- a/internal/testutil/fixture.go +++ b/internal/testutil/fixture.go @@ -6,8 +6,8 @@ import ( "os" "testing" - "github.com/golang/mock/gomock" "github.com/spf13/cobra" + "go.uber.org/mock/gomock" "github.com/hetznercloud/cli/internal/hcapi2" hcapi2_mock "github.com/hetznercloud/cli/internal/hcapi2/mock" diff --git a/internal/testutil/terminal/terminal.go b/internal/testutil/terminal/terminal.go index 6b8e2c2d..32020650 100644 --- a/internal/testutil/terminal/terminal.go +++ b/internal/testutil/terminal/terminal.go @@ -6,7 +6,7 @@ import ( "github.com/hetznercloud/cli/internal/ui" ) -//go:generate go run github.com/golang/mock/mockgen -package terminal -destination zz_terminal_mock.go . Terminal +//go:generate go run go.uber.org/mock/mockgen -package terminal -destination zz_terminal_mock.go . Terminal type Terminal interface { StdoutIsTerminal() bool diff --git a/internal/testutil/terminal/zz_terminal_mock.go b/internal/testutil/terminal/zz_terminal_mock.go index 4b97432a..42dc7e9c 100644 --- a/internal/testutil/terminal/zz_terminal_mock.go +++ b/internal/testutil/terminal/zz_terminal_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hetznercloud/cli/internal/testutil/terminal (interfaces: Terminal) +// +// Generated by this command: +// +// mockgen -package terminal -destination zz_terminal_mock.go . Terminal +// // Package terminal is a generated GoMock package. package terminal @@ -7,13 +12,14 @@ package terminal import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockTerminal is a mock of Terminal interface. type MockTerminal struct { ctrl *gomock.Controller recorder *MockTerminalMockRecorder + isgomock struct{} } // MockTerminalMockRecorder is the mock recorder for MockTerminal. @@ -34,18 +40,18 @@ func (m *MockTerminal) EXPECT() *MockTerminalMockRecorder { } // ReadPassword mocks base method. -func (m *MockTerminal) ReadPassword(arg0 int) ([]byte, error) { +func (m *MockTerminal) ReadPassword(fd int) ([]byte, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ReadPassword", arg0) + ret := m.ctrl.Call(m, "ReadPassword", fd) ret0, _ := ret[0].([]byte) ret1, _ := ret[1].(error) return ret0, ret1 } // ReadPassword indicates an expected call of ReadPassword. -func (mr *MockTerminalMockRecorder) ReadPassword(arg0 interface{}) *gomock.Call { +func (mr *MockTerminalMockRecorder) ReadPassword(fd any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadPassword", reflect.TypeOf((*MockTerminal)(nil).ReadPassword), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadPassword", reflect.TypeOf((*MockTerminal)(nil).ReadPassword), fd) } // StdoutIsTerminal mocks base method. diff --git a/tools.go b/tools.go index 3b2e6efe..5f26fa48 100644 --- a/tools.go +++ b/tools.go @@ -4,5 +4,5 @@ package tools import ( - _ "github.com/golang/mock/mockgen" + _ "go.uber.org/mock/mockgen" )