Documentation ¶
Index ¶
- Variables
- func RegisterAssessmentServer(s grpc.ServiceRegistrar, srv AssessmentServer)
- type AllowedValues
- type AssessmentClient
- type AssessmentServer
- type Assessment_StreamEvidencesClient
- type Assessment_StreamEvidencesServer
- type Evidence
- func (*Evidence) Descriptor() ([]byte, []int)deprecated
- func (x *Evidence) GetApplicableMetrics() []int32
- func (x *Evidence) GetId() string
- func (x *Evidence) GetRaw() string
- func (x *Evidence) GetResource() *structpb.Value
- func (x *Evidence) GetResourceId() string
- func (x *Evidence) GetServiceId() string
- func (x *Evidence) GetTimestamp() string
- func (*Evidence) ProtoMessage()
- func (x *Evidence) ProtoReflect() protoreflect.Message
- func (x *Evidence) Reset()
- func (x *Evidence) String() string
- type ListAssessmentResultsRequest
- func (*ListAssessmentResultsRequest) Descriptor() ([]byte, []int)deprecated
- func (*ListAssessmentResultsRequest) ProtoMessage()
- func (x *ListAssessmentResultsRequest) ProtoReflect() protoreflect.Message
- func (x *ListAssessmentResultsRequest) Reset()
- func (x *ListAssessmentResultsRequest) String() string
- type ListAssessmentResultsResponse
- func (*ListAssessmentResultsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListAssessmentResultsResponse) GetResults() []*Result
- func (*ListAssessmentResultsResponse) ProtoMessage()
- func (x *ListAssessmentResultsResponse) ProtoReflect() protoreflect.Message
- func (x *ListAssessmentResultsResponse) Reset()
- func (x *ListAssessmentResultsResponse) String() string
- type Metric
- func (*Metric) Descriptor() ([]byte, []int)deprecated
- func (x *Metric) GetCategory() string
- func (x *Metric) GetDescription() string
- func (x *Metric) GetId() int32
- func (x *Metric) GetName() string
- func (x *Metric) GetRange() *Range
- func (x *Metric) GetScale() Metric_Scale
- func (*Metric) ProtoMessage()
- func (x *Metric) ProtoReflect() protoreflect.Message
- func (x *Metric) Reset()
- func (x *Metric) String() string
- type Metric_Scale
- func (Metric_Scale) Descriptor() protoreflect.EnumDescriptor
- func (x Metric_Scale) Enum() *Metric_Scale
- func (Metric_Scale) EnumDescriptor() ([]byte, []int)deprecated
- func (x Metric_Scale) Number() protoreflect.EnumNumber
- func (x Metric_Scale) String() string
- func (Metric_Scale) Type() protoreflect.EnumType
- type MinMax
- type Order
- type Range
- func (*Range) Descriptor() ([]byte, []int)deprecated
- func (x *Range) GetAllowedValues() *AllowedValues
- func (x *Range) GetMinMax() *MinMax
- func (x *Range) GetOrder() *Order
- func (m *Range) GetRange() isRange_Range
- func (*Range) ProtoMessage()
- func (x *Range) ProtoReflect() protoreflect.Message
- func (x *Range) Reset()
- func (x *Range) String() string
- func (r *Range) UnmarshalJSON(b []byte) (err error)
- type Range_AllowedValues
- type Range_MinMax
- type Range_Order
- type Result
- func (*Result) Descriptor() ([]byte, []int)deprecated
- func (x *Result) GetCompliant() bool
- func (x *Result) GetMetricId() int32
- func (x *Result) GetResourceId() string
- func (*Result) ProtoMessage()
- func (x *Result) ProtoReflect() protoreflect.Message
- func (x *Result) Reset()
- func (x *Result) String() string
- type StoreEvidenceRequest
- func (*StoreEvidenceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StoreEvidenceRequest) GetEvidence() *Evidence
- func (*StoreEvidenceRequest) ProtoMessage()
- func (x *StoreEvidenceRequest) ProtoReflect() protoreflect.Message
- func (x *StoreEvidenceRequest) Reset()
- func (x *StoreEvidenceRequest) String() string
- type TriggerAssessmentRequest
- func (*TriggerAssessmentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TriggerAssessmentRequest) GetSomeOption() string
- func (*TriggerAssessmentRequest) ProtoMessage()
- func (x *TriggerAssessmentRequest) ProtoReflect() protoreflect.Message
- func (x *TriggerAssessmentRequest) Reset()
- func (x *TriggerAssessmentRequest) String() string
- type UnimplementedAssessmentServer
- func (UnimplementedAssessmentServer) ListAssessmentResults(context.Context, *ListAssessmentResultsRequest) (*ListAssessmentResultsResponse, error)
- func (UnimplementedAssessmentServer) StoreEvidence(context.Context, *StoreEvidenceRequest) (*Evidence, error)
- func (UnimplementedAssessmentServer) StreamEvidences(Assessment_StreamEvidencesServer) error
- func (UnimplementedAssessmentServer) TriggerAssessment(context.Context, *TriggerAssessmentRequest) (*emptypb.Empty, error)
- type UnsafeAssessmentServer
Constants ¶
This section is empty.
Variables ¶
var ( Metric_Scale_name = map[int32]string{ 0: "NOMIMAL", 1: "ORDINAL", 2: "METRIC", } Metric_Scale_value = map[string]int32{ "NOMIMAL": 0, "ORDINAL": 1, "METRIC": 2, } )
Enum value maps for Metric_Scale.
var Assessment_ServiceDesc = grpc.ServiceDesc{ ServiceName: "clouditor.Assessment", HandlerType: (*AssessmentServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TriggerAssessment", Handler: _Assessment_TriggerAssessment_Handler, }, { MethodName: "StoreEvidence", Handler: _Assessment_StoreEvidence_Handler, }, { MethodName: "ListAssessmentResults", Handler: _Assessment_ListAssessmentResults_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamEvidences", Handler: _Assessment_StreamEvidences_Handler, ClientStreams: true, }, }, Metadata: "assessment.proto", }
Assessment_ServiceDesc is the grpc.ServiceDesc for Assessment service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_assessment_proto protoreflect.FileDescriptor
var File_evidence_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAssessmentServer ¶
func RegisterAssessmentServer(s grpc.ServiceRegistrar, srv AssessmentServer)
Types ¶
type AllowedValues ¶
type AllowedValues struct { Values []*structpb.Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
Defines a range
func (*AllowedValues) Descriptor
deprecated
func (*AllowedValues) Descriptor() ([]byte, []int)
Deprecated: Use AllowedValues.ProtoReflect.Descriptor instead.
func (*AllowedValues) GetValues ¶
func (x *AllowedValues) GetValues() []*structpb.Value
func (*AllowedValues) ProtoMessage ¶
func (*AllowedValues) ProtoMessage()
func (*AllowedValues) ProtoReflect ¶
func (x *AllowedValues) ProtoReflect() protoreflect.Message
func (*AllowedValues) Reset ¶
func (x *AllowedValues) Reset()
func (*AllowedValues) String ¶
func (x *AllowedValues) String() string
type AssessmentClient ¶
type AssessmentClient interface { // Triggers the assement. Part of the private API, not exposed as REST. TriggerAssessment(ctx context.Context, in *TriggerAssessmentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Stores the evidences coming from the discovery. Part of the public API, // also exposed as REST StoreEvidence(ctx context.Context, in *StoreEvidenceRequest, opts ...grpc.CallOption) (*Evidence, error) ListAssessmentResults(ctx context.Context, in *ListAssessmentResultsRequest, opts ...grpc.CallOption) (*ListAssessmentResultsResponse, error) StreamEvidences(ctx context.Context, opts ...grpc.CallOption) (Assessment_StreamEvidencesClient, error) }
AssessmentClient is the client API for Assessment service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAssessmentClient ¶
func NewAssessmentClient(cc grpc.ClientConnInterface) AssessmentClient
type AssessmentServer ¶
type AssessmentServer interface { // Triggers the assement. Part of the private API, not exposed as REST. TriggerAssessment(context.Context, *TriggerAssessmentRequest) (*emptypb.Empty, error) // Stores the evidences coming from the discovery. Part of the public API, // also exposed as REST StoreEvidence(context.Context, *StoreEvidenceRequest) (*Evidence, error) ListAssessmentResults(context.Context, *ListAssessmentResultsRequest) (*ListAssessmentResultsResponse, error) StreamEvidences(Assessment_StreamEvidencesServer) error // contains filtered or unexported methods }
AssessmentServer is the server API for Assessment service. All implementations must embed UnimplementedAssessmentServer for forward compatibility
type Evidence ¶
type Evidence struct { // the ID in a uuid format Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // reference to a service this evidence was gathered from ServiceId string `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` // reference to the resource this evidence was gathered from ResourceId string `protobuf:"bytes,3,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` // TODO: replace with google/type/date.proto Timestamp string `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` ApplicableMetrics []int32 `protobuf:"varint,5,rep,packed,name=applicable_metrics,json=applicableMetrics,proto3" json:"applicable_metrics,omitempty"` // "raw" evidence (for the auditor), for example the raw JSON response from // the API. This does not follow a defined schema Raw string `protobuf:"bytes,6,opt,name=raw,proto3" json:"raw,omitempty"` // optional; a semantic representation of the Cloud resource according to our // defined ontology. a JSON seralized node of our semantic graph. This may be // Clouditor-specific. Resource *structpb.Value `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` // contains filtered or unexported fields }
func (*Evidence) Descriptor
deprecated
func (*Evidence) GetApplicableMetrics ¶
func (*Evidence) GetResource ¶
func (*Evidence) GetResourceId ¶
func (*Evidence) GetServiceId ¶
func (*Evidence) GetTimestamp ¶
func (*Evidence) ProtoMessage ¶
func (*Evidence) ProtoMessage()
func (*Evidence) ProtoReflect ¶
func (x *Evidence) ProtoReflect() protoreflect.Message
type ListAssessmentResultsRequest ¶ added in v1.3.5
type ListAssessmentResultsRequest struct {
// contains filtered or unexported fields
}
func (*ListAssessmentResultsRequest) Descriptor
deprecated
added in
v1.3.5
func (*ListAssessmentResultsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListAssessmentResultsRequest.ProtoReflect.Descriptor instead.
func (*ListAssessmentResultsRequest) ProtoMessage ¶ added in v1.3.5
func (*ListAssessmentResultsRequest) ProtoMessage()
func (*ListAssessmentResultsRequest) ProtoReflect ¶ added in v1.3.5
func (x *ListAssessmentResultsRequest) ProtoReflect() protoreflect.Message
func (*ListAssessmentResultsRequest) Reset ¶ added in v1.3.5
func (x *ListAssessmentResultsRequest) Reset()
func (*ListAssessmentResultsRequest) String ¶ added in v1.3.5
func (x *ListAssessmentResultsRequest) String() string
type ListAssessmentResultsResponse ¶ added in v1.3.5
type ListAssessmentResultsResponse struct { Results []*Result `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
func (*ListAssessmentResultsResponse) Descriptor
deprecated
added in
v1.3.5
func (*ListAssessmentResultsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListAssessmentResultsResponse.ProtoReflect.Descriptor instead.
func (*ListAssessmentResultsResponse) GetResults ¶ added in v1.3.5
func (x *ListAssessmentResultsResponse) GetResults() []*Result
func (*ListAssessmentResultsResponse) ProtoMessage ¶ added in v1.3.5
func (*ListAssessmentResultsResponse) ProtoMessage()
func (*ListAssessmentResultsResponse) ProtoReflect ¶ added in v1.3.5
func (x *ListAssessmentResultsResponse) ProtoReflect() protoreflect.Message
func (*ListAssessmentResultsResponse) Reset ¶ added in v1.3.5
func (x *ListAssessmentResultsResponse) Reset()
func (*ListAssessmentResultsResponse) String ¶ added in v1.3.5
func (x *ListAssessmentResultsResponse) String() string
type Metric ¶
type Metric struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // a human readable name of the metric Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // a description of the metric Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // reference to control catalog category or domain Category string `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"` // the scale of this metric, e.g. categories, ranked data or metric values Scale Metric_Scale `protobuf:"varint,5,opt,name=scale,proto3,enum=clouditor.Metric_Scale" json:"scale,omitempty"` // the range of this metric, depends on the scale Range *Range `protobuf:"bytes,6,opt,name=range,proto3" json:"range,omitempty"` // contains filtered or unexported fields }
func (*Metric) Descriptor
deprecated
func (*Metric) GetCategory ¶
func (*Metric) GetDescription ¶
func (*Metric) GetScale ¶
func (x *Metric) GetScale() Metric_Scale
func (*Metric) ProtoMessage ¶
func (*Metric) ProtoMessage()
func (*Metric) ProtoReflect ¶
func (x *Metric) ProtoReflect() protoreflect.Message
type Metric_Scale ¶
type Metric_Scale int32
const ( Metric_NOMIMAL Metric_Scale = 0 Metric_ORDINAL Metric_Scale = 1 Metric_METRIC Metric_Scale = 2 )
func (Metric_Scale) Descriptor ¶
func (Metric_Scale) Descriptor() protoreflect.EnumDescriptor
func (Metric_Scale) Enum ¶
func (x Metric_Scale) Enum() *Metric_Scale
func (Metric_Scale) EnumDescriptor
deprecated
func (Metric_Scale) EnumDescriptor() ([]byte, []int)
Deprecated: Use Metric_Scale.Descriptor instead.
func (Metric_Scale) Number ¶
func (x Metric_Scale) Number() protoreflect.EnumNumber
func (Metric_Scale) String ¶
func (x Metric_Scale) String() string
func (Metric_Scale) Type ¶
func (Metric_Scale) Type() protoreflect.EnumType
type MinMax ¶
type MinMax struct { Min int64 `protobuf:"varint,1,opt,name=min,proto3" json:"min,omitempty"` Max int64 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"` // contains filtered or unexported fields }
Defines a range of values through a (inclusive) minimum and a maximum
func (*MinMax) Descriptor
deprecated
func (*MinMax) ProtoMessage ¶
func (*MinMax) ProtoMessage()
func (*MinMax) ProtoReflect ¶
func (x *MinMax) ProtoReflect() protoreflect.Message
type Order ¶
type Order struct { Values []*structpb.Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
Defines a range of values in a pre-defined order from the lowest to the highest.
func (*Order) Descriptor
deprecated
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
type Range ¶
type Range struct { // Types that are assignable to Range: // *Range_AllowedValues // *Range_Order // *Range_MinMax Range isRange_Range `protobuf_oneof:"range"` // contains filtered or unexported fields }
Defines a range of values
func (*Range) Descriptor
deprecated
func (*Range) GetAllowedValues ¶
func (x *Range) GetAllowedValues() *AllowedValues
func (*Range) ProtoMessage ¶
func (*Range) ProtoMessage()
func (*Range) ProtoReflect ¶
func (x *Range) ProtoReflect() protoreflect.Message
func (*Range) UnmarshalJSON ¶ added in v1.3.5
type Range_AllowedValues ¶
type Range_AllowedValues struct { // used for nomical scale AllowedValues *AllowedValues `protobuf:"bytes,1,opt,name=allowed_values,json=allowedValues,proto3,oneof"` }
type Range_MinMax ¶
type Range_MinMax struct { // used for metric scale MinMax *MinMax `protobuf:"bytes,3,opt,name=min_max,json=minMax,proto3,oneof"` }
type Range_Order ¶
type Range_Order struct { // used for ordinal scale Order *Order `protobuf:"bytes,2,opt,name=order,proto3,oneof"` }
type Result ¶ added in v1.3.4
type Result struct { ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` Compliant bool `protobuf:"varint,2,opt,name=compliant,proto3" json:"compliant,omitempty"` MetricId int32 `protobuf:"varint,3,opt,name=metric_id,json=metricId,proto3" json:"metric_id,omitempty"` // contains filtered or unexported fields }
func (*Result) Descriptor
deprecated
added in
v1.3.4
func (*Result) GetCompliant ¶ added in v1.3.4
func (*Result) GetMetricId ¶ added in v1.3.5
func (*Result) GetResourceId ¶ added in v1.3.4
func (*Result) ProtoMessage ¶ added in v1.3.4
func (*Result) ProtoMessage()
func (*Result) ProtoReflect ¶ added in v1.3.4
func (x *Result) ProtoReflect() protoreflect.Message
type StoreEvidenceRequest ¶
type StoreEvidenceRequest struct { Evidence *Evidence `protobuf:"bytes,1,opt,name=evidence,proto3" json:"evidence,omitempty"` // contains filtered or unexported fields }
func (*StoreEvidenceRequest) Descriptor
deprecated
func (*StoreEvidenceRequest) Descriptor() ([]byte, []int)
Deprecated: Use StoreEvidenceRequest.ProtoReflect.Descriptor instead.
func (*StoreEvidenceRequest) GetEvidence ¶
func (x *StoreEvidenceRequest) GetEvidence() *Evidence
func (*StoreEvidenceRequest) ProtoMessage ¶
func (*StoreEvidenceRequest) ProtoMessage()
func (*StoreEvidenceRequest) ProtoReflect ¶
func (x *StoreEvidenceRequest) ProtoReflect() protoreflect.Message
func (*StoreEvidenceRequest) Reset ¶
func (x *StoreEvidenceRequest) Reset()
func (*StoreEvidenceRequest) String ¶
func (x *StoreEvidenceRequest) String() string
type TriggerAssessmentRequest ¶
type TriggerAssessmentRequest struct { SomeOption string `protobuf:"bytes,1,opt,name=someOption,proto3" json:"someOption,omitempty"` // contains filtered or unexported fields }
func (*TriggerAssessmentRequest) Descriptor
deprecated
func (*TriggerAssessmentRequest) Descriptor() ([]byte, []int)
Deprecated: Use TriggerAssessmentRequest.ProtoReflect.Descriptor instead.
func (*TriggerAssessmentRequest) GetSomeOption ¶
func (x *TriggerAssessmentRequest) GetSomeOption() string
func (*TriggerAssessmentRequest) ProtoMessage ¶
func (*TriggerAssessmentRequest) ProtoMessage()
func (*TriggerAssessmentRequest) ProtoReflect ¶
func (x *TriggerAssessmentRequest) ProtoReflect() protoreflect.Message
func (*TriggerAssessmentRequest) Reset ¶
func (x *TriggerAssessmentRequest) Reset()
func (*TriggerAssessmentRequest) String ¶
func (x *TriggerAssessmentRequest) String() string
type UnimplementedAssessmentServer ¶
type UnimplementedAssessmentServer struct { }
UnimplementedAssessmentServer must be embedded to have forward compatible implementations.
func (UnimplementedAssessmentServer) ListAssessmentResults ¶ added in v1.3.5
func (UnimplementedAssessmentServer) ListAssessmentResults(context.Context, *ListAssessmentResultsRequest) (*ListAssessmentResultsResponse, error)
func (UnimplementedAssessmentServer) StoreEvidence ¶
func (UnimplementedAssessmentServer) StoreEvidence(context.Context, *StoreEvidenceRequest) (*Evidence, error)
func (UnimplementedAssessmentServer) StreamEvidences ¶
func (UnimplementedAssessmentServer) StreamEvidences(Assessment_StreamEvidencesServer) error
func (UnimplementedAssessmentServer) TriggerAssessment ¶
func (UnimplementedAssessmentServer) TriggerAssessment(context.Context, *TriggerAssessmentRequest) (*emptypb.Empty, error)
type UnsafeAssessmentServer ¶
type UnsafeAssessmentServer interface {
// contains filtered or unexported methods
}
UnsafeAssessmentServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AssessmentServer will result in compilation errors.