feat: create save new agent in db

This commit is contained in:
2026-04-19 16:16:03 +03:00
parent 52766cf7e8
commit e289365ce8
14 changed files with 314 additions and 72 deletions
@@ -0,0 +1,25 @@
package agent_service
import (
"context"
"github.com/lorsanstand/HomeOps-Hub/internal/domain"
)
type CollectorMock struct {
host domain.HostInfo
caps []domain.Capability
}
func (c *CollectorMock) GatherInfoSystem() (domain.HostInfo, []domain.Capability) {
return c.host, c.caps
}
type ConnectionMock struct {
regAgentErr error
regResp domain.RegisterAgentResponse
}
func (c *ConnectionMock) RegisterAgent(ctx context.Context, RegisterData domain.RegisterAgentRequest) (domain.RegisterAgentResponse, error) {
return c.regResp, c.regAgentErr
}