Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultServiceSpec() launcher.ServiceSpec
- func WithAuthorizer(auth api.Authorizer) service.Option[*Service]
- func WithOAuth2Authorizer(config *clientcredentials.Config) service.Option[*Service]
- func WithOrchestratorAddress(target string, opts ...grpc.DialOption) service.Option[*Service]
- func WithStorage(storage persistence.Storage) service.Option[*Service]
- type Service
- func (svc *Service) CreateEvaluationResult(ctx context.Context, req *evaluation.CreateEvaluationResultRequest) (res *evaluation.EvaluationResult, err error)
- func (svc *Service) Init()
- func (svc *Service) ListEvaluationResults(ctx context.Context, req *evaluation.ListEvaluationResultsRequest) (res *evaluation.ListEvaluationResultsResponse, err error)
- func (svc *Service) Shutdown()
- func (svc *Service) StartEvaluation(ctx context.Context, req *evaluation.StartEvaluationRequest) (resp *evaluation.StartEvaluationResponse, err error)
- func (svc *Service) StopEvaluation(ctx context.Context, req *evaluation.StopEvaluationRequest) (resp *evaluation.StopEvaluationResponse, err error)
Constants ¶
const (
// DefaultOrchestratorAddress specifies the default gRPC address of the orchestrator service.
DefaultOrchestratorAddress = "localhost:9090"
)
Variables ¶
Functions ¶
func DefaultServiceSpec ¶
func DefaultServiceSpec() launcher.ServiceSpec
DefaultServiceSpec returns a launcher.ServiceSpec for this Service with all necessary options retrieved from the config system.
func WithAuthorizer ¶
func WithAuthorizer(auth api.Authorizer) service.Option[*Service]
WithAuthorizer is an option to use a pre-created authorizer
func WithOAuth2Authorizer ¶
func WithOAuth2Authorizer(config *clientcredentials.Config) service.Option[*Service]
WithOAuth2Authorizer is an option to use an OAuth 2.0 authorizer
func WithOrchestratorAddress ¶
WithOrchestratorAddress is an option to configure the orchestrator service gRPC address.
func WithStorage ¶
func WithStorage(storage persistence.Storage) service.Option[*Service]
WithStorage is an option to set the storage. If not set, NewService will use inmemory storage.
Types ¶
type Service ¶
type Service struct { evaluation.UnimplementedEvaluationServer // contains filtered or unexported fields }
Service is an implementation of the Clouditor Evaluation service
func NewService ¶
NewService creates a new Evaluation service
func (*Service) CreateEvaluationResult ¶
func (svc *Service) CreateEvaluationResult(ctx context.Context, req *evaluation.CreateEvaluationResultRequest) (res *evaluation.EvaluationResult, err error)
CreateEvaluationResult is a method implementation of the assessment interface
func (*Service) ListEvaluationResults ¶
func (svc *Service) ListEvaluationResults(ctx context.Context, req *evaluation.ListEvaluationResultsRequest) (res *evaluation.ListEvaluationResultsResponse, err error)
ListEvaluationResults is a method implementation of the assessment interface
func (*Service) StartEvaluation ¶
func (svc *Service) StartEvaluation(ctx context.Context, req *evaluation.StartEvaluationRequest) (resp *evaluation.StartEvaluationResponse, err error)
StartEvaluation is a method implementation of the evaluation interface: It periodically starts the evaluation of a certification target and the given catalog in the audit_scope. If no interval time is given, the default value is used.
func (*Service) StopEvaluation ¶
func (svc *Service) StopEvaluation(ctx context.Context, req *evaluation.StopEvaluationRequest) (resp *evaluation.StopEvaluationResponse, err error)
StopEvaluation is a method implementation of the evaluation interface: It stops the evaluation for a AuditScope.