discovery

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 35 Imported by: 2

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

View Source
const (
	// DefaultCloudServiceID is the default service ID. Currently, our discoverers have no way to differentiate between different
	// services, but we need this feature in the future. This serves as a default to already prepare the necessary
	// structures for this feature.
	DefaultCloudServiceID   = "00000000-0000-0000-0000-000000000000"
	EvidenceCollectorToolId = "Clouditor Evidences Collection"
)

Variables

View Source
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)

View Source
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)

View Source
var File_api_discovery_discovery_proto protoreflect.FileDescriptor
View Source
var File_api_discovery_experimental_proto protoreflect.FileDescriptor

Functions

func NewResource added in v1.6.2

func NewResource(d Discoverer, ID voc.ResourceID, name string, creationTime *time.Time, location voc.GeoLocation, labels map[string]string, parent voc.ResourceID, typ []string, raw ...interface{}) *voc.Resource

NewResource creates a new voc resource.

func RegisterDiscoveryHandler added in v1.3.1

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 added in v1.3.1

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.

func RegisterDiscoveryHandlerFromEndpoint added in v1.3.1

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 added in v1.3.1

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.

func RegisterDiscoveryServer

func RegisterDiscoveryServer(s grpc.ServiceRegistrar, srv DiscoveryServer)

func RegisterExperimentalDiscoveryHandler added in v1.10.0

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 added in v1.10.0

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.

func RegisterExperimentalDiscoveryHandlerFromEndpoint added in v1.10.0

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 added in v1.10.0

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.

func RegisterExperimentalDiscoveryServer added in v1.10.0

func RegisterExperimentalDiscoveryServer(s grpc.ServiceRegistrar, srv ExperimentalDiscoveryServer)

Types

type Authorizer added in v1.3.3

type Authorizer interface {
	Authorize() (err error)
}

Authorizer authorizes a Cloud service

type Discoverer added in v1.3.2

type Discoverer interface {
	Name() string
	List() ([]voc.IsCloudResource, error)
	CloudServiceID() 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.

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

type ExperimentalDiscoveryClient added in v1.10.0

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.

func NewExperimentalDiscoveryClient added in v1.10.0

func NewExperimentalDiscoveryClient(cc grpc.ClientConnInterface) ExperimentalDiscoveryClient

type ExperimentalDiscoveryServer added in v1.10.0

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

type GraphEdge added in v1.10.0

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"`
	// contains filtered or unexported fields
}

func (*GraphEdge) Descriptor deprecated added in v1.10.0

func (*GraphEdge) Descriptor() ([]byte, []int)

Deprecated: Use GraphEdge.ProtoReflect.Descriptor instead.

func (*GraphEdge) GetId added in v1.10.0

func (x *GraphEdge) GetId() string

func (*GraphEdge) GetSource added in v1.10.0

func (x *GraphEdge) GetSource() string

func (*GraphEdge) GetTarget added in v1.10.0

func (x *GraphEdge) GetTarget() string

func (*GraphEdge) ProtoMessage added in v1.10.0

func (*GraphEdge) ProtoMessage()

func (*GraphEdge) ProtoReflect added in v1.10.0

func (x *GraphEdge) ProtoReflect() protoreflect.Message

func (*GraphEdge) Reset added in v1.10.0

func (x *GraphEdge) Reset()

func (*GraphEdge) String added in v1.10.0

func (x *GraphEdge) String() string

func (*GraphEdge) Validate added in v1.10.0

func (m *GraphEdge) Validate() error

Validate checks the field values on GraphEdge with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GraphEdge) ValidateAll added in v1.10.0

func (m *GraphEdge) ValidateAll() error

ValidateAll checks the field values on GraphEdge with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GraphEdgeMultiError, or nil if none found.

type GraphEdgeMultiError added in v1.10.0

type GraphEdgeMultiError []error

GraphEdgeMultiError is an error wrapping multiple validation errors returned by GraphEdge.ValidateAll() if the designated constraints aren't met.

func (GraphEdgeMultiError) AllErrors added in v1.10.0

func (m GraphEdgeMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GraphEdgeMultiError) Error added in v1.10.0

func (m GraphEdgeMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type GraphEdgeValidationError added in v1.10.0

type GraphEdgeValidationError struct {
	// contains filtered or unexported fields
}

GraphEdgeValidationError is the validation error returned by GraphEdge.Validate if the designated constraints aren't met.

func (GraphEdgeValidationError) Cause added in v1.10.0

func (e GraphEdgeValidationError) Cause() error

Cause function returns cause value.

func (GraphEdgeValidationError) Error added in v1.10.0

func (e GraphEdgeValidationError) Error() string

Error satisfies the builtin error interface

func (GraphEdgeValidationError) ErrorName added in v1.10.0

func (e GraphEdgeValidationError) ErrorName() string

ErrorName returns error name.

func (GraphEdgeValidationError) Field added in v1.10.0

func (e GraphEdgeValidationError) Field() string

Field function returns field value.

func (GraphEdgeValidationError) Key added in v1.10.0

Key function returns key value.

func (GraphEdgeValidationError) Reason added in v1.10.0

func (e GraphEdgeValidationError) Reason() string

Reason function returns reason value.

type ListGraphEdgesRequest added in v1.10.0

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 added in v1.10.0

func (*ListGraphEdgesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListGraphEdgesRequest.ProtoReflect.Descriptor instead.

func (*ListGraphEdgesRequest) GetAsc added in v1.10.0

func (x *ListGraphEdgesRequest) GetAsc() bool

func (*ListGraphEdgesRequest) GetOrderBy added in v1.10.0

func (x *ListGraphEdgesRequest) GetOrderBy() string

func (*ListGraphEdgesRequest) GetPageSize added in v1.10.0

func (x *ListGraphEdgesRequest) GetPageSize() int32

func (*ListGraphEdgesRequest) GetPageToken added in v1.10.0

func (x *ListGraphEdgesRequest) GetPageToken() string

func (*ListGraphEdgesRequest) ProtoMessage added in v1.10.0

func (*ListGraphEdgesRequest) ProtoMessage()

func (*ListGraphEdgesRequest) ProtoReflect added in v1.10.0

func (x *ListGraphEdgesRequest) ProtoReflect() protoreflect.Message

func (*ListGraphEdgesRequest) Reset added in v1.10.0

func (x *ListGraphEdgesRequest) Reset()

func (*ListGraphEdgesRequest) String added in v1.10.0

func (x *ListGraphEdgesRequest) String() string

func (*ListGraphEdgesRequest) Validate added in v1.10.0

func (m *ListGraphEdgesRequest) Validate() error

Validate checks the field values on ListGraphEdgesRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListGraphEdgesRequest) ValidateAll added in v1.10.0

func (m *ListGraphEdgesRequest) ValidateAll() error

ValidateAll checks the field values on ListGraphEdgesRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListGraphEdgesRequestMultiError, or nil if none found.

type ListGraphEdgesRequestMultiError added in v1.10.0

type ListGraphEdgesRequestMultiError []error

ListGraphEdgesRequestMultiError is an error wrapping multiple validation errors returned by ListGraphEdgesRequest.ValidateAll() if the designated constraints aren't met.

func (ListGraphEdgesRequestMultiError) AllErrors added in v1.10.0

func (m ListGraphEdgesRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListGraphEdgesRequestMultiError) Error added in v1.10.0

Error returns a concatenation of all the error messages it wraps.

type ListGraphEdgesRequestValidationError added in v1.10.0

type ListGraphEdgesRequestValidationError struct {
	// contains filtered or unexported fields
}

ListGraphEdgesRequestValidationError is the validation error returned by ListGraphEdgesRequest.Validate if the designated constraints aren't met.

func (ListGraphEdgesRequestValidationError) Cause added in v1.10.0

Cause function returns cause value.

func (ListGraphEdgesRequestValidationError) Error added in v1.10.0

Error satisfies the builtin error interface

func (ListGraphEdgesRequestValidationError) ErrorName added in v1.10.0

ErrorName returns error name.

func (ListGraphEdgesRequestValidationError) Field added in v1.10.0

Field function returns field value.

func (ListGraphEdgesRequestValidationError) Key added in v1.10.0

Key function returns key value.

func (ListGraphEdgesRequestValidationError) Reason added in v1.10.0

Reason function returns reason value.

type ListGraphEdgesResponse added in v1.10.0

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 added in v1.10.0

func (*ListGraphEdgesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListGraphEdgesResponse.ProtoReflect.Descriptor instead.

func (*ListGraphEdgesResponse) GetEdges added in v1.10.0

func (x *ListGraphEdgesResponse) GetEdges() []*GraphEdge

func (*ListGraphEdgesResponse) GetNextPageToken added in v1.10.0

func (x *ListGraphEdgesResponse) GetNextPageToken() string

func (*ListGraphEdgesResponse) ProtoMessage added in v1.10.0

func (*ListGraphEdgesResponse) ProtoMessage()

func (*ListGraphEdgesResponse) ProtoReflect added in v1.10.0

func (x *ListGraphEdgesResponse) ProtoReflect() protoreflect.Message

func (*ListGraphEdgesResponse) Reset added in v1.10.0

func (x *ListGraphEdgesResponse) Reset()

func (*ListGraphEdgesResponse) String added in v1.10.0

func (x *ListGraphEdgesResponse) String() string

func (*ListGraphEdgesResponse) Validate added in v1.10.0

func (m *ListGraphEdgesResponse) Validate() error

Validate checks the field values on ListGraphEdgesResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListGraphEdgesResponse) ValidateAll added in v1.10.0

func (m *ListGraphEdgesResponse) ValidateAll() error

ValidateAll checks the field values on ListGraphEdgesResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListGraphEdgesResponseMultiError, or nil if none found.

type ListGraphEdgesResponseMultiError added in v1.10.0

type ListGraphEdgesResponseMultiError []error

ListGraphEdgesResponseMultiError is an error wrapping multiple validation errors returned by ListGraphEdgesResponse.ValidateAll() if the designated constraints aren't met.

func (ListGraphEdgesResponseMultiError) AllErrors added in v1.10.0

func (m ListGraphEdgesResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListGraphEdgesResponseMultiError) Error added in v1.10.0

Error returns a concatenation of all the error messages it wraps.

type ListGraphEdgesResponseValidationError added in v1.10.0

type ListGraphEdgesResponseValidationError struct {
	// contains filtered or unexported fields
}

ListGraphEdgesResponseValidationError is the validation error returned by ListGraphEdgesResponse.Validate if the designated constraints aren't met.

func (ListGraphEdgesResponseValidationError) Cause added in v1.10.0

Cause function returns cause value.

func (ListGraphEdgesResponseValidationError) Error added in v1.10.0

Error satisfies the builtin error interface

func (ListGraphEdgesResponseValidationError) ErrorName added in v1.10.0

ErrorName returns error name.

func (ListGraphEdgesResponseValidationError) Field added in v1.10.0

Field function returns field value.

func (ListGraphEdgesResponseValidationError) Key added in v1.10.0

Key function returns key value.

func (ListGraphEdgesResponseValidationError) Reason added in v1.10.0

Reason function returns reason value.

type ListResourcesRequest added in v1.7.8

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 added in v1.7.8

func (*ListResourcesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListResourcesRequest.ProtoReflect.Descriptor instead.

func (*ListResourcesRequest) GetAsc added in v1.7.8

func (x *ListResourcesRequest) GetAsc() bool

func (*ListResourcesRequest) GetFilter added in v1.7.8

func (*ListResourcesRequest) GetOrderBy added in v1.7.8

func (x *ListResourcesRequest) GetOrderBy() string

func (*ListResourcesRequest) GetPageSize added in v1.7.8

func (x *ListResourcesRequest) GetPageSize() int32

func (*ListResourcesRequest) GetPageToken added in v1.7.8

func (x *ListResourcesRequest) GetPageToken() string

func (*ListResourcesRequest) ProtoMessage added in v1.7.8

func (*ListResourcesRequest) ProtoMessage()

func (*ListResourcesRequest) ProtoReflect added in v1.7.8

func (x *ListResourcesRequest) ProtoReflect() protoreflect.Message

func (*ListResourcesRequest) Reset added in v1.7.8

func (x *ListResourcesRequest) Reset()

func (*ListResourcesRequest) String added in v1.7.8

func (x *ListResourcesRequest) String() string

func (*ListResourcesRequest) Validate added in v1.7.8

func (m *ListResourcesRequest) Validate() error

Validate checks the field values on ListResourcesRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListResourcesRequest) ValidateAll added in v1.7.8

func (m *ListResourcesRequest) ValidateAll() error

ValidateAll checks the field values on ListResourcesRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListResourcesRequestMultiError, or nil if none found.

type ListResourcesRequestMultiError added in v1.7.8

type ListResourcesRequestMultiError []error

ListResourcesRequestMultiError is an error wrapping multiple validation errors returned by ListResourcesRequest.ValidateAll() if the designated constraints aren't met.

func (ListResourcesRequestMultiError) AllErrors added in v1.7.8

func (m ListResourcesRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListResourcesRequestMultiError) Error added in v1.7.8

Error returns a concatenation of all the error messages it wraps.

type ListResourcesRequestValidationError added in v1.7.8

type ListResourcesRequestValidationError struct {
	// contains filtered or unexported fields
}

ListResourcesRequestValidationError is the validation error returned by ListResourcesRequest.Validate if the designated constraints aren't met.

func (ListResourcesRequestValidationError) Cause added in v1.7.8

Cause function returns cause value.

func (ListResourcesRequestValidationError) Error added in v1.7.8

Error satisfies the builtin error interface

func (ListResourcesRequestValidationError) ErrorName added in v1.7.8

ErrorName returns error name.

func (ListResourcesRequestValidationError) Field added in v1.7.8

Field function returns field value.

func (ListResourcesRequestValidationError) Key added in v1.7.8

Key function returns key value.

func (ListResourcesRequestValidationError) Reason added in v1.7.8

Reason function returns reason value.

type ListResourcesRequest_Filter added in v1.7.8

type ListResourcesRequest_Filter struct {
	Type           *string `protobuf:"bytes,1,opt,name=type,proto3,oneof" json:"type,omitempty"`
	CloudServiceId *string `protobuf:"bytes,2,opt,name=cloud_service_id,json=cloudServiceId,proto3,oneof" json:"cloud_service_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ListResourcesRequest_Filter) Descriptor deprecated added in v1.7.8

func (*ListResourcesRequest_Filter) Descriptor() ([]byte, []int)

Deprecated: Use ListResourcesRequest_Filter.ProtoReflect.Descriptor instead.

func (*ListResourcesRequest_Filter) GetCloudServiceId added in v1.7.8

func (x *ListResourcesRequest_Filter) GetCloudServiceId() string

func (*ListResourcesRequest_Filter) GetType added in v1.7.8

func (x *ListResourcesRequest_Filter) GetType() string

func (*ListResourcesRequest_Filter) ProtoMessage added in v1.7.8

func (*ListResourcesRequest_Filter) ProtoMessage()

func (*ListResourcesRequest_Filter) ProtoReflect added in v1.7.8

func (*ListResourcesRequest_Filter) Reset added in v1.7.8

func (x *ListResourcesRequest_Filter) Reset()

func (*ListResourcesRequest_Filter) String added in v1.7.8

func (x *ListResourcesRequest_Filter) String() string

func (*ListResourcesRequest_Filter) Validate added in v1.7.8

func (m *ListResourcesRequest_Filter) Validate() error

Validate checks the field values on ListResourcesRequest_Filter with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListResourcesRequest_Filter) ValidateAll added in v1.7.8

func (m *ListResourcesRequest_Filter) ValidateAll() error

ValidateAll checks the field values on ListResourcesRequest_Filter with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListResourcesRequest_FilterMultiError, or nil if none found.

type ListResourcesRequest_FilterMultiError added in v1.7.8

type ListResourcesRequest_FilterMultiError []error

ListResourcesRequest_FilterMultiError is an error wrapping multiple validation errors returned by ListResourcesRequest_Filter.ValidateAll() if the designated constraints aren't met.

func (ListResourcesRequest_FilterMultiError) AllErrors added in v1.7.8

AllErrors returns a list of validation violation errors.

func (ListResourcesRequest_FilterMultiError) Error added in v1.7.8

Error returns a concatenation of all the error messages it wraps.

type ListResourcesRequest_FilterValidationError added in v1.7.8

type ListResourcesRequest_FilterValidationError struct {
	// contains filtered or unexported fields
}

ListResourcesRequest_FilterValidationError is the validation error returned by ListResourcesRequest_Filter.Validate if the designated constraints aren't met.

func (ListResourcesRequest_FilterValidationError) Cause added in v1.7.8

Cause function returns cause value.

func (ListResourcesRequest_FilterValidationError) Error added in v1.7.8

Error satisfies the builtin error interface

func (ListResourcesRequest_FilterValidationError) ErrorName added in v1.7.8

ErrorName returns error name.

func (ListResourcesRequest_FilterValidationError) Field added in v1.7.8

Field function returns field value.

func (ListResourcesRequest_FilterValidationError) Key added in v1.7.8

Key function returns key value.

func (ListResourcesRequest_FilterValidationError) Reason added in v1.7.8

Reason function returns reason value.

type ListResourcesResponse added in v1.7.8

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 added in v1.7.8

func (*ListResourcesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListResourcesResponse.ProtoReflect.Descriptor instead.

func (*ListResourcesResponse) GetNextPageToken added in v1.7.8

func (x *ListResourcesResponse) GetNextPageToken() string

func (*ListResourcesResponse) GetResults added in v1.7.8

func (x *ListResourcesResponse) GetResults() []*Resource

func (*ListResourcesResponse) ProtoMessage added in v1.7.8

func (*ListResourcesResponse) ProtoMessage()

func (*ListResourcesResponse) ProtoReflect added in v1.7.8

func (x *ListResourcesResponse) ProtoReflect() protoreflect.Message

func (*ListResourcesResponse) Reset added in v1.7.8

func (x *ListResourcesResponse) Reset()

func (*ListResourcesResponse) String added in v1.7.8

func (x *ListResourcesResponse) String() string

func (*ListResourcesResponse) Validate added in v1.7.8

func (m *ListResourcesResponse) Validate() error

Validate checks the field values on ListResourcesResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListResourcesResponse) ValidateAll added in v1.7.8

func (m *ListResourcesResponse) ValidateAll() error

ValidateAll checks the field values on ListResourcesResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListResourcesResponseMultiError, or nil if none found.

type ListResourcesResponseMultiError added in v1.7.8

type ListResourcesResponseMultiError []error

ListResourcesResponseMultiError is an error wrapping multiple validation errors returned by ListResourcesResponse.ValidateAll() if the designated constraints aren't met.

func (ListResourcesResponseMultiError) AllErrors added in v1.7.8

func (m ListResourcesResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListResourcesResponseMultiError) Error added in v1.7.8

Error returns a concatenation of all the error messages it wraps.

type ListResourcesResponseValidationError added in v1.7.8

type ListResourcesResponseValidationError struct {
	// contains filtered or unexported fields
}

ListResourcesResponseValidationError is the validation error returned by ListResourcesResponse.Validate if the designated constraints aren't met.

func (ListResourcesResponseValidationError) Cause added in v1.7.8

Cause function returns cause value.

func (ListResourcesResponseValidationError) Error added in v1.7.8

Error satisfies the builtin error interface

func (ListResourcesResponseValidationError) ErrorName added in v1.7.8

ErrorName returns error name.

func (ListResourcesResponseValidationError) Field added in v1.7.8

Field function returns field value.

func (ListResourcesResponseValidationError) Key added in v1.7.8

Key function returns key value.

func (ListResourcesResponseValidationError) Reason added in v1.7.8

Reason function returns reason value.

type Resource added in v1.7.6

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"`
	// CloudServiceId is the UUID for the cloud service to which this resource
	// belongs to.
	CloudServiceId string `protobuf:"bytes,2,opt,name=cloud_service_id,json=cloudServiceId,proto3" json:"cloud_service_id,omitempty"`
	// ResourceType contains a comma seperated string of resource types according
	// to our ontology.
	ResourceType string `protobuf:"bytes,3,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
	// Properties contains a protobuf struct that describe the resource in the
	// terms of our Clouditor ontology.
	Properties *structpb.Value `protobuf:"bytes,10,opt,name=properties,proto3" json:"properties,omitempty" gorm:"serializer:valuepb;type:json"`
	// contains filtered or unexported fields
}

Resource is a wrapper around google.protobuf.Value that is needed for persistence reasons.

func (*Resource) Descriptor deprecated added in v1.7.6

func (*Resource) Descriptor() ([]byte, []int)

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetCloudServiceId added in v1.7.6

func (x *Resource) GetCloudServiceId() string

func (*Resource) GetId added in v1.7.6

func (x *Resource) GetId() string

func (*Resource) GetProperties added in v1.7.6

func (x *Resource) GetProperties() *structpb.Value

func (*Resource) GetResourceType added in v1.7.6

func (x *Resource) GetResourceType() string

func (*Resource) ProtoMessage added in v1.7.6

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect added in v1.7.6

func (x *Resource) ProtoReflect() protoreflect.Message

func (*Resource) Reset added in v1.7.6

func (x *Resource) Reset()

func (*Resource) String added in v1.7.6

func (x *Resource) String() string

func (*Resource) ToVocResource added in v1.10.0

func (r *Resource) ToVocResource() (voc.IsCloudResource, error)

func (*Resource) Validate added in v1.7.6

func (m *Resource) Validate() error

Validate checks the field values on Resource with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Resource) ValidateAll added in v1.7.6

func (m *Resource) ValidateAll() error

ValidateAll checks the field values on Resource with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ResourceMultiError, or nil if none found.

type ResourceMultiError added in v1.7.6

type ResourceMultiError []error

ResourceMultiError is an error wrapping multiple validation errors returned by Resource.ValidateAll() if the designated constraints aren't met.

func (ResourceMultiError) AllErrors added in v1.7.6

func (m ResourceMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ResourceMultiError) Error added in v1.7.6

func (m ResourceMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ResourceValidationError added in v1.7.6

type ResourceValidationError struct {
	// contains filtered or unexported fields
}

ResourceValidationError is the validation error returned by Resource.Validate if the designated constraints aren't met.

func (ResourceValidationError) Cause added in v1.7.6

func (e ResourceValidationError) Cause() error

Cause function returns cause value.

func (ResourceValidationError) Error added in v1.7.6

func (e ResourceValidationError) Error() string

Error satisfies the builtin error interface

func (ResourceValidationError) ErrorName added in v1.7.6

func (e ResourceValidationError) ErrorName() string

ErrorName returns error name.

func (ResourceValidationError) Field added in v1.7.6

func (e ResourceValidationError) Field() string

Field function returns field value.

func (ResourceValidationError) Key added in v1.7.6

func (e ResourceValidationError) Key() bool

Key function returns key value.

func (ResourceValidationError) Reason added in v1.7.6

func (e ResourceValidationError) Reason() string

Reason function returns reason value.

type StartDiscoveryRequest

type StartDiscoveryRequest struct {
	ResourceGroup *string `protobuf:"bytes,1,opt,name=resource_group,json=resourceGroup,proto3,oneof" json:"resource_group,omitempty"`
	// contains filtered or unexported fields
}

func (*StartDiscoveryRequest) Descriptor deprecated

func (*StartDiscoveryRequest) Descriptor() ([]byte, []int)

Deprecated: Use StartDiscoveryRequest.ProtoReflect.Descriptor instead.

func (*StartDiscoveryRequest) GetResourceGroup added in v1.7.4

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

func (*StartDiscoveryRequest) Validate added in v1.7.0

func (m *StartDiscoveryRequest) Validate() error

Validate checks the field values on StartDiscoveryRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*StartDiscoveryRequest) ValidateAll added in v1.7.0

func (m *StartDiscoveryRequest) ValidateAll() error

ValidateAll checks the field values on StartDiscoveryRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in StartDiscoveryRequestMultiError, or nil if none found.

type StartDiscoveryRequestMultiError added in v1.7.0

type StartDiscoveryRequestMultiError []error

StartDiscoveryRequestMultiError is an error wrapping multiple validation errors returned by StartDiscoveryRequest.ValidateAll() if the designated constraints aren't met.

func (StartDiscoveryRequestMultiError) AllErrors added in v1.7.0

func (m StartDiscoveryRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (StartDiscoveryRequestMultiError) Error added in v1.7.0

Error returns a concatenation of all the error messages it wraps.

type StartDiscoveryRequestValidationError added in v1.7.0

type StartDiscoveryRequestValidationError struct {
	// contains filtered or unexported fields
}

StartDiscoveryRequestValidationError is the validation error returned by StartDiscoveryRequest.Validate if the designated constraints aren't met.

func (StartDiscoveryRequestValidationError) Cause added in v1.7.0

Cause function returns cause value.

func (StartDiscoveryRequestValidationError) Error added in v1.7.0

Error satisfies the builtin error interface

func (StartDiscoveryRequestValidationError) ErrorName added in v1.7.0

ErrorName returns error name.

func (StartDiscoveryRequestValidationError) Field added in v1.7.0

Field function returns field value.

func (StartDiscoveryRequestValidationError) Key added in v1.7.0

Key function returns key value.

func (StartDiscoveryRequestValidationError) Reason added in v1.7.0

Reason function returns reason value.

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

func (*StartDiscoveryResponse) Validate added in v1.7.0

func (m *StartDiscoveryResponse) Validate() error

Validate checks the field values on StartDiscoveryResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*StartDiscoveryResponse) ValidateAll added in v1.7.0

func (m *StartDiscoveryResponse) ValidateAll() error

ValidateAll checks the field values on StartDiscoveryResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in StartDiscoveryResponseMultiError, or nil if none found.

type StartDiscoveryResponseMultiError added in v1.7.0

type StartDiscoveryResponseMultiError []error

StartDiscoveryResponseMultiError is an error wrapping multiple validation errors returned by StartDiscoveryResponse.ValidateAll() if the designated constraints aren't met.

func (StartDiscoveryResponseMultiError) AllErrors added in v1.7.0

func (m StartDiscoveryResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (StartDiscoveryResponseMultiError) Error added in v1.7.0

Error returns a concatenation of all the error messages it wraps.

type StartDiscoveryResponseValidationError added in v1.7.0

type StartDiscoveryResponseValidationError struct {
	// contains filtered or unexported fields
}

StartDiscoveryResponseValidationError is the validation error returned by StartDiscoveryResponse.Validate if the designated constraints aren't met.

func (StartDiscoveryResponseValidationError) Cause added in v1.7.0

Cause function returns cause value.

func (StartDiscoveryResponseValidationError) Error added in v1.7.0

Error satisfies the builtin error interface

func (StartDiscoveryResponseValidationError) ErrorName added in v1.7.0

ErrorName returns error name.

func (StartDiscoveryResponseValidationError) Field added in v1.7.0

Field function returns field value.

func (StartDiscoveryResponseValidationError) Key added in v1.7.0

Key function returns key value.

func (StartDiscoveryResponseValidationError) Reason added in v1.7.0

Reason function returns reason value.

type UnimplementedDiscoveryServer

type UnimplementedDiscoveryServer struct {
}

UnimplementedDiscoveryServer must be embedded to have forward compatible implementations.

func (UnimplementedDiscoveryServer) ListResources added in v1.7.8

func (UnimplementedDiscoveryServer) Start

type UnimplementedExperimentalDiscoveryServer added in v1.10.0

type UnimplementedExperimentalDiscoveryServer struct {
}

UnimplementedExperimentalDiscoveryServer must be embedded to have forward compatible implementations.

func (UnimplementedExperimentalDiscoveryServer) ListGraphEdges added in v1.10.0

func (UnimplementedExperimentalDiscoveryServer) UpdateResource added in v1.10.0

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 added in v1.10.0

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 added in v1.10.0

type UpdateResourceRequest struct {
	Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateResourceRequest) Descriptor deprecated added in v1.10.0

func (*UpdateResourceRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateResourceRequest.ProtoReflect.Descriptor instead.

func (*UpdateResourceRequest) GetCloudServiceId added in v1.10.0

func (req *UpdateResourceRequest) GetCloudServiceId() string

GetCloudServiceId is a shortcut to implement CloudServiceRequest. It returns the cloud service ID of the inner object.

func (*UpdateResourceRequest) GetResource added in v1.10.0

func (x *UpdateResourceRequest) GetResource() *Resource

func (*UpdateResourceRequest) ProtoMessage added in v1.10.0

func (*UpdateResourceRequest) ProtoMessage()

func (*UpdateResourceRequest) ProtoReflect added in v1.10.0

func (x *UpdateResourceRequest) ProtoReflect() protoreflect.Message

func (*UpdateResourceRequest) Reset added in v1.10.0

func (x *UpdateResourceRequest) Reset()

func (*UpdateResourceRequest) String added in v1.10.0

func (x *UpdateResourceRequest) String() string

func (*UpdateResourceRequest) Validate added in v1.10.0

func (m *UpdateResourceRequest) Validate() error

Validate checks the field values on UpdateResourceRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UpdateResourceRequest) ValidateAll added in v1.10.0

func (m *UpdateResourceRequest) ValidateAll() error

ValidateAll checks the field values on UpdateResourceRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateResourceRequestMultiError, or nil if none found.

type UpdateResourceRequestMultiError added in v1.10.0

type UpdateResourceRequestMultiError []error

UpdateResourceRequestMultiError is an error wrapping multiple validation errors returned by UpdateResourceRequest.ValidateAll() if the designated constraints aren't met.

func (UpdateResourceRequestMultiError) AllErrors added in v1.10.0

func (m UpdateResourceRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateResourceRequestMultiError) Error added in v1.10.0

Error returns a concatenation of all the error messages it wraps.

type UpdateResourceRequestValidationError added in v1.10.0

type UpdateResourceRequestValidationError struct {
	// contains filtered or unexported fields
}

UpdateResourceRequestValidationError is the validation error returned by UpdateResourceRequest.Validate if the designated constraints aren't met.

func (UpdateResourceRequestValidationError) Cause added in v1.10.0

Cause function returns cause value.

func (UpdateResourceRequestValidationError) Error added in v1.10.0

Error satisfies the builtin error interface

func (UpdateResourceRequestValidationError) ErrorName added in v1.10.0

ErrorName returns error name.

func (UpdateResourceRequestValidationError) Field added in v1.10.0

Field function returns field value.

func (UpdateResourceRequestValidationError) Key added in v1.10.0

Key function returns key value.

func (UpdateResourceRequestValidationError) Reason added in v1.10.0

Reason function returns reason value.

Jump to

Keyboard shortcuts

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