Documentation
¶
Index ¶
- Variables
- type BooleanThreshold
- func (*BooleanThreshold) Descriptor() ([]byte, []int)deprecated
- func (x *BooleanThreshold) GetSeverity() Severity
- func (x *BooleanThreshold) GetValue() bool
- func (*BooleanThreshold) ProtoMessage()
- func (x *BooleanThreshold) ProtoReflect() protoreflect.Message
- func (x *BooleanThreshold) Reset()
- func (x *BooleanThreshold) String() string
- type BooleanType
- func (*BooleanType) Descriptor() ([]byte, []int)deprecated
- func (x *BooleanType) GetDisplayFalse() string
- func (x *BooleanType) GetDisplayTrue() string
- func (x *BooleanType) GetThresholds() []*BooleanThreshold
- func (*BooleanType) ProtoMessage()
- func (x *BooleanType) ProtoReflect() protoreflect.Message
- func (x *BooleanType) Reset()
- func (x *BooleanType) String() string
- type BooleanValue
- func (*BooleanValue) Descriptor() ([]byte, []int)deprecated
- func (x *BooleanValue) GetDisplayValue() string
- func (x *BooleanValue) GetValue() bool
- func (*BooleanValue) ProtoMessage()
- func (x *BooleanValue) ProtoReflect() protoreflect.Message
- func (x *BooleanValue) Reset()
- func (x *BooleanValue) String() string
- type IntegerType
- func (*IntegerType) Descriptor() ([]byte, []int)deprecated
- func (x *IntegerType) GetMaxValue() int32
- func (x *IntegerType) GetMinValue() int32
- func (x *IntegerType) GetThresholds() []*NumberThreshold
- func (*IntegerType) ProtoMessage()
- func (x *IntegerType) ProtoReflect() protoreflect.Message
- func (x *IntegerType) Reset()
- func (x *IntegerType) String() string
- type IntegerValue
- func (*IntegerValue) Descriptor() ([]byte, []int)deprecated
- func (x *IntegerValue) GetMaxValue() int32
- func (x *IntegerValue) GetMinValue() int32
- func (x *IntegerValue) GetValue() int32
- func (*IntegerValue) ProtoMessage()
- func (x *IntegerValue) ProtoReflect() protoreflect.Message
- func (x *IntegerValue) Reset()
- func (x *IntegerValue) String() string
- type NumberThreshold
- func (*NumberThreshold) Descriptor() ([]byte, []int)deprecated
- func (x *NumberThreshold) GetRange() *NumberThreshold_NumberRange
- func (x *NumberThreshold) GetSeverity() Severity
- func (*NumberThreshold) ProtoMessage()
- func (x *NumberThreshold) ProtoReflect() protoreflect.Message
- func (x *NumberThreshold) Reset()
- func (x *NumberThreshold) String() string
- type NumberThreshold_NumberRange
- func (*NumberThreshold_NumberRange) Descriptor() ([]byte, []int)deprecated
- func (x *NumberThreshold_NumberRange) GetMax() int32
- func (x *NumberThreshold_NumberRange) GetMin() int32
- func (*NumberThreshold_NumberRange) ProtoMessage()
- func (x *NumberThreshold_NumberRange) ProtoReflect() protoreflect.Message
- func (x *NumberThreshold_NumberRange) Reset()
- func (x *NumberThreshold_NumberRange) String() string
- type PercentType
- type PercentValue
- type ResourcePattern
- func (*ResourcePattern) Descriptor() ([]byte, []int)deprecated
- func (x *ResourcePattern) GetFilter() string
- func (x *ResourcePattern) GetPattern() string
- func (*ResourcePattern) ProtoMessage()
- func (x *ResourcePattern) ProtoReflect() protoreflect.Message
- func (x *ResourcePattern) Reset()
- func (x *ResourcePattern) String() string
- type RollUpFormula
- func (*RollUpFormula) Descriptor() ([]byte, []int)deprecated
- func (x *RollUpFormula) GetRollupExpression() string
- func (x *RollUpFormula) GetScoreFormulas() []*ScoreFormula
- func (*RollUpFormula) ProtoMessage()
- func (x *RollUpFormula) ProtoReflect() protoreflect.Message
- func (x *RollUpFormula) Reset()
- func (x *RollUpFormula) String() string
- type Score
- func (*Score) Descriptor() ([]byte, []int)deprecated
- func (x *Score) GetBooleanValue() *BooleanValue
- func (x *Score) GetDefinitionName() string
- func (x *Score) GetDescription() string
- func (x *Score) GetDisplayName() string
- func (x *Score) GetId() string
- func (x *Score) GetIntegerValue() *IntegerValue
- func (x *Score) GetKind() string
- func (x *Score) GetPercentValue() *PercentValue
- func (x *Score) GetSeverity() Severity
- func (x *Score) GetUri() string
- func (x *Score) GetUriDisplayName() string
- func (m *Score) GetValue() isScore_Value
- func (*Score) ProtoMessage()
- func (x *Score) ProtoReflect() protoreflect.Message
- func (x *Score) Reset()
- func (x *Score) String() string
- type ScoreCard
- func (*ScoreCard) Descriptor() ([]byte, []int)deprecated
- func (x *ScoreCard) GetDefinitionName() string
- func (x *ScoreCard) GetDescription() string
- func (x *ScoreCard) GetDisplayName() string
- func (x *ScoreCard) GetId() string
- func (x *ScoreCard) GetKind() string
- func (x *ScoreCard) GetScores() []*Score
- func (*ScoreCard) ProtoMessage()
- func (x *ScoreCard) ProtoReflect() protoreflect.Message
- func (x *ScoreCard) Reset()
- func (x *ScoreCard) String() string
- type ScoreCardDefinition
- func (*ScoreCardDefinition) Descriptor() ([]byte, []int)deprecated
- func (x *ScoreCardDefinition) GetDescription() string
- func (x *ScoreCardDefinition) GetDisplayName() string
- func (x *ScoreCardDefinition) GetId() string
- func (x *ScoreCardDefinition) GetKind() string
- func (x *ScoreCardDefinition) GetScorePatterns() []string
- func (x *ScoreCardDefinition) GetTargetResource() *ResourcePattern
- func (*ScoreCardDefinition) ProtoMessage()
- func (x *ScoreCardDefinition) ProtoReflect() protoreflect.Message
- func (x *ScoreCardDefinition) Reset()
- func (x *ScoreCardDefinition) String() string
- type ScoreDefinition
- func (*ScoreDefinition) Descriptor() ([]byte, []int)deprecated
- func (x *ScoreDefinition) GetBoolean() *BooleanType
- func (x *ScoreDefinition) GetDescription() string
- func (x *ScoreDefinition) GetDisplayName() string
- func (m *ScoreDefinition) GetFormula() isScoreDefinition_Formula
- func (x *ScoreDefinition) GetId() string
- func (x *ScoreDefinition) GetInteger() *IntegerType
- func (x *ScoreDefinition) GetKind() string
- func (x *ScoreDefinition) GetPercent() *PercentType
- func (x *ScoreDefinition) GetRollupFormula() *RollUpFormula
- func (x *ScoreDefinition) GetScoreFormula() *ScoreFormula
- func (x *ScoreDefinition) GetTargetResource() *ResourcePattern
- func (m *ScoreDefinition) GetType() isScoreDefinition_Type
- func (x *ScoreDefinition) GetUri() string
- func (x *ScoreDefinition) GetUriDisplayName() string
- func (*ScoreDefinition) ProtoMessage()
- func (x *ScoreDefinition) ProtoReflect() protoreflect.Message
- func (x *ScoreDefinition) Reset()
- func (x *ScoreDefinition) String() string
- type ScoreDefinition_Boolean
- type ScoreDefinition_Integer
- type ScoreDefinition_Percent
- type ScoreDefinition_RollupFormula
- type ScoreDefinition_ScoreFormula
- type ScoreFormula
- func (*ScoreFormula) Descriptor() ([]byte, []int)deprecated
- func (x *ScoreFormula) GetArtifact() *ResourcePattern
- func (x *ScoreFormula) GetReferenceId() string
- func (x *ScoreFormula) GetScoreExpression() string
- func (*ScoreFormula) ProtoMessage()
- func (x *ScoreFormula) ProtoReflect() protoreflect.Message
- func (x *ScoreFormula) Reset()
- func (x *ScoreFormula) String() string
- type Score_BooleanValue
- type Score_IntegerValue
- type Score_PercentValue
- type Severity
Constants ¶
This section is empty.
Variables ¶
var ( Severity_name = map[int32]string{ 0: "SEVERITY_UNSPECIFIED", 1: "OK", 2: "WARNING", 3: "ALERT", } Severity_value = map[string]int32{ "SEVERITY_UNSPECIFIED": 0, "OK": 1, "WARNING": 2, "ALERT": 3, } )
Enum value maps for Severity.
var File_google_cloud_apigeeregistry_v1_scoring_definition_proto protoreflect.FileDescriptor
var File_google_cloud_apigeeregistry_v1_scoring_score_card_proto protoreflect.FileDescriptor
var File_google_cloud_apigeeregistry_v1_scoring_score_proto protoreflect.FileDescriptor
var File_google_cloud_apigeeregistry_v1_scoring_severity_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type BooleanThreshold ¶
type BooleanThreshold struct {
// Represents the severity level of the value of the score.
Severity Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=google.cloud.apigeeregistry.v1.scoring.Severity" json:"severity,omitempty"`
// The value field will be used to determine the severity
// level of the generated score.
Value bool `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
Represents the threshold to associate a boolean score value with a particular severity level.
func (*BooleanThreshold) Descriptor
deprecated
func (*BooleanThreshold) Descriptor() ([]byte, []int)
Deprecated: Use BooleanThreshold.ProtoReflect.Descriptor instead.
func (*BooleanThreshold) GetSeverity ¶
func (x *BooleanThreshold) GetSeverity() Severity
func (*BooleanThreshold) GetValue ¶
func (x *BooleanThreshold) GetValue() bool
func (*BooleanThreshold) ProtoMessage ¶
func (*BooleanThreshold) ProtoMessage()
func (*BooleanThreshold) ProtoReflect ¶
func (x *BooleanThreshold) ProtoReflect() protoreflect.Message
func (*BooleanThreshold) Reset ¶
func (x *BooleanThreshold) Reset()
func (*BooleanThreshold) String ¶
func (x *BooleanThreshold) String() string
type BooleanType ¶
type BooleanType struct {
// A string to display the true value of this type of score in the UI.
// Defaults to "true" if not specified.
DisplayTrue string `protobuf:"bytes,1,opt,name=display_true,json=displayTrue,proto3" json:"display_true,omitempty"`
// A string to display the "false" value of this type of score in the UI.
// Defaults to "false" if not specified.
DisplayFalse string `protobuf:"bytes,2,opt,name=display_false,json=displayFalse,proto3" json:"display_false,omitempty"`
// Represents the thresholds for severity of this type of score.
// Examples:
//
// thresholds = []Threshold{
// {
// severity: Severity.ALERT,
// value: false,
// },
// { severity: Severity.OK,
// value: true,
// },
// }
//
// For scores where false value is not an alert but a warning.
//
// thresholds = []Threshold{
// {
// severity: Severity.WARNING,
// value: false,
// },
// { severity: Severity.OK,
// value: true,
// },
// }
Thresholds []*BooleanThreshold `protobuf:"bytes,3,rep,name=thresholds,proto3" json:"thresholds,omitempty"`
// contains filtered or unexported fields
}
Represents a boolean score type.
func (*BooleanType) Descriptor
deprecated
func (*BooleanType) Descriptor() ([]byte, []int)
Deprecated: Use BooleanType.ProtoReflect.Descriptor instead.
func (*BooleanType) GetDisplayFalse ¶
func (x *BooleanType) GetDisplayFalse() string
func (*BooleanType) GetDisplayTrue ¶
func (x *BooleanType) GetDisplayTrue() string
func (*BooleanType) GetThresholds ¶
func (x *BooleanType) GetThresholds() []*BooleanThreshold
func (*BooleanType) ProtoMessage ¶
func (*BooleanType) ProtoMessage()
func (*BooleanType) ProtoReflect ¶
func (x *BooleanType) ProtoReflect() protoreflect.Message
func (*BooleanType) Reset ¶
func (x *BooleanType) Reset()
func (*BooleanType) String ¶
func (x *BooleanType) String() string
type BooleanValue ¶
type BooleanValue struct {
// Stores the value of score.
Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
// Stores the value which should be used to display in the UI.
// This is derived from "display_true" and "display_false"
// fields of BooleanType.
DisplayValue string `protobuf:"bytes,2,opt,name=display_value,json=displayValue,proto3" json:"display_value,omitempty"`
// contains filtered or unexported fields
}
Represents the score which is a percentage.
func (*BooleanValue) Descriptor
deprecated
func (*BooleanValue) Descriptor() ([]byte, []int)
Deprecated: Use BooleanValue.ProtoReflect.Descriptor instead.
func (*BooleanValue) GetDisplayValue ¶
func (x *BooleanValue) GetDisplayValue() string
func (*BooleanValue) GetValue ¶
func (x *BooleanValue) GetValue() bool
func (*BooleanValue) ProtoMessage ¶
func (*BooleanValue) ProtoMessage()
func (*BooleanValue) ProtoReflect ¶
func (x *BooleanValue) ProtoReflect() protoreflect.Message
func (*BooleanValue) Reset ¶
func (x *BooleanValue) Reset()
func (*BooleanValue) String ¶
func (x *BooleanValue) String() string
type IntegerType ¶
type IntegerType struct {
// Represents the minimum value this type of score can take.
// Defaults to 0 if not specified.
MinValue int32 `protobuf:"varint,1,opt,name=min_value,json=minValue,proto3" json:"min_value,omitempty"`
// Represents the maximum value this type of score can take.
MaxValue int32 `protobuf:"varint,2,opt,name=max_value,json=maxValue,proto3" json:"max_value,omitempty"`
// Represents the thresholds for severity of this type of score.
// Examples will be similar to PercentType, except that the limits of the
// range will be min_value and max_value.
Thresholds []*NumberThreshold `protobuf:"bytes,3,rep,name=thresholds,proto3" json:"thresholds,omitempty"`
// contains filtered or unexported fields
}
Represents an integer score type.
func (*IntegerType) Descriptor
deprecated
func (*IntegerType) Descriptor() ([]byte, []int)
Deprecated: Use IntegerType.ProtoReflect.Descriptor instead.
func (*IntegerType) GetMaxValue ¶
func (x *IntegerType) GetMaxValue() int32
func (*IntegerType) GetMinValue ¶
func (x *IntegerType) GetMinValue() int32
func (*IntegerType) GetThresholds ¶
func (x *IntegerType) GetThresholds() []*NumberThreshold
func (*IntegerType) ProtoMessage ¶
func (*IntegerType) ProtoMessage()
func (*IntegerType) ProtoReflect ¶
func (x *IntegerType) ProtoReflect() protoreflect.Message
func (*IntegerType) Reset ¶
func (x *IntegerType) Reset()
func (*IntegerType) String ¶
func (x *IntegerType) String() string
type IntegerValue ¶
type IntegerValue struct {
// Stores the value of score.
Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
// The following fields will be used to display scores in the UI like "5/10".
// Stores the minimum value this score can take.
MinValue int32 `protobuf:"varint,2,opt,name=min_value,json=minValue,proto3" json:"min_value,omitempty"`
// Stores the minimum value this score can take.
MaxValue int32 `protobuf:"varint,3,opt,name=max_value,json=maxValue,proto3" json:"max_value,omitempty"`
// contains filtered or unexported fields
}
Represents the score which is a percentage.
func (*IntegerValue) Descriptor
deprecated
func (*IntegerValue) Descriptor() ([]byte, []int)
Deprecated: Use IntegerValue.ProtoReflect.Descriptor instead.
func (*IntegerValue) GetMaxValue ¶
func (x *IntegerValue) GetMaxValue() int32
func (*IntegerValue) GetMinValue ¶
func (x *IntegerValue) GetMinValue() int32
func (*IntegerValue) GetValue ¶
func (x *IntegerValue) GetValue() int32
func (*IntegerValue) ProtoMessage ¶
func (*IntegerValue) ProtoMessage()
func (*IntegerValue) ProtoReflect ¶
func (x *IntegerValue) ProtoReflect() protoreflect.Message
func (*IntegerValue) Reset ¶
func (x *IntegerValue) Reset()
func (*IntegerValue) String ¶
func (x *IntegerValue) String() string
type NumberThreshold ¶
type NumberThreshold struct {
// Represents the severity level of the value of the score.
Severity Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=google.cloud.apigeeregistry.v1.scoring.Severity" json:"severity,omitempty"`
// The boundaries specified in this field will be included in the mentioned
// severity level. For examples see: PercentType, IntegerType.
Range *NumberThreshold_NumberRange `protobuf:"bytes,2,opt,name=range,proto3" json:"range,omitempty"`
// contains filtered or unexported fields
}
Represents the threshold to associate a numeric score value with a particular severity level.
func (*NumberThreshold) Descriptor
deprecated
func (*NumberThreshold) Descriptor() ([]byte, []int)
Deprecated: Use NumberThreshold.ProtoReflect.Descriptor instead.
func (*NumberThreshold) GetRange ¶
func (x *NumberThreshold) GetRange() *NumberThreshold_NumberRange
func (*NumberThreshold) GetSeverity ¶
func (x *NumberThreshold) GetSeverity() Severity
func (*NumberThreshold) ProtoMessage ¶
func (*NumberThreshold) ProtoMessage()
func (*NumberThreshold) ProtoReflect ¶
func (x *NumberThreshold) ProtoReflect() protoreflect.Message
func (*NumberThreshold) Reset ¶
func (x *NumberThreshold) Reset()
func (*NumberThreshold) String ¶
func (x *NumberThreshold) String() string
type NumberThreshold_NumberRange ¶
type NumberThreshold_NumberRange struct {
Min int32 `protobuf:"varint,1,opt,name=min,proto3" json:"min,omitempty"`
Max int32 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"`
// contains filtered or unexported fields
}
func (*NumberThreshold_NumberRange) Descriptor
deprecated
func (*NumberThreshold_NumberRange) Descriptor() ([]byte, []int)
Deprecated: Use NumberThreshold_NumberRange.ProtoReflect.Descriptor instead.
func (*NumberThreshold_NumberRange) GetMax ¶
func (x *NumberThreshold_NumberRange) GetMax() int32
func (*NumberThreshold_NumberRange) GetMin ¶
func (x *NumberThreshold_NumberRange) GetMin() int32
func (*NumberThreshold_NumberRange) ProtoMessage ¶
func (*NumberThreshold_NumberRange) ProtoMessage()
func (*NumberThreshold_NumberRange) ProtoReflect ¶
func (x *NumberThreshold_NumberRange) ProtoReflect() protoreflect.Message
func (*NumberThreshold_NumberRange) Reset ¶
func (x *NumberThreshold_NumberRange) Reset()
func (*NumberThreshold_NumberRange) String ¶
func (x *NumberThreshold_NumberRange) String() string
type PercentType ¶
type PercentType struct {
// Represents the thresholds for severity of this type of score.
// Examples of thresholds:
// For scores where low value is of concern.
//
// thresholds = []Threshold{
// {
// severity: Severity.ALERT,
// range: NumberRange{ min: 0, max: 30},
// },
// {
// severity: Severity.WARNING,
// range: NumberRange{ min: 31, max: 70},
// },
// { severity: Severity.OK,
// range: NumberRange{ min: 71, max: 100},
// },
// }
//
// For scores where high value is of concern.
//
// thresholds = []Threshold{
// {
// severity: Severity.ALERT,
// range: NumberRange{ min: 61, max: 100},
// },
// {
// severity: Severity.WARNING,
// range: NumberRange{ min: 31, max: 60},
// },
// { severity: Severity.OK,
// range: NumberRange{ min: 0, max: 30},
// },
// }
Thresholds []*NumberThreshold `protobuf:"bytes,1,rep,name=thresholds,proto3" json:"thresholds,omitempty"`
// contains filtered or unexported fields
}
Represents a percentage score type.
func (*PercentType) Descriptor
deprecated
func (*PercentType) Descriptor() ([]byte, []int)
Deprecated: Use PercentType.ProtoReflect.Descriptor instead.
func (*PercentType) GetThresholds ¶
func (x *PercentType) GetThresholds() []*NumberThreshold
func (*PercentType) ProtoMessage ¶
func (*PercentType) ProtoMessage()
func (*PercentType) ProtoReflect ¶
func (x *PercentType) ProtoReflect() protoreflect.Message
func (*PercentType) Reset ¶
func (x *PercentType) Reset()
func (*PercentType) String ¶
func (x *PercentType) String() string
type PercentValue ¶
type PercentValue struct {
// Stores the value of score.
Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
Represents the score which is a percentage.
func (*PercentValue) Descriptor
deprecated
func (*PercentValue) Descriptor() ([]byte, []int)
Deprecated: Use PercentValue.ProtoReflect.Descriptor instead.
func (*PercentValue) GetValue ¶
func (x *PercentValue) GetValue() float32
func (*PercentValue) ProtoMessage ¶
func (*PercentValue) ProtoMessage()
func (*PercentValue) ProtoReflect ¶
func (x *PercentValue) ProtoReflect() protoreflect.Message
func (*PercentValue) Reset ¶
func (x *PercentValue) Reset()
func (*PercentValue) String ¶
func (x *PercentValue) String() string
type ResourcePattern ¶
type ResourcePattern struct {
// A pattern that specifies a resource.
// This can specify one particular resource or a group of resources.
// Format:
//
// apis/{api}/versions/{version}/specs/{spec}/artifacts/{artifact}
// apis/-/versions/-/specs/-/artifacts/-
Pattern string `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"`
// A filter expression that limits the resources that match the pattern.
Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
// contains filtered or unexported fields
}
Represents a pattern to identify resources in the registry.
func (*ResourcePattern) Descriptor
deprecated
func (*ResourcePattern) Descriptor() ([]byte, []int)
Deprecated: Use ResourcePattern.ProtoReflect.Descriptor instead.
func (*ResourcePattern) GetFilter ¶
func (x *ResourcePattern) GetFilter() string
func (*ResourcePattern) GetPattern ¶
func (x *ResourcePattern) GetPattern() string
func (*ResourcePattern) ProtoMessage ¶
func (*ResourcePattern) ProtoMessage()
func (*ResourcePattern) ProtoReflect ¶
func (x *ResourcePattern) ProtoReflect() protoreflect.Message
func (*ResourcePattern) Reset ¶
func (x *ResourcePattern) Reset()
func (*ResourcePattern) String ¶
func (x *ResourcePattern) String() string
type RollUpFormula ¶
type RollUpFormula struct {
// Extracts scores from multiple artifacts to be rolled up into a single
// value. While using this, it is necessary that ScoreFormulas have defined
// values for their reference_ids.
ScoreFormulas []*ScoreFormula `protobuf:"bytes,1,rep,name=score_formulas,json=scoreFormulas,proto3" json:"score_formulas,omitempty"`
// A CEL expression which rolls up all the scores into a single value.
// Uses reference_ids of score_expr in the expression.
RollupExpression string `protobuf:"bytes,2,opt,name=rollup_expression,json=rollupExpression,proto3" json:"rollup_expression,omitempty"`
// contains filtered or unexported fields
}
Represents how multiple scores will be derived from the result artifacts and rolled up into a single value.
func (*RollUpFormula) Descriptor
deprecated
func (*RollUpFormula) Descriptor() ([]byte, []int)
Deprecated: Use RollUpFormula.ProtoReflect.Descriptor instead.
func (*RollUpFormula) GetRollupExpression ¶
func (x *RollUpFormula) GetRollupExpression() string
func (*RollUpFormula) GetScoreFormulas ¶
func (x *RollUpFormula) GetScoreFormulas() []*ScoreFormula
func (*RollUpFormula) ProtoMessage ¶
func (*RollUpFormula) ProtoMessage()
func (*RollUpFormula) ProtoReflect ¶
func (x *RollUpFormula) ProtoReflect() protoreflect.Message
func (*RollUpFormula) Reset ¶
func (x *RollUpFormula) Reset()
func (*RollUpFormula) String ¶
func (x *RollUpFormula) String() string
type Score ¶
type Score struct {
// Artifact identifier. This will be auto-generated based on the id of the
// ScoreDefinition used to calculate this.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Artifact kind. May be used in YAML representations to identify the type of
// this artifact.
Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
// A human-friendly name for the score (populated from ScoreDefinition).
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// A more detailed description of the score (populated from ScoreDefinition).
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
// A Uri which points to an explanation of the formula used here.
Uri string `protobuf:"bytes,5,opt,name=uri,proto3" json:"uri,omitempty"`
// A human-friendly name to display the uri.
UriDisplayName string `protobuf:"bytes,6,opt,name=uri_display_name,json=uriDisplayName,proto3" json:"uri_display_name,omitempty"`
// Full resource name of the ScoreDefinition artifact which was used
// to generate this score.
DefinitionName string `protobuf:"bytes,7,opt,name=definition_name,json=definitionName,proto3" json:"definition_name,omitempty"`
// Stores the severity associated with the score value.
Severity Severity `protobuf:"varint,8,opt,name=severity,proto3,enum=google.cloud.apigeeregistry.v1.scoring.Severity" json:"severity,omitempty"`
// Stores the actual score of a particular resource.
//
// Types that are assignable to Value:
//
// *Score_PercentValue
// *Score_IntegerValue
// *Score_BooleanValue
Value isScore_Value `protobuf_oneof:"value"`
// contains filtered or unexported fields
}
Stores the score for a resource. Stored as an artifact against the resource whose score it represents.
func (*Score) Descriptor
deprecated
func (*Score) GetBooleanValue ¶
func (x *Score) GetBooleanValue() *BooleanValue
func (*Score) GetDefinitionName ¶
func (*Score) GetDescription ¶
func (*Score) GetDisplayName ¶
func (*Score) GetIntegerValue ¶
func (x *Score) GetIntegerValue() *IntegerValue
func (*Score) GetPercentValue ¶
func (x *Score) GetPercentValue() *PercentValue
func (*Score) GetSeverity ¶
func (*Score) GetUriDisplayName ¶
func (*Score) ProtoMessage ¶
func (*Score) ProtoMessage()
func (*Score) ProtoReflect ¶
func (x *Score) ProtoReflect() protoreflect.Message
type ScoreCard ¶
type ScoreCard struct {
// Artifact identifier. This will be auto-generated based on the id of the
// ScoreCardDefinition used to calculate this.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Artifact kind. May be used in YAML representations to identify the type of
// this artifact.
Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
// A human-friendly name for the score (populated from ScoreCardDefinition).
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// A more detailed description of the score
// (populated from ScoreCardDefinition).
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
// Full resource name of the ScoreCardDefinition artifact which was used
// to generate this score.
DefinitionName string `protobuf:"bytes,5,opt,name=definition_name,json=definitionName,proto3" json:"definition_name,omitempty"`
// The Scores which are included in this ScoreCard.
Scores []*Score `protobuf:"bytes,6,rep,name=scores,proto3" json:"scores,omitempty"`
// contains filtered or unexported fields
}
Stores the scorecard for a resource. Stored as an artifact against the resource whose scorecard it represents.
func (*ScoreCard) Descriptor
deprecated
func (*ScoreCard) GetDefinitionName ¶
func (*ScoreCard) GetDescription ¶
func (*ScoreCard) GetDisplayName ¶
func (*ScoreCard) ProtoMessage ¶
func (*ScoreCard) ProtoMessage()
func (*ScoreCard) ProtoReflect ¶
func (x *ScoreCard) ProtoReflect() protoreflect.Message
type ScoreCardDefinition ¶
type ScoreCardDefinition struct {
// Artifact identifier. May be used in YAML representations to indicate the id
// to be used to attach the artifact.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Artifact kind. May be used in YAML representations to identify the type of
// this artifact.
Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
// A human-friendly name for the ScoreCardDefinition.
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// A more detailed description of the ScoreCardDefinition.
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
// A pattern of target resource on which this definition can be applied.
TargetResource *ResourcePattern `protobuf:"bytes,5,opt,name=target_resource,json=targetResource,proto3" json:"target_resource,omitempty"`
// Artifact patterns of scores which should be displayed in the ScoreCard.
// Should start with a $resource reference to make sure artifacts are
// pulled out from the correct resource.
ScorePatterns []string `protobuf:"bytes,6,rep,name=score_patterns,json=scorePatterns,proto3" json:"score_patterns,omitempty"`
// contains filtered or unexported fields
}
Stores the definition which will be used to generate scorecards for the resources stored in registry.
func (*ScoreCardDefinition) Descriptor
deprecated
func (*ScoreCardDefinition) Descriptor() ([]byte, []int)
Deprecated: Use ScoreCardDefinition.ProtoReflect.Descriptor instead.
func (*ScoreCardDefinition) GetDescription ¶
func (x *ScoreCardDefinition) GetDescription() string
func (*ScoreCardDefinition) GetDisplayName ¶
func (x *ScoreCardDefinition) GetDisplayName() string
func (*ScoreCardDefinition) GetId ¶
func (x *ScoreCardDefinition) GetId() string
func (*ScoreCardDefinition) GetKind ¶
func (x *ScoreCardDefinition) GetKind() string
func (*ScoreCardDefinition) GetScorePatterns ¶
func (x *ScoreCardDefinition) GetScorePatterns() []string
func (*ScoreCardDefinition) GetTargetResource ¶
func (x *ScoreCardDefinition) GetTargetResource() *ResourcePattern
func (*ScoreCardDefinition) ProtoMessage ¶
func (*ScoreCardDefinition) ProtoMessage()
func (*ScoreCardDefinition) ProtoReflect ¶
func (x *ScoreCardDefinition) ProtoReflect() protoreflect.Message
func (*ScoreCardDefinition) Reset ¶
func (x *ScoreCardDefinition) Reset()
func (*ScoreCardDefinition) String ¶
func (x *ScoreCardDefinition) String() string
type ScoreDefinition ¶
type ScoreDefinition struct {
// Artifact identifier. May be used in YAML representations to indicate the id
// to be used to attach the artifact.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Artifact kind. May be used in YAML representations to identify the type of
// this artifact.
Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
// A human-friendly name for the ScoreDefinition.
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// A more detailed description of the ScoreDefinition.
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
// A Uri which points to an explanation of the scoring logic/tool used here.
Uri string `protobuf:"bytes,5,opt,name=uri,proto3" json:"uri,omitempty"`
// A human-friendly name to display the uri.
UriDisplayName string `protobuf:"bytes,6,opt,name=uri_display_name,json=uriDisplayName,proto3" json:"uri_display_name,omitempty"`
// A pattern for the target resource on which this definition can be applied.
TargetResource *ResourcePattern `protobuf:"bytes,7,opt,name=target_resource,json=targetResource,proto3" json:"target_resource,omitempty"`
// Represents how the value of this score will be derived.
// A score can be a single score_value or a rollup of multiple score_values.
//
// Types that are assignable to Formula:
//
// *ScoreDefinition_ScoreFormula
// *ScoreDefinition_RollupFormula
Formula isScoreDefinition_Formula `protobuf_oneof:"formula"`
// Represents the type and characteristics of the score.
//
// Types that are assignable to Type:
//
// *ScoreDefinition_Percent
// *ScoreDefinition_Integer
// *ScoreDefinition_Boolean
Type isScoreDefinition_Type `protobuf_oneof:"type"`
// contains filtered or unexported fields
}
Stores the definition which will be used to derive scores for the resources stored in registry.
func (*ScoreDefinition) Descriptor
deprecated
func (*ScoreDefinition) Descriptor() ([]byte, []int)
Deprecated: Use ScoreDefinition.ProtoReflect.Descriptor instead.
func (*ScoreDefinition) GetBoolean ¶
func (x *ScoreDefinition) GetBoolean() *BooleanType
func (*ScoreDefinition) GetDescription ¶
func (x *ScoreDefinition) GetDescription() string
func (*ScoreDefinition) GetDisplayName ¶
func (x *ScoreDefinition) GetDisplayName() string
func (*ScoreDefinition) GetFormula ¶
func (m *ScoreDefinition) GetFormula() isScoreDefinition_Formula
func (*ScoreDefinition) GetId ¶
func (x *ScoreDefinition) GetId() string
func (*ScoreDefinition) GetInteger ¶
func (x *ScoreDefinition) GetInteger() *IntegerType
func (*ScoreDefinition) GetKind ¶
func (x *ScoreDefinition) GetKind() string
func (*ScoreDefinition) GetPercent ¶
func (x *ScoreDefinition) GetPercent() *PercentType
func (*ScoreDefinition) GetRollupFormula ¶
func (x *ScoreDefinition) GetRollupFormula() *RollUpFormula
func (*ScoreDefinition) GetScoreFormula ¶
func (x *ScoreDefinition) GetScoreFormula() *ScoreFormula
func (*ScoreDefinition) GetTargetResource ¶
func (x *ScoreDefinition) GetTargetResource() *ResourcePattern
func (*ScoreDefinition) GetType ¶
func (m *ScoreDefinition) GetType() isScoreDefinition_Type
func (*ScoreDefinition) GetUri ¶
func (x *ScoreDefinition) GetUri() string
func (*ScoreDefinition) GetUriDisplayName ¶
func (x *ScoreDefinition) GetUriDisplayName() string
func (*ScoreDefinition) ProtoMessage ¶
func (*ScoreDefinition) ProtoMessage()
func (*ScoreDefinition) ProtoReflect ¶
func (x *ScoreDefinition) ProtoReflect() protoreflect.Message
func (*ScoreDefinition) Reset ¶
func (x *ScoreDefinition) Reset()
func (*ScoreDefinition) String ¶
func (x *ScoreDefinition) String() string
type ScoreDefinition_Boolean ¶
type ScoreDefinition_Boolean struct {
// Set this if the score value is a boolean.
Boolean *BooleanType `protobuf:"bytes,12,opt,name=boolean,proto3,oneof"`
}
type ScoreDefinition_Integer ¶
type ScoreDefinition_Integer struct {
// Set this if the score value is an integer.
Integer *IntegerType `protobuf:"bytes,11,opt,name=integer,proto3,oneof"`
}
type ScoreDefinition_Percent ¶
type ScoreDefinition_Percent struct {
// Set this if the score value is a percentage.
Percent *PercentType `protobuf:"bytes,10,opt,name=percent,proto3,oneof"`
}
type ScoreDefinition_RollupFormula ¶
type ScoreDefinition_RollupFormula struct {
// Represents the formula for a value which is rolled up
// from multiple scores.
RollupFormula *RollUpFormula `protobuf:"bytes,9,opt,name=rollup_formula,json=rollupFormula,proto3,oneof"`
}
type ScoreDefinition_ScoreFormula ¶
type ScoreDefinition_ScoreFormula struct {
// Represents the formula for a value which is derived from
// a single artifact.
ScoreFormula *ScoreFormula `protobuf:"bytes,8,opt,name=score_formula,json=scoreFormula,proto3,oneof"`
}
type ScoreFormula ¶
type ScoreFormula struct {
// Pattern of the artifact from which the score value will be extracted.
// Should start with a $resource reference to make sure artifacts are pulled
// out from the correct resource.
Artifact *ResourcePattern `protobuf:"bytes,1,opt,name=artifact,proto3" json:"artifact,omitempty"`
// A CEL expression which extracts the score value from the artifact.
ScoreExpression string `protobuf:"bytes,2,opt,name=score_expression,json=scoreExpression,proto3" json:"score_expression,omitempty"`
// Set an ID to reference this value in the rollup formula.
ReferenceId string `protobuf:"bytes,3,opt,name=reference_id,json=referenceId,proto3" json:"reference_id,omitempty"`
// contains filtered or unexported fields
}
Represents how a score will be derived from the result artifacts.
func (*ScoreFormula) Descriptor
deprecated
func (*ScoreFormula) Descriptor() ([]byte, []int)
Deprecated: Use ScoreFormula.ProtoReflect.Descriptor instead.
func (*ScoreFormula) GetArtifact ¶
func (x *ScoreFormula) GetArtifact() *ResourcePattern
func (*ScoreFormula) GetReferenceId ¶
func (x *ScoreFormula) GetReferenceId() string
func (*ScoreFormula) GetScoreExpression ¶
func (x *ScoreFormula) GetScoreExpression() string
func (*ScoreFormula) ProtoMessage ¶
func (*ScoreFormula) ProtoMessage()
func (*ScoreFormula) ProtoReflect ¶
func (x *ScoreFormula) ProtoReflect() protoreflect.Message
func (*ScoreFormula) Reset ¶
func (x *ScoreFormula) Reset()
func (*ScoreFormula) String ¶
func (x *ScoreFormula) String() string
type Score_BooleanValue ¶
type Score_BooleanValue struct {
// This is set if the score is a boolean.
BooleanValue *BooleanValue `protobuf:"bytes,11,opt,name=boolean_value,json=booleanValue,proto3,oneof"`
}
type Score_IntegerValue ¶
type Score_IntegerValue struct {
// This is set if the score is an integer.
IntegerValue *IntegerValue `protobuf:"bytes,10,opt,name=integer_value,json=integerValue,proto3,oneof"`
}
type Score_PercentValue ¶
type Score_PercentValue struct {
// This is set if the score is a percentage.
PercentValue *PercentValue `protobuf:"bytes,9,opt,name=percent_value,json=percentValue,proto3,oneof"`
}
type Severity ¶
type Severity int32
Represents the severity levels to be associated with score values. Severity levels indicates the level of concern for a particular score.
const ( // This is the default value if the Severity level is not set. Severity_SEVERITY_UNSPECIFIED Severity = 0 // This level indicates that the value of the score is acceptable. Severity_OK Severity = 1 // This level indicates that the value of the score is of little concern but // not a red flag. Users can still take action to get to a better level: "OK". Severity_WARNING Severity = 2 // This level indicates that the value of the score is a major red flag and // ideally users should actively take actions to get to a WARNING or OK level. Severity_ALERT Severity = 3 )
func (Severity) Descriptor ¶
func (Severity) Descriptor() protoreflect.EnumDescriptor
func (Severity) EnumDescriptor
deprecated
func (Severity) Number ¶
func (x Severity) Number() protoreflect.EnumNumber
func (Severity) Type ¶
func (Severity) Type() protoreflect.EnumType