Bump go version to 1.24.6 and run go generate

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2025-08-21 20:14:36 +00:00
parent 48769587bb
commit 8d5c6b6738
2 changed files with 43 additions and 103 deletions

View file

@ -73,9 +73,9 @@ func (_c *Store_AddEntityEvent_Call) RunAndReturn(run func(context.Context, para
return _c return _c
} }
// AddInstanceEvent provides a mock function with given fields: ctx, instanceName, event, eventLevel, eventMessage // AddInstanceEvent provides a mock function with given fields: ctx, instanceNameOrID, event, eventLevel, eventMessage
func (_m *Store) AddInstanceEvent(ctx context.Context, instanceName string, event params.EventType, eventLevel params.EventLevel, eventMessage string) error { func (_m *Store) AddInstanceEvent(ctx context.Context, instanceNameOrID string, event params.EventType, eventLevel params.EventLevel, eventMessage string) error {
ret := _m.Called(ctx, instanceName, event, eventLevel, eventMessage) ret := _m.Called(ctx, instanceNameOrID, event, eventLevel, eventMessage)
if len(ret) == 0 { if len(ret) == 0 {
panic("no return value specified for AddInstanceEvent") panic("no return value specified for AddInstanceEvent")
@ -83,7 +83,7 @@ func (_m *Store) AddInstanceEvent(ctx context.Context, instanceName string, even
var r0 error var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, params.EventType, params.EventLevel, string) error); ok { if rf, ok := ret.Get(0).(func(context.Context, string, params.EventType, params.EventLevel, string) error); ok {
r0 = rf(ctx, instanceName, event, eventLevel, eventMessage) r0 = rf(ctx, instanceNameOrID, event, eventLevel, eventMessage)
} else { } else {
r0 = ret.Error(0) r0 = ret.Error(0)
} }
@ -98,15 +98,15 @@ type Store_AddInstanceEvent_Call struct {
// AddInstanceEvent is a helper method to define mock.On call // AddInstanceEvent is a helper method to define mock.On call
// - ctx context.Context // - ctx context.Context
// - instanceName string // - instanceNameOrID string
// - event params.EventType // - event params.EventType
// - eventLevel params.EventLevel // - eventLevel params.EventLevel
// - eventMessage string // - eventMessage string
func (_e *Store_Expecter) AddInstanceEvent(ctx interface{}, instanceName interface{}, event interface{}, eventLevel interface{}, eventMessage interface{}) *Store_AddInstanceEvent_Call { func (_e *Store_Expecter) AddInstanceEvent(ctx interface{}, instanceNameOrID interface{}, event interface{}, eventLevel interface{}, eventMessage interface{}) *Store_AddInstanceEvent_Call {
return &Store_AddInstanceEvent_Call{Call: _e.mock.On("AddInstanceEvent", ctx, instanceName, event, eventLevel, eventMessage)} return &Store_AddInstanceEvent_Call{Call: _e.mock.On("AddInstanceEvent", ctx, instanceNameOrID, event, eventLevel, eventMessage)}
} }
func (_c *Store_AddInstanceEvent_Call) Run(run func(ctx context.Context, instanceName string, event params.EventType, eventLevel params.EventLevel, eventMessage string)) *Store_AddInstanceEvent_Call { func (_c *Store_AddInstanceEvent_Call) Run(run func(ctx context.Context, instanceNameOrID string, event params.EventType, eventLevel params.EventLevel, eventMessage string)) *Store_AddInstanceEvent_Call {
_c.Call.Run(func(args mock.Arguments) { _c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(params.EventType), args[3].(params.EventLevel), args[4].(string)) run(args[0].(context.Context), args[1].(string), args[2].(params.EventType), args[3].(params.EventLevel), args[4].(string))
}) })
@ -1309,9 +1309,9 @@ func (_c *Store_DeleteGithubEndpoint_Call) RunAndReturn(run func(context.Context
return _c return _c
} }
// DeleteInstance provides a mock function with given fields: ctx, poolID, instanceName // DeleteInstance provides a mock function with given fields: ctx, poolID, instanceNameOrID
func (_m *Store) DeleteInstance(ctx context.Context, poolID string, instanceName string) error { func (_m *Store) DeleteInstance(ctx context.Context, poolID string, instanceNameOrID string) error {
ret := _m.Called(ctx, poolID, instanceName) ret := _m.Called(ctx, poolID, instanceNameOrID)
if len(ret) == 0 { if len(ret) == 0 {
panic("no return value specified for DeleteInstance") panic("no return value specified for DeleteInstance")
@ -1319,7 +1319,7 @@ func (_m *Store) DeleteInstance(ctx context.Context, poolID string, instanceName
var r0 error var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
r0 = rf(ctx, poolID, instanceName) r0 = rf(ctx, poolID, instanceNameOrID)
} else { } else {
r0 = ret.Error(0) r0 = ret.Error(0)
} }
@ -1335,12 +1335,12 @@ type Store_DeleteInstance_Call struct {
// DeleteInstance is a helper method to define mock.On call // DeleteInstance is a helper method to define mock.On call
// - ctx context.Context // - ctx context.Context
// - poolID string // - poolID string
// - instanceName string // - instanceNameOrID string
func (_e *Store_Expecter) DeleteInstance(ctx interface{}, poolID interface{}, instanceName interface{}) *Store_DeleteInstance_Call { func (_e *Store_Expecter) DeleteInstance(ctx interface{}, poolID interface{}, instanceNameOrID interface{}) *Store_DeleteInstance_Call {
return &Store_DeleteInstance_Call{Call: _e.mock.On("DeleteInstance", ctx, poolID, instanceName)} return &Store_DeleteInstance_Call{Call: _e.mock.On("DeleteInstance", ctx, poolID, instanceNameOrID)}
} }
func (_c *Store_DeleteInstance_Call) Run(run func(ctx context.Context, poolID string, instanceName string)) *Store_DeleteInstance_Call { func (_c *Store_DeleteInstance_Call) Run(run func(ctx context.Context, poolID string, instanceNameOrID string)) *Store_DeleteInstance_Call {
_c.Call.Run(func(args mock.Arguments) { _c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(string)) run(args[0].(context.Context), args[1].(string), args[2].(string))
}) })
@ -2333,27 +2333,27 @@ func (_c *Store_GetGithubEndpoint_Call) RunAndReturn(run func(context.Context, s
return _c return _c
} }
// GetInstanceByName provides a mock function with given fields: ctx, instanceName // GetInstance provides a mock function with given fields: ctx, instanceNameOrID
func (_m *Store) GetInstanceByName(ctx context.Context, instanceName string) (params.Instance, error) { func (_m *Store) GetInstance(ctx context.Context, instanceNameOrID string) (params.Instance, error) {
ret := _m.Called(ctx, instanceName) ret := _m.Called(ctx, instanceNameOrID)
if len(ret) == 0 { if len(ret) == 0 {
panic("no return value specified for GetInstanceByName") panic("no return value specified for GetInstance")
} }
var r0 params.Instance var r0 params.Instance
var r1 error var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Instance, error)); ok { if rf, ok := ret.Get(0).(func(context.Context, string) (params.Instance, error)); ok {
return rf(ctx, instanceName) return rf(ctx, instanceNameOrID)
} }
if rf, ok := ret.Get(0).(func(context.Context, string) params.Instance); ok { if rf, ok := ret.Get(0).(func(context.Context, string) params.Instance); ok {
r0 = rf(ctx, instanceName) r0 = rf(ctx, instanceNameOrID)
} else { } else {
r0 = ret.Get(0).(params.Instance) r0 = ret.Get(0).(params.Instance)
} }
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, instanceName) r1 = rf(ctx, instanceNameOrID)
} else { } else {
r1 = ret.Error(1) r1 = ret.Error(1)
} }
@ -2361,31 +2361,31 @@ func (_m *Store) GetInstanceByName(ctx context.Context, instanceName string) (pa
return r0, r1 return r0, r1
} }
// Store_GetInstanceByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInstanceByName' // Store_GetInstance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInstance'
type Store_GetInstanceByName_Call struct { type Store_GetInstance_Call struct {
*mock.Call *mock.Call
} }
// GetInstanceByName is a helper method to define mock.On call // GetInstance is a helper method to define mock.On call
// - ctx context.Context // - ctx context.Context
// - instanceName string // - instanceNameOrID string
func (_e *Store_Expecter) GetInstanceByName(ctx interface{}, instanceName interface{}) *Store_GetInstanceByName_Call { func (_e *Store_Expecter) GetInstance(ctx interface{}, instanceNameOrID interface{}) *Store_GetInstance_Call {
return &Store_GetInstanceByName_Call{Call: _e.mock.On("GetInstanceByName", ctx, instanceName)} return &Store_GetInstance_Call{Call: _e.mock.On("GetInstance", ctx, instanceNameOrID)}
} }
func (_c *Store_GetInstanceByName_Call) Run(run func(ctx context.Context, instanceName string)) *Store_GetInstanceByName_Call { func (_c *Store_GetInstance_Call) Run(run func(ctx context.Context, instanceNameOrID string)) *Store_GetInstance_Call {
_c.Call.Run(func(args mock.Arguments) { _c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string)) run(args[0].(context.Context), args[1].(string))
}) })
return _c return _c
} }
func (_c *Store_GetInstanceByName_Call) Return(_a0 params.Instance, _a1 error) *Store_GetInstanceByName_Call { func (_c *Store_GetInstance_Call) Return(_a0 params.Instance, _a1 error) *Store_GetInstance_Call {
_c.Call.Return(_a0, _a1) _c.Call.Return(_a0, _a1)
return _c return _c
} }
func (_c *Store_GetInstanceByName_Call) RunAndReturn(run func(context.Context, string) (params.Instance, error)) *Store_GetInstanceByName_Call { func (_c *Store_GetInstance_Call) RunAndReturn(run func(context.Context, string) (params.Instance, error)) *Store_GetInstance_Call {
_c.Call.Return(run) _c.Call.Return(run)
return _c return _c
} }
@ -2619,64 +2619,6 @@ func (_c *Store_GetPoolByID_Call) RunAndReturn(run func(context.Context, string)
return _c return _c
} }
// GetPoolInstanceByName provides a mock function with given fields: ctx, poolID, instanceName
func (_m *Store) GetPoolInstanceByName(ctx context.Context, poolID string, instanceName string) (params.Instance, error) {
ret := _m.Called(ctx, poolID, instanceName)
if len(ret) == 0 {
panic("no return value specified for GetPoolInstanceByName")
}
var r0 params.Instance
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (params.Instance, error)); ok {
return rf(ctx, poolID, instanceName)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Instance); ok {
r0 = rf(ctx, poolID, instanceName)
} else {
r0 = ret.Get(0).(params.Instance)
}
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, poolID, instanceName)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Store_GetPoolInstanceByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPoolInstanceByName'
type Store_GetPoolInstanceByName_Call struct {
*mock.Call
}
// GetPoolInstanceByName is a helper method to define mock.On call
// - ctx context.Context
// - poolID string
// - instanceName string
func (_e *Store_Expecter) GetPoolInstanceByName(ctx interface{}, poolID interface{}, instanceName interface{}) *Store_GetPoolInstanceByName_Call {
return &Store_GetPoolInstanceByName_Call{Call: _e.mock.On("GetPoolInstanceByName", ctx, poolID, instanceName)}
}
func (_c *Store_GetPoolInstanceByName_Call) Run(run func(ctx context.Context, poolID string, instanceName string)) *Store_GetPoolInstanceByName_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(string))
})
return _c
}
func (_c *Store_GetPoolInstanceByName_Call) Return(_a0 params.Instance, _a1 error) *Store_GetPoolInstanceByName_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *Store_GetPoolInstanceByName_Call) RunAndReturn(run func(context.Context, string, string) (params.Instance, error)) *Store_GetPoolInstanceByName_Call {
_c.Call.Return(run)
return _c
}
// GetRepository provides a mock function with given fields: ctx, owner, name, endpointName // GetRepository provides a mock function with given fields: ctx, owner, name, endpointName
func (_m *Store) GetRepository(ctx context.Context, owner string, name string, endpointName string) (params.Repository, error) { func (_m *Store) GetRepository(ctx context.Context, owner string, name string, endpointName string) (params.Repository, error) {
ret := _m.Called(ctx, owner, name, endpointName) ret := _m.Called(ctx, owner, name, endpointName)
@ -4835,9 +4777,9 @@ func (_c *Store_UpdateGithubEndpoint_Call) RunAndReturn(run func(context.Context
return _c return _c
} }
// UpdateInstance provides a mock function with given fields: ctx, instanceName, param // UpdateInstance provides a mock function with given fields: ctx, instanceNameOrID, param
func (_m *Store) UpdateInstance(ctx context.Context, instanceName string, param params.UpdateInstanceParams) (params.Instance, error) { func (_m *Store) UpdateInstance(ctx context.Context, instanceNameOrID string, param params.UpdateInstanceParams) (params.Instance, error) {
ret := _m.Called(ctx, instanceName, param) ret := _m.Called(ctx, instanceNameOrID, param)
if len(ret) == 0 { if len(ret) == 0 {
panic("no return value specified for UpdateInstance") panic("no return value specified for UpdateInstance")
@ -4846,16 +4788,16 @@ func (_m *Store) UpdateInstance(ctx context.Context, instanceName string, param
var r0 params.Instance var r0 params.Instance
var r1 error var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateInstanceParams) (params.Instance, error)); ok { if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateInstanceParams) (params.Instance, error)); ok {
return rf(ctx, instanceName, param) return rf(ctx, instanceNameOrID, param)
} }
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateInstanceParams) params.Instance); ok { if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateInstanceParams) params.Instance); ok {
r0 = rf(ctx, instanceName, param) r0 = rf(ctx, instanceNameOrID, param)
} else { } else {
r0 = ret.Get(0).(params.Instance) r0 = ret.Get(0).(params.Instance)
} }
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateInstanceParams) error); ok { if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateInstanceParams) error); ok {
r1 = rf(ctx, instanceName, param) r1 = rf(ctx, instanceNameOrID, param)
} else { } else {
r1 = ret.Error(1) r1 = ret.Error(1)
} }
@ -4870,13 +4812,13 @@ type Store_UpdateInstance_Call struct {
// UpdateInstance is a helper method to define mock.On call // UpdateInstance is a helper method to define mock.On call
// - ctx context.Context // - ctx context.Context
// - instanceName string // - instanceNameOrID string
// - param params.UpdateInstanceParams // - param params.UpdateInstanceParams
func (_e *Store_Expecter) UpdateInstance(ctx interface{}, instanceName interface{}, param interface{}) *Store_UpdateInstance_Call { func (_e *Store_Expecter) UpdateInstance(ctx interface{}, instanceNameOrID interface{}, param interface{}) *Store_UpdateInstance_Call {
return &Store_UpdateInstance_Call{Call: _e.mock.On("UpdateInstance", ctx, instanceName, param)} return &Store_UpdateInstance_Call{Call: _e.mock.On("UpdateInstance", ctx, instanceNameOrID, param)}
} }
func (_c *Store_UpdateInstance_Call) Run(run func(ctx context.Context, instanceName string, param params.UpdateInstanceParams)) *Store_UpdateInstance_Call { func (_c *Store_UpdateInstance_Call) Run(run func(ctx context.Context, instanceNameOrID string, param params.UpdateInstanceParams)) *Store_UpdateInstance_Call {
_c.Call.Run(func(args mock.Arguments) { _c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(params.UpdateInstanceParams)) run(args[0].(context.Context), args[1].(string), args[2].(params.UpdateInstanceParams))
}) })

4
go.mod
View file

@ -1,8 +1,6 @@
module github.com/cloudbase/garm module github.com/cloudbase/garm
go 1.23.0 go 1.24.6
toolchain go1.23.6
require ( require (
github.com/BurntSushi/toml v1.5.0 github.com/BurntSushi/toml v1.5.0