insights-content-service

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

README

Insights Content Service

forthebadge made-with-go GoDoc GitHub Pages Go Report Card Build Status Build Status GitHub go.mod Go version codecov License

Content service for Insights rules groups, tags, and content.

Description

Insights Content Service is a service that provides metadata information about rules that are being consumed by Openshift Cluster Manager. That metadata information contains rule title, description, remmediations, tags and also groups, that will be consumed primarily by Insights Results Smart Proxy.

Documentation

Documentation is hosted on Github Pages https://redhatinsights.github.io/insights-content-service/. Sources are located in docs.

Usage

Usage:

    ./content-service [command]

The commands are:

    <EMPTY>             starts content service
    start-service       starts content service
    help                prints help
    print-help          prints help
    print-config        prints current configuration set by files & env variables
    print-groups        prints current groups configuration
    print-rules         prints current parsed rules
    print-parse-status  prints information about all rules that have been parsed
    print-version-info  prints version info

Makefile targets

clean                Run go clean
build                Build binary containing service executable
build-cover          Build binary with code coverage detection support
fmt                  Run go fmt -w for all sources
lint                 Run golint
vet                  Run go vet. Report likely mistakes in source code
cyclo                Run gocyclo
ineffassign          Run ineffassign checker
shellcheck           Run shellcheck
errcheck             Run errcheck
goconst              Run goconst checker
gosec                Run gosec checker
abcgo                Run ABC metrics checker
json-check           Check all JSONs for basic syntax
style                Run all the formatting related commands (fmt, vet, lint, cyclo) + check shell scripts
run                  Build the project and executes the binary
test                 Run the unit tests
cover                Generate HTML pages with code coverage
coverage             Display code coverage on terminal
integration_tests    Run all integration tests
help                 Show this help screen
function_list        List all functions in generated binary file

BDD tests

Behaviour tests for this service are included in Insights Behavioral Spec repository. In order to run these tests, the following steps need to be made:

  1. Build this service using ./build.sh --test-rules-only
  2. clone the Insights Behavioral Spec repository
  3. copy this directory with the insights-content-service executable into the insights-behavioral-spec subdirectory
  4. run the insights_content_service_test.sh from the insights-behavioral-spec subdirectory

List of all test scenarios prepared for this service is available at https://redhatinsights.github.io/insights-behavioral-spec/feature_list.html#insights-content-service

Contribution

Please look into document CONTRIBUTING.md that contains all information about how to contribute to this project.

Package manifest

Package manifest is available at docs/manifest.txt.

Documentation

Overview

Entry point to the insights content service

Directories

Path Synopsis
Package conf contains definition of data type named ConfigStruct that represents configuration of Content service.
Package conf contains definition of data type named ConfigStruct that represents configuration of Content service.
Package content contains logic for parsing rule content.
Package content contains logic for parsing rule content.
Package server contains implementation of REST API server (HTTPServer) for the Insights content service.
Package server contains implementation of REST API server (HTTPServer) for the Insights content service.
Implementation of REST API tests that checks all REST API endpoints of Insights content service.
Implementation of REST API tests that checks all REST API endpoints of Insights content service.
rest
Package tests contains REST API tests for following endpoints:
Package tests contains REST API tests for following endpoints:
Package types contains declaration of various data types (usually structures) used elsewhere in the aggregator code.
Package types contains declaration of various data types (usually structures) used elsewhere in the aggregator code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL