Documentation ¶
Overview ¶
Package discovery is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package discovery is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func Raw(raws ...any) string
- func RegisterDiscoveryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterDiscoveryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DiscoveryClient) error
- func RegisterDiscoveryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterDiscoveryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DiscoveryServer) error
- func RegisterDiscoveryServer(s grpc.ServiceRegistrar, srv DiscoveryServer)
- func RegisterExperimentalDiscoveryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterExperimentalDiscoveryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExperimentalDiscoveryClient) error
- func RegisterExperimentalDiscoveryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterExperimentalDiscoveryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExperimentalDiscoveryServer) error
- func RegisterExperimentalDiscoveryServer(s grpc.ServiceRegistrar, srv ExperimentalDiscoveryServer)
- type Discoverer
- type DiscoveryClient
- type DiscoveryServer
- type ExperimentalDiscoveryClient
- type ExperimentalDiscoveryServer
- type GraphEdge
- func (*GraphEdge) Descriptor() ([]byte, []int)deprecated
- func (x *GraphEdge) GetId() string
- func (x *GraphEdge) GetSource() string
- func (x *GraphEdge) GetTarget() string
- func (x *GraphEdge) GetType() string
- func (*GraphEdge) ProtoMessage()
- func (x *GraphEdge) ProtoReflect() protoreflect.Message
- func (x *GraphEdge) Reset()
- func (x *GraphEdge) String() string
- type ListGraphEdgesRequest
- func (*ListGraphEdgesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListGraphEdgesRequest) GetAsc() bool
- func (x *ListGraphEdgesRequest) GetOrderBy() string
- func (x *ListGraphEdgesRequest) GetPageSize() int32
- func (x *ListGraphEdgesRequest) GetPageToken() string
- func (*ListGraphEdgesRequest) ProtoMessage()
- func (x *ListGraphEdgesRequest) ProtoReflect() protoreflect.Message
- func (x *ListGraphEdgesRequest) Reset()
- func (x *ListGraphEdgesRequest) String() string
- type ListGraphEdgesResponse
- func (*ListGraphEdgesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListGraphEdgesResponse) GetEdges() []*GraphEdge
- func (x *ListGraphEdgesResponse) GetNextPageToken() string
- func (*ListGraphEdgesResponse) ProtoMessage()
- func (x *ListGraphEdgesResponse) ProtoReflect() protoreflect.Message
- func (x *ListGraphEdgesResponse) Reset()
- func (x *ListGraphEdgesResponse) String() string
- type ListResourcesRequest
- func (*ListResourcesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListResourcesRequest) GetAsc() bool
- func (x *ListResourcesRequest) GetFilter() *ListResourcesRequest_Filter
- func (x *ListResourcesRequest) GetOrderBy() string
- func (x *ListResourcesRequest) GetPageSize() int32
- func (x *ListResourcesRequest) GetPageToken() string
- func (*ListResourcesRequest) ProtoMessage()
- func (x *ListResourcesRequest) ProtoReflect() protoreflect.Message
- func (x *ListResourcesRequest) Reset()
- func (x *ListResourcesRequest) String() string
- type ListResourcesRequest_Filter
- func (*ListResourcesRequest_Filter) Descriptor() ([]byte, []int)deprecated
- func (x *ListResourcesRequest_Filter) GetCertificationTargetId() string
- func (x *ListResourcesRequest_Filter) GetToolId() string
- func (x *ListResourcesRequest_Filter) GetType() string
- func (*ListResourcesRequest_Filter) ProtoMessage()
- func (x *ListResourcesRequest_Filter) ProtoReflect() protoreflect.Message
- func (x *ListResourcesRequest_Filter) Reset()
- func (x *ListResourcesRequest_Filter) String() string
- type ListResourcesResponse
- func (*ListResourcesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListResourcesResponse) GetNextPageToken() string
- func (x *ListResourcesResponse) GetResults() []*Resource
- func (*ListResourcesResponse) ProtoMessage()
- func (x *ListResourcesResponse) ProtoReflect() protoreflect.Message
- func (x *ListResourcesResponse) Reset()
- func (x *ListResourcesResponse) String() string
- type Resource
- func (*Resource) Descriptor() ([]byte, []int)deprecated
- func (x *Resource) GetCertificationTargetId() string
- func (x *Resource) GetId() string
- func (x *Resource) GetProperties() *anypb.Any
- func (x *Resource) GetResourceType() string
- func (x *Resource) GetToolId() string
- func (*Resource) ProtoMessage()
- func (x *Resource) ProtoReflect() protoreflect.Message
- func (x *Resource) Reset()
- func (x *Resource) String() string
- func (r *Resource) ToOntologyResource() (or ontology.IsResource, err error)
- type StartDiscoveryRequest
- func (*StartDiscoveryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StartDiscoveryRequest) GetCsafDomain() string
- func (x *StartDiscoveryRequest) GetResourceGroup() string
- func (*StartDiscoveryRequest) ProtoMessage()
- func (x *StartDiscoveryRequest) ProtoReflect() protoreflect.Message
- func (x *StartDiscoveryRequest) Reset()
- func (x *StartDiscoveryRequest) String() string
- type StartDiscoveryResponse
- func (*StartDiscoveryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StartDiscoveryResponse) GetSuccessful() bool
- func (*StartDiscoveryResponse) ProtoMessage()
- func (x *StartDiscoveryResponse) ProtoReflect() protoreflect.Message
- func (x *StartDiscoveryResponse) Reset()
- func (x *StartDiscoveryResponse) String() string
- type UnimplementedDiscoveryServer
- type UnimplementedExperimentalDiscoveryServer
- type UnsafeDiscoveryServer
- type UnsafeExperimentalDiscoveryServer
- type UpdateResourceRequest
- func (*UpdateResourceRequest) Descriptor() ([]byte, []int)deprecated
- func (req *UpdateResourceRequest) GetCertificationTargetId() string
- func (x *UpdateResourceRequest) GetResource() *Resource
- func (*UpdateResourceRequest) ProtoMessage()
- func (x *UpdateResourceRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateResourceRequest) Reset()
- func (x *UpdateResourceRequest) String() string
Constants ¶
const ( Discovery_Start_FullMethodName = "/clouditor.discovery.v1.Discovery/Start" Discovery_ListResources_FullMethodName = "/clouditor.discovery.v1.Discovery/ListResources" )
const ( ExperimentalDiscovery_UpdateResource_FullMethodName = "/clouditor.discovery.v1experimental.ExperimentalDiscovery/UpdateResource" ExperimentalDiscovery_ListGraphEdges_FullMethodName = "/clouditor.discovery.v1experimental.ExperimentalDiscovery/ListGraphEdges" )
Variables ¶
var Discovery_ServiceDesc = grpc.ServiceDesc{ ServiceName: "clouditor.discovery.v1.Discovery", HandlerType: (*DiscoveryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Start", Handler: _Discovery_Start_Handler, }, { MethodName: "ListResources", Handler: _Discovery_ListResources_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/discovery/discovery.proto", }
Discovery_ServiceDesc is the grpc.ServiceDesc for Discovery service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var ErrNotOntologyResource = errors.New("protobuf message is not a valid ontology resource")
var ExperimentalDiscovery_ServiceDesc = grpc.ServiceDesc{ ServiceName: "clouditor.discovery.v1experimental.ExperimentalDiscovery", HandlerType: (*ExperimentalDiscoveryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UpdateResource", Handler: _ExperimentalDiscovery_UpdateResource_Handler, }, { MethodName: "ListGraphEdges", Handler: _ExperimentalDiscovery_ListGraphEdges_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/discovery/experimental.proto", }
ExperimentalDiscovery_ServiceDesc is the grpc.ServiceDesc for ExperimentalDiscovery service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_discovery_discovery_proto protoreflect.FileDescriptor
var File_api_discovery_experimental_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDiscoveryHandler ¶
func RegisterDiscoveryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterDiscoveryHandler registers the http handlers for service Discovery to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterDiscoveryHandlerClient ¶
func RegisterDiscoveryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DiscoveryClient) error
RegisterDiscoveryHandlerClient registers the http handlers for service Discovery to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DiscoveryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DiscoveryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DiscoveryClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterDiscoveryHandlerFromEndpoint ¶
func RegisterDiscoveryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterDiscoveryHandlerFromEndpoint is same as RegisterDiscoveryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterDiscoveryHandlerServer ¶
func RegisterDiscoveryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DiscoveryServer) error
RegisterDiscoveryHandlerServer registers the http handlers for service Discovery to "mux". UnaryRPC :call DiscoveryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDiscoveryHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterDiscoveryServer ¶
func RegisterDiscoveryServer(s grpc.ServiceRegistrar, srv DiscoveryServer)
func RegisterExperimentalDiscoveryHandler ¶
func RegisterExperimentalDiscoveryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterExperimentalDiscoveryHandler registers the http handlers for service ExperimentalDiscovery to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterExperimentalDiscoveryHandlerClient ¶
func RegisterExperimentalDiscoveryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExperimentalDiscoveryClient) error
RegisterExperimentalDiscoveryHandlerClient registers the http handlers for service ExperimentalDiscovery to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ExperimentalDiscoveryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ExperimentalDiscoveryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ExperimentalDiscoveryClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterExperimentalDiscoveryHandlerFromEndpoint ¶
func RegisterExperimentalDiscoveryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterExperimentalDiscoveryHandlerFromEndpoint is same as RegisterExperimentalDiscoveryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterExperimentalDiscoveryHandlerServer ¶
func RegisterExperimentalDiscoveryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExperimentalDiscoveryServer) error
RegisterExperimentalDiscoveryHandlerServer registers the http handlers for service ExperimentalDiscovery to "mux". UnaryRPC :call ExperimentalDiscoveryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterExperimentalDiscoveryHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterExperimentalDiscoveryServer ¶
func RegisterExperimentalDiscoveryServer(s grpc.ServiceRegistrar, srv ExperimentalDiscoveryServer)
Types ¶
type Discoverer ¶
type Discoverer interface { Name() string List() ([]ontology.IsResource, error) CertificationTargetID() string }
Discoverer is a part of the discovery service that takes care of the actual discovering and translation into vocabulary objects.
type DiscoveryClient ¶
type DiscoveryClient interface { // Starts discovering the cloud resources, exposed as REST. Start(ctx context.Context, in *StartDiscoveryRequest, opts ...grpc.CallOption) (*StartDiscoveryResponse, error) // Lists all evidences collected in the last run, exposed as REST. ListResources(ctx context.Context, in *ListResourcesRequest, opts ...grpc.CallOption) (*ListResourcesResponse, error) }
DiscoveryClient is the client API for Discovery 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.
Discovers cloud resources and maps these properties to the format of the ontology
func NewDiscoveryClient ¶
func NewDiscoveryClient(cc grpc.ClientConnInterface) DiscoveryClient
type DiscoveryServer ¶
type DiscoveryServer interface { // Starts discovering the cloud resources, exposed as REST. Start(context.Context, *StartDiscoveryRequest) (*StartDiscoveryResponse, error) // Lists all evidences collected in the last run, exposed as REST. ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error) // contains filtered or unexported methods }
DiscoveryServer is the server API for Discovery service. All implementations must embed UnimplementedDiscoveryServer for forward compatibility.
Discovers cloud resources and maps these properties to the format of the ontology
type ExperimentalDiscoveryClient ¶
type ExperimentalDiscoveryClient interface { // UpdateResource updates a resource (or creates it, if it does not exist). // This is used to give third-party tools the possibility to add something to // the resource graph. // // Note: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE UpdateResource(ctx context.Context, in *UpdateResourceRequest, opts ...grpc.CallOption) (*Resource, error) // ListGraphEdges returns the edges (relationship) between resources in our // resource graph. // // Note: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE ListGraphEdges(ctx context.Context, in *ListGraphEdgesRequest, opts ...grpc.CallOption) (*ListGraphEdgesResponse, error) }
ExperimentalDiscoveryClient is the client API for ExperimentalDiscovery 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.
Discovers cloud resources and maps these properties to the format of the ontology
func NewExperimentalDiscoveryClient ¶
func NewExperimentalDiscoveryClient(cc grpc.ClientConnInterface) ExperimentalDiscoveryClient
type ExperimentalDiscoveryServer ¶
type ExperimentalDiscoveryServer interface { // UpdateResource updates a resource (or creates it, if it does not exist). // This is used to give third-party tools the possibility to add something to // the resource graph. // // Note: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE UpdateResource(context.Context, *UpdateResourceRequest) (*Resource, error) // ListGraphEdges returns the edges (relationship) between resources in our // resource graph. // // Note: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE ListGraphEdges(context.Context, *ListGraphEdgesRequest) (*ListGraphEdgesResponse, error) // contains filtered or unexported methods }
ExperimentalDiscoveryServer is the server API for ExperimentalDiscovery service. All implementations must embed UnimplementedExperimentalDiscoveryServer for forward compatibility.
Discovers cloud resources and maps these properties to the format of the ontology
type GraphEdge ¶
type GraphEdge struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
func (*GraphEdge) Descriptor
deprecated
func (*GraphEdge) ProtoMessage ¶
func (*GraphEdge) ProtoMessage()
func (*GraphEdge) ProtoReflect ¶
func (x *GraphEdge) ProtoReflect() protoreflect.Message
type ListGraphEdgesRequest ¶
type ListGraphEdgesRequest struct { PageSize int32 `protobuf:"varint,10,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` PageToken string `protobuf:"bytes,11,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` OrderBy string `protobuf:"bytes,12,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` Asc bool `protobuf:"varint,13,opt,name=asc,proto3" json:"asc,omitempty"` // contains filtered or unexported fields }
func (*ListGraphEdgesRequest) Descriptor
deprecated
func (*ListGraphEdgesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListGraphEdgesRequest.ProtoReflect.Descriptor instead.
func (*ListGraphEdgesRequest) GetAsc ¶
func (x *ListGraphEdgesRequest) GetAsc() bool
func (*ListGraphEdgesRequest) GetOrderBy ¶
func (x *ListGraphEdgesRequest) GetOrderBy() string
func (*ListGraphEdgesRequest) GetPageSize ¶
func (x *ListGraphEdgesRequest) GetPageSize() int32
func (*ListGraphEdgesRequest) GetPageToken ¶
func (x *ListGraphEdgesRequest) GetPageToken() string
func (*ListGraphEdgesRequest) ProtoMessage ¶
func (*ListGraphEdgesRequest) ProtoMessage()
func (*ListGraphEdgesRequest) ProtoReflect ¶
func (x *ListGraphEdgesRequest) ProtoReflect() protoreflect.Message
func (*ListGraphEdgesRequest) Reset ¶
func (x *ListGraphEdgesRequest) Reset()
func (*ListGraphEdgesRequest) String ¶
func (x *ListGraphEdgesRequest) String() string
type ListGraphEdgesResponse ¶
type ListGraphEdgesResponse struct { Edges []*GraphEdge `protobuf:"bytes,1,rep,name=edges,proto3" json:"edges,omitempty"` NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // contains filtered or unexported fields }
func (*ListGraphEdgesResponse) Descriptor
deprecated
func (*ListGraphEdgesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListGraphEdgesResponse.ProtoReflect.Descriptor instead.
func (*ListGraphEdgesResponse) GetEdges ¶
func (x *ListGraphEdgesResponse) GetEdges() []*GraphEdge
func (*ListGraphEdgesResponse) GetNextPageToken ¶
func (x *ListGraphEdgesResponse) GetNextPageToken() string
func (*ListGraphEdgesResponse) ProtoMessage ¶
func (*ListGraphEdgesResponse) ProtoMessage()
func (*ListGraphEdgesResponse) ProtoReflect ¶
func (x *ListGraphEdgesResponse) ProtoReflect() protoreflect.Message
func (*ListGraphEdgesResponse) Reset ¶
func (x *ListGraphEdgesResponse) Reset()
func (*ListGraphEdgesResponse) String ¶
func (x *ListGraphEdgesResponse) String() string
type ListResourcesRequest ¶
type ListResourcesRequest struct { Filter *ListResourcesRequest_Filter `protobuf:"bytes,1,opt,name=filter,proto3,oneof" json:"filter,omitempty"` PageSize int32 `protobuf:"varint,10,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` PageToken string `protobuf:"bytes,11,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` OrderBy string `protobuf:"bytes,12,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` Asc bool `protobuf:"varint,13,opt,name=asc,proto3" json:"asc,omitempty"` // contains filtered or unexported fields }
func (*ListResourcesRequest) Descriptor
deprecated
func (*ListResourcesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListResourcesRequest.ProtoReflect.Descriptor instead.
func (*ListResourcesRequest) GetAsc ¶
func (x *ListResourcesRequest) GetAsc() bool
func (*ListResourcesRequest) GetFilter ¶
func (x *ListResourcesRequest) GetFilter() *ListResourcesRequest_Filter
func (*ListResourcesRequest) GetOrderBy ¶
func (x *ListResourcesRequest) GetOrderBy() string
func (*ListResourcesRequest) GetPageSize ¶
func (x *ListResourcesRequest) GetPageSize() int32
func (*ListResourcesRequest) GetPageToken ¶
func (x *ListResourcesRequest) GetPageToken() string
func (*ListResourcesRequest) ProtoMessage ¶
func (*ListResourcesRequest) ProtoMessage()
func (*ListResourcesRequest) ProtoReflect ¶
func (x *ListResourcesRequest) ProtoReflect() protoreflect.Message
func (*ListResourcesRequest) Reset ¶
func (x *ListResourcesRequest) Reset()
func (*ListResourcesRequest) String ¶
func (x *ListResourcesRequest) String() string
type ListResourcesRequest_Filter ¶
type ListResourcesRequest_Filter struct { Type *string `protobuf:"bytes,1,opt,name=type,proto3,oneof" json:"type,omitempty"` CertificationTargetId *string `` /* 132-byte string literal not displayed */ ToolId *string `protobuf:"bytes,3,opt,name=tool_id,json=toolId,proto3,oneof" json:"tool_id,omitempty"` // contains filtered or unexported fields }
func (*ListResourcesRequest_Filter) Descriptor
deprecated
func (*ListResourcesRequest_Filter) Descriptor() ([]byte, []int)
Deprecated: Use ListResourcesRequest_Filter.ProtoReflect.Descriptor instead.
func (*ListResourcesRequest_Filter) GetCertificationTargetId ¶
func (x *ListResourcesRequest_Filter) GetCertificationTargetId() string
func (*ListResourcesRequest_Filter) GetToolId ¶
func (x *ListResourcesRequest_Filter) GetToolId() string
func (*ListResourcesRequest_Filter) GetType ¶
func (x *ListResourcesRequest_Filter) GetType() string
func (*ListResourcesRequest_Filter) ProtoMessage ¶
func (*ListResourcesRequest_Filter) ProtoMessage()
func (*ListResourcesRequest_Filter) ProtoReflect ¶
func (x *ListResourcesRequest_Filter) ProtoReflect() protoreflect.Message
func (*ListResourcesRequest_Filter) Reset ¶
func (x *ListResourcesRequest_Filter) Reset()
func (*ListResourcesRequest_Filter) String ¶
func (x *ListResourcesRequest_Filter) String() string
type ListResourcesResponse ¶
type ListResourcesResponse struct { Results []*Resource `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // contains filtered or unexported fields }
func (*ListResourcesResponse) Descriptor
deprecated
func (*ListResourcesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResourcesResponse.ProtoReflect.Descriptor instead.
func (*ListResourcesResponse) GetNextPageToken ¶
func (x *ListResourcesResponse) GetNextPageToken() string
func (*ListResourcesResponse) GetResults ¶
func (x *ListResourcesResponse) GetResults() []*Resource
func (*ListResourcesResponse) ProtoMessage ¶
func (*ListResourcesResponse) ProtoMessage()
func (*ListResourcesResponse) ProtoReflect ¶
func (x *ListResourcesResponse) ProtoReflect() protoreflect.Message
func (*ListResourcesResponse) Reset ¶
func (x *ListResourcesResponse) Reset()
func (*ListResourcesResponse) String ¶
func (x *ListResourcesResponse) String() string
type Resource ¶
type Resource struct { // Id contains a unique ID for each resource. This is specific for the cloud // provider this resource was gathered for and can for example be a resource // URL. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // CertificationTargetId is the UUID for the certification target to which this resource // belongs to. CertificationTargetId string `` /* 126-byte string literal not displayed */ // ResourceType contains a comma separated string of resource types according // to our ontology. ResourceType string `protobuf:"bytes,3,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` // Reference to the tool which provided the resource ToolId string `protobuf:"bytes,4,opt,name=tool_id,json=toolId,proto3" json:"tool_id,omitempty"` // Properties contains a protobuf message that describe the resource in the // terms of our Clouditor ontology. Properties *anypb.Any `protobuf:"bytes,10,opt,name=properties,proto3" json:"properties,omitempty" gorm:"serializer:anypb;type:json"` // contains filtered or unexported fields }
Resource is a wrapper around google.protobuf.Value that is needed for persistence reasons.
func ToDiscoveryResource ¶
func ToDiscoveryResource(resource ontology.IsResource, csID, collectorID string) (r *Resource, err error)
ToDiscoveryResource converts a proto message that complies to the interface ontology.IsResource into a resource that can be persisted in our database (*discovery.Resource).
func (*Resource) Descriptor
deprecated
func (*Resource) GetCertificationTargetId ¶
func (*Resource) GetProperties ¶
func (*Resource) GetResourceType ¶
func (*Resource) ProtoMessage ¶
func (*Resource) ProtoMessage()
func (*Resource) ProtoReflect ¶
func (x *Resource) ProtoReflect() protoreflect.Message
func (*Resource) ToOntologyResource ¶
func (r *Resource) ToOntologyResource() (or ontology.IsResource, err error)
ToOntologyResource converts the content of the "properties" (which is an *anypb.Any) into an ontology.IsResource.
type StartDiscoveryRequest ¶
type StartDiscoveryRequest struct { ResourceGroup *string `protobuf:"bytes,1,opt,name=resource_group,json=resourceGroup,proto3,oneof" json:"resource_group,omitempty"` CsafDomain *string `protobuf:"bytes,2,opt,name=csaf_domain,json=csafDomain,proto3,oneof" json:"csaf_domain,omitempty"` // contains filtered or unexported fields }
func (*StartDiscoveryRequest) Descriptor
deprecated
func (*StartDiscoveryRequest) Descriptor() ([]byte, []int)
Deprecated: Use StartDiscoveryRequest.ProtoReflect.Descriptor instead.
func (*StartDiscoveryRequest) GetCsafDomain ¶
func (x *StartDiscoveryRequest) GetCsafDomain() string
func (*StartDiscoveryRequest) GetResourceGroup ¶
func (x *StartDiscoveryRequest) GetResourceGroup() string
func (*StartDiscoveryRequest) ProtoMessage ¶
func (*StartDiscoveryRequest) ProtoMessage()
func (*StartDiscoveryRequest) ProtoReflect ¶
func (x *StartDiscoveryRequest) ProtoReflect() protoreflect.Message
func (*StartDiscoveryRequest) Reset ¶
func (x *StartDiscoveryRequest) Reset()
func (*StartDiscoveryRequest) String ¶
func (x *StartDiscoveryRequest) String() string
type StartDiscoveryResponse ¶
type StartDiscoveryResponse struct { Successful bool `protobuf:"varint,1,opt,name=successful,proto3" json:"successful,omitempty"` // contains filtered or unexported fields }
func (*StartDiscoveryResponse) Descriptor
deprecated
func (*StartDiscoveryResponse) Descriptor() ([]byte, []int)
Deprecated: Use StartDiscoveryResponse.ProtoReflect.Descriptor instead.
func (*StartDiscoveryResponse) GetSuccessful ¶
func (x *StartDiscoveryResponse) GetSuccessful() bool
func (*StartDiscoveryResponse) ProtoMessage ¶
func (*StartDiscoveryResponse) ProtoMessage()
func (*StartDiscoveryResponse) ProtoReflect ¶
func (x *StartDiscoveryResponse) ProtoReflect() protoreflect.Message
func (*StartDiscoveryResponse) Reset ¶
func (x *StartDiscoveryResponse) Reset()
func (*StartDiscoveryResponse) String ¶
func (x *StartDiscoveryResponse) String() string
type UnimplementedDiscoveryServer ¶
type UnimplementedDiscoveryServer struct{}
UnimplementedDiscoveryServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedDiscoveryServer) ListResources ¶
func (UnimplementedDiscoveryServer) ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error)
func (UnimplementedDiscoveryServer) Start ¶
func (UnimplementedDiscoveryServer) Start(context.Context, *StartDiscoveryRequest) (*StartDiscoveryResponse, error)
type UnimplementedExperimentalDiscoveryServer ¶
type UnimplementedExperimentalDiscoveryServer struct{}
UnimplementedExperimentalDiscoveryServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedExperimentalDiscoveryServer) ListGraphEdges ¶
func (UnimplementedExperimentalDiscoveryServer) ListGraphEdges(context.Context, *ListGraphEdgesRequest) (*ListGraphEdgesResponse, error)
func (UnimplementedExperimentalDiscoveryServer) UpdateResource ¶
func (UnimplementedExperimentalDiscoveryServer) UpdateResource(context.Context, *UpdateResourceRequest) (*Resource, error)
type UnsafeDiscoveryServer ¶
type UnsafeDiscoveryServer interface {
// contains filtered or unexported methods
}
UnsafeDiscoveryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DiscoveryServer will result in compilation errors.
type UnsafeExperimentalDiscoveryServer ¶
type UnsafeExperimentalDiscoveryServer interface {
// contains filtered or unexported methods
}
UnsafeExperimentalDiscoveryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExperimentalDiscoveryServer will result in compilation errors.
type UpdateResourceRequest ¶
type UpdateResourceRequest struct { Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` // contains filtered or unexported fields }
func (*UpdateResourceRequest) Descriptor
deprecated
func (*UpdateResourceRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateResourceRequest.ProtoReflect.Descriptor instead.
func (*UpdateResourceRequest) GetCertificationTargetId ¶
func (req *UpdateResourceRequest) GetCertificationTargetId() string
GetCertificationTargetId is a shortcut to implement CertificationTargetRequest. It returns the certification target ID of the inner object.
func (*UpdateResourceRequest) GetResource ¶
func (x *UpdateResourceRequest) GetResource() *Resource
func (*UpdateResourceRequest) ProtoMessage ¶
func (*UpdateResourceRequest) ProtoMessage()
func (*UpdateResourceRequest) ProtoReflect ¶
func (x *UpdateResourceRequest) ProtoReflect() protoreflect.Message
func (*UpdateResourceRequest) Reset ¶
func (x *UpdateResourceRequest) Reset()
func (*UpdateResourceRequest) String ¶
func (x *UpdateResourceRequest) String() string