chore(Makefile): add go generate target (#6944)

This change adds a core_generate_all make target.
It installs the required tools and runs generate on the complete project.

`golang/mock` is no longer maintained and a fork is available
from the Uber folks. So the latter is used as tool.
All the mock files have been regenerated and are part of the PR.

The obsolete `tools` directory has been removed,
as all the tools are now part of specific make targets.

Co-authored-by: Silvan <silvan.reusser@gmail.com>
This commit is contained in:
Tim Möhlmann
2023-11-22 12:56:43 +02:00
committed by GitHub
parent 2de7ce99c5
commit 2f91679623
64 changed files with 368 additions and 1977 deletions

View File

@@ -1,39 +1,44 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/zitadel/zitadel/internal/notification/channels (interfaces: NotificationChannel)
//
// Generated by this command:
//
// mockgen -package mock -destination ./mock/channel.mock.go github.com/zitadel/zitadel/internal/notification/channels NotificationChannel
//
// Package mock is a generated GoMock package.
package mock
import (
gomock "github.com/golang/mock/gomock"
channels "github.com/zitadel/zitadel/internal/notification/channels"
reflect "reflect"
channels "github.com/zitadel/zitadel/internal/notification/channels"
gomock "go.uber.org/mock/gomock"
)
// MockNotificationChannel is a mock of NotificationChannel interface
// MockNotificationChannel is a mock of NotificationChannel interface.
type MockNotificationChannel struct {
ctrl *gomock.Controller
recorder *MockNotificationChannelMockRecorder
}
// MockNotificationChannelMockRecorder is the mock recorder for MockNotificationChannel
// MockNotificationChannelMockRecorder is the mock recorder for MockNotificationChannel.
type MockNotificationChannelMockRecorder struct {
mock *MockNotificationChannel
}
// NewMockNotificationChannel creates a new mock instance
// NewMockNotificationChannel creates a new mock instance.
func NewMockNotificationChannel(ctrl *gomock.Controller) *MockNotificationChannel {
mock := &MockNotificationChannel{ctrl: ctrl}
mock.recorder = &MockNotificationChannelMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockNotificationChannel) EXPECT() *MockNotificationChannelMockRecorder {
return m.recorder
}
// HandleMessage mocks base method
// HandleMessage mocks base method.
func (m *MockNotificationChannel) HandleMessage(arg0 channels.Message) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HandleMessage", arg0)
@@ -41,8 +46,8 @@ func (m *MockNotificationChannel) HandleMessage(arg0 channels.Message) error {
return ret0
}
// HandleMessage indicates an expected call of HandleMessage
func (mr *MockNotificationChannelMockRecorder) HandleMessage(arg0 interface{}) *gomock.Call {
// HandleMessage indicates an expected call of HandleMessage.
func (mr *MockNotificationChannelMockRecorder) HandleMessage(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleMessage", reflect.TypeOf((*MockNotificationChannel)(nil).HandleMessage), arg0)
}

View File

@@ -1,39 +1,44 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/zitadel/zitadel/internal/notification/channels (interfaces: Message)
//
// Generated by this command:
//
// mockgen -package mock -destination ./mock/message.mock.go github.com/zitadel/zitadel/internal/notification/channels Message
//
// Package mock is a generated GoMock package.
package mock
import (
gomock "github.com/golang/mock/gomock"
eventstore "github.com/zitadel/zitadel/internal/eventstore"
reflect "reflect"
eventstore "github.com/zitadel/zitadel/internal/eventstore"
gomock "go.uber.org/mock/gomock"
)
// MockMessage is a mock of Message interface
// MockMessage is a mock of Message interface.
type MockMessage struct {
ctrl *gomock.Controller
recorder *MockMessageMockRecorder
}
// MockMessageMockRecorder is the mock recorder for MockMessage
// MockMessageMockRecorder is the mock recorder for MockMessage.
type MockMessageMockRecorder struct {
mock *MockMessage
}
// NewMockMessage creates a new mock instance
// NewMockMessage creates a new mock instance.
func NewMockMessage(ctrl *gomock.Controller) *MockMessage {
mock := &MockMessage{ctrl: ctrl}
mock.recorder = &MockMessageMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockMessage) EXPECT() *MockMessageMockRecorder {
return m.recorder
}
// GetContent mocks base method
// GetContent mocks base method.
func (m *MockMessage) GetContent() (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetContent")
@@ -42,13 +47,13 @@ func (m *MockMessage) GetContent() (string, error) {
return ret0, ret1
}
// GetContent indicates an expected call of GetContent
// GetContent indicates an expected call of GetContent.
func (mr *MockMessageMockRecorder) GetContent() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContent", reflect.TypeOf((*MockMessage)(nil).GetContent))
}
// GetTriggeringEvent mocks base method
// GetTriggeringEvent mocks base method.
func (m *MockMessage) GetTriggeringEvent() eventstore.Event {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetTriggeringEvent")
@@ -56,7 +61,7 @@ func (m *MockMessage) GetTriggeringEvent() eventstore.Event {
return ret0
}
// GetTriggeringEvent indicates an expected call of GetTriggeringEvent
// GetTriggeringEvent indicates an expected call of GetTriggeringEvent.
func (mr *MockMessageMockRecorder) GetTriggeringEvent() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTriggeringEvent", reflect.TypeOf((*MockMessage)(nil).GetTriggeringEvent))