2023-02-02 10:55:24 +01:00
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"forge.cadoles.com/Cadoles/emissary/internal/setup"
|
|
|
|
"github.com/pkg/errors"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (s *Server) initRepositories(ctx context.Context) error {
|
2023-03-07 23:10:42 +01:00
|
|
|
agentRepo, err := setup.NewAgentRepository(ctx, s.conf.Database)
|
2023-02-02 10:55:24 +01:00
|
|
|
if err != nil {
|
|
|
|
return errors.WithStack(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
s.agentRepo = agentRepo
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|