feat: runtime manager

This commit is contained in:
Ilia Denisov
2026-04-28 20:39:18 +02:00
committed by GitHub
parent e0a99b346b
commit a7cee15115
289 changed files with 45660 additions and 2207 deletions
@@ -0,0 +1,70 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: galaxy/lobby/internal/ports (interfaces: GMClient)
//
// Generated by this command:
//
// mockgen -destination=../adapters/mocks/mock_gmclient.go -package=mocks galaxy/lobby/internal/ports GMClient
//
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
ports "galaxy/lobby/internal/ports"
reflect "reflect"
gomock "go.uber.org/mock/gomock"
)
// MockGMClient is a mock of GMClient interface.
type MockGMClient struct {
ctrl *gomock.Controller
recorder *MockGMClientMockRecorder
isgomock struct{}
}
// MockGMClientMockRecorder is the mock recorder for MockGMClient.
type MockGMClientMockRecorder struct {
mock *MockGMClient
}
// NewMockGMClient creates a new mock instance.
func NewMockGMClient(ctrl *gomock.Controller) *MockGMClient {
mock := &MockGMClient{ctrl: ctrl}
mock.recorder = &MockGMClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockGMClient) EXPECT() *MockGMClientMockRecorder {
return m.recorder
}
// Ping mocks base method.
func (m *MockGMClient) Ping(ctx context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Ping", ctx)
ret0, _ := ret[0].(error)
return ret0
}
// Ping indicates an expected call of Ping.
func (mr *MockGMClientMockRecorder) Ping(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockGMClient)(nil).Ping), ctx)
}
// RegisterGame mocks base method.
func (m *MockGMClient) RegisterGame(ctx context.Context, request ports.RegisterGameRequest) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RegisterGame", ctx, request)
ret0, _ := ret[0].(error)
return ret0
}
// RegisterGame indicates an expected call of RegisterGame.
func (mr *MockGMClientMockRecorder) RegisterGame(ctx, request any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGame", reflect.TypeOf((*MockGMClient)(nil).RegisterGame), ctx, request)
}
@@ -0,0 +1,57 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: galaxy/lobby/internal/ports (interfaces: IntentPublisher)
//
// Generated by this command:
//
// mockgen -destination=../adapters/mocks/mock_intentpublisher.go -package=mocks galaxy/lobby/internal/ports IntentPublisher
//
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
notificationintent "galaxy/notificationintent"
reflect "reflect"
gomock "go.uber.org/mock/gomock"
)
// MockIntentPublisher is a mock of IntentPublisher interface.
type MockIntentPublisher struct {
ctrl *gomock.Controller
recorder *MockIntentPublisherMockRecorder
isgomock struct{}
}
// MockIntentPublisherMockRecorder is the mock recorder for MockIntentPublisher.
type MockIntentPublisherMockRecorder struct {
mock *MockIntentPublisher
}
// NewMockIntentPublisher creates a new mock instance.
func NewMockIntentPublisher(ctrl *gomock.Controller) *MockIntentPublisher {
mock := &MockIntentPublisher{ctrl: ctrl}
mock.recorder = &MockIntentPublisherMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockIntentPublisher) EXPECT() *MockIntentPublisherMockRecorder {
return m.recorder
}
// Publish mocks base method.
func (m *MockIntentPublisher) Publish(ctx context.Context, intent notificationintent.Intent) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Publish", ctx, intent)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Publish indicates an expected call of Publish.
func (mr *MockIntentPublisherMockRecorder) Publish(ctx, intent any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Publish", reflect.TypeOf((*MockIntentPublisher)(nil).Publish), ctx, intent)
}
@@ -0,0 +1,70 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: galaxy/lobby/internal/ports (interfaces: RuntimeManager)
//
// Generated by this command:
//
// mockgen -destination=../adapters/mocks/mock_runtimemanager.go -package=mocks galaxy/lobby/internal/ports RuntimeManager
//
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
ports "galaxy/lobby/internal/ports"
reflect "reflect"
gomock "go.uber.org/mock/gomock"
)
// MockRuntimeManager is a mock of RuntimeManager interface.
type MockRuntimeManager struct {
ctrl *gomock.Controller
recorder *MockRuntimeManagerMockRecorder
isgomock struct{}
}
// MockRuntimeManagerMockRecorder is the mock recorder for MockRuntimeManager.
type MockRuntimeManagerMockRecorder struct {
mock *MockRuntimeManager
}
// NewMockRuntimeManager creates a new mock instance.
func NewMockRuntimeManager(ctrl *gomock.Controller) *MockRuntimeManager {
mock := &MockRuntimeManager{ctrl: ctrl}
mock.recorder = &MockRuntimeManagerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockRuntimeManager) EXPECT() *MockRuntimeManagerMockRecorder {
return m.recorder
}
// PublishStartJob mocks base method.
func (m *MockRuntimeManager) PublishStartJob(ctx context.Context, gameID, imageRef string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PublishStartJob", ctx, gameID, imageRef)
ret0, _ := ret[0].(error)
return ret0
}
// PublishStartJob indicates an expected call of PublishStartJob.
func (mr *MockRuntimeManagerMockRecorder) PublishStartJob(ctx, gameID, imageRef any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishStartJob", reflect.TypeOf((*MockRuntimeManager)(nil).PublishStartJob), ctx, gameID, imageRef)
}
// PublishStopJob mocks base method.
func (m *MockRuntimeManager) PublishStopJob(ctx context.Context, gameID string, reason ports.StopReason) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PublishStopJob", ctx, gameID, reason)
ret0, _ := ret[0].(error)
return ret0
}
// PublishStopJob indicates an expected call of PublishStopJob.
func (mr *MockRuntimeManagerMockRecorder) PublishStopJob(ctx, gameID, reason any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishStopJob", reflect.TypeOf((*MockRuntimeManager)(nil).PublishStopJob), ctx, gameID, reason)
}
@@ -0,0 +1,57 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: galaxy/lobby/internal/ports (interfaces: UserService)
//
// Generated by this command:
//
// mockgen -destination=../adapters/mocks/mock_userservice.go -package=mocks galaxy/lobby/internal/ports UserService
//
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
ports "galaxy/lobby/internal/ports"
reflect "reflect"
gomock "go.uber.org/mock/gomock"
)
// MockUserService is a mock of UserService interface.
type MockUserService struct {
ctrl *gomock.Controller
recorder *MockUserServiceMockRecorder
isgomock struct{}
}
// MockUserServiceMockRecorder is the mock recorder for MockUserService.
type MockUserServiceMockRecorder struct {
mock *MockUserService
}
// NewMockUserService creates a new mock instance.
func NewMockUserService(ctrl *gomock.Controller) *MockUserService {
mock := &MockUserService{ctrl: ctrl}
mock.recorder = &MockUserServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockUserService) EXPECT() *MockUserServiceMockRecorder {
return m.recorder
}
// GetEligibility mocks base method.
func (m *MockUserService) GetEligibility(ctx context.Context, userID string) (ports.Eligibility, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetEligibility", ctx, userID)
ret0, _ := ret[0].(ports.Eligibility)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetEligibility indicates an expected call of GetEligibility.
func (mr *MockUserServiceMockRecorder) GetEligibility(ctx, userID any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEligibility", reflect.TypeOf((*MockUserService)(nil).GetEligibility), ctx, userID)
}