types.go | |
---|---|
Copyright 2020, 2021, 2022 Red Hat, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
|
Package types contains declaration of various data types (usually structures) used elsewhere in the aggregator code. |
|
OrgID represents organization ID |
|
Account represent the account number |
|
ClusterName represents name of cluster in format c8590f31-e97e-4b85-b506-c45ce1911a12 |
|
UserID represents type for user id |
|
ClusterReport represents cluster report |
|
Timestamp represents any timestamp in a form gathered from database TODO: need to be improved |
|
UserVote is a type for user's vote |
|
InfoKey represents type for info key |
|
UserVoteDislike shows user's dislike |
|
UserVoteNone shows no vote from user |
|
UserVoteLike shows user's like |
|
WorkloadRecommendationSuffix is used to strip a suffix from rule ID (Component attribute) in WorkloadRecommendation |
|
RequestID is used to store the request ID supplied in input Kafka records as a unique identifier of payloads. Empty string represents a missing request ID. |
|
RuleOnReport represents a single (hit) rule of the string encoded report |
|
ReportRules is a helper struct for easy JSON unmarshalling of string encoded report |
|
ReportResponse represents the response of /report endpoint |
|
ReportResponseMeta contains metadata about the report |
|
DisabledRuleResponse represents a single disabled rule displaying only identifying information |
|
RuleID represents type for rule id |
|
RuleSelector represents type for rule id + error key in the ruleid|errorkey format |
|
ErrorKey represents type for error key |
|
Rule represents the content of rule table |
|
RuleErrorKey represents the content of ruleerrorkey table |
|
RuleWithContent represents a rule with content, basically the mix of rule and ruleerrorkey tables' content |
|
Version represents the version of the cluster |
|
DBDriver type for db driver enum |
|
Identity contains internal user info |
|
Token is x-rh-identity struct |
|
User is single-user identifying struct |
|
RuleFQDN is rule module, older notation |
|
DBDriverPostgres shows that db driver is postgres |
|
DBDriverGeneral general sql(used for mock now) |
|
ContextKeyUser is a constant for user authentication token in request |
|
FeedbackRequest contains message of user feedback |
|
ReportItem represents a single (hit) rule of the string encoded report |
|
InfoItem represents a single (hit) info rule of the string encoded report |
|
DVOMetrics contains all the workload recommendations for a single cluster |
|
WorkloadRecommendation contains all the information about the recommendation Details is generic interface{} because it contains template data used to fill rule content, i.e. we don't/should't know the structure |
|
DVOWorkload contains the main information of the workload recommendation |
|
DVOLinks contains some URLs with relevant information about the recommendation |
|
DVOReport represents a single row of the dvo.dvo_report table. |
|
Cluster structure contains cluster UUID and cluster name |
|
Namespace structure contains basic information about namespace |
|
DVOMetadata structure contains basic information about workload metadata |
|
WorkloadsForNamespace structure represents a single entry of the namespace list with some aggregations |
|
ClusterReports is a data structure containing list of clusters, list of errors and dictionary with results per cluster. |
|
SchemaVersion represents the received message's version of data schema |
|
AllowedVersions represents the currently allowed versions of data schema |
|
RuleRating represents a rule rating element sent by the user |
|
Metadata represents the metadata field in the Kafka topic messages |
|
RuleHitsCount represents the number of hits for a given rule |
|
Value convert a RuleHitsCount into a byte[] |
|
Scan parses a byte[] value into a RuleHitsCount |
|