clairpb

package
v3.0.0-pre1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Overview

Package clairpb is a generated protocol buffer package.

It is generated from these files:

api/v3/clairpb/clair.proto

It has these top-level messages:

Vulnerability
Detector
Namespace
Feature
Layer
ClairStatus
GetAncestryRequest
GetAncestryResponse
PostAncestryRequest
PostAncestryResponse
GetNotificationRequest
GetNotificationResponse
PagedVulnerableAncestries
MarkNotificationAsReadRequest
MarkNotificationAsReadResponse
GetStatusRequest
GetStatusResponse

Package clairpb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

DatabaseDetectorTypeMapping maps the database detector type to the integer enum proto.

View Source
var Detector_DType_name = map[int32]string{
	0: "DETECTOR_D_TYPE_INVALID",
	1: "DETECTOR_D_TYPE_NAMESPACE",
	2: "DETECTOR_D_TYPE_FEATURE",
}
View Source
var Detector_DType_value = map[string]int32{
	"DETECTOR_D_TYPE_INVALID":   0,
	"DETECTOR_D_TYPE_NAMESPACE": 1,
	"DETECTOR_D_TYPE_FEATURE":   2,
}

Functions

func RegisterAncestryServiceHandler

func RegisterAncestryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAncestryServiceHandler registers the http handlers for service AncestryService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAncestryServiceHandlerClient

func RegisterAncestryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AncestryServiceClient) error

RegisterAncestryServiceHandler registers the http handlers for service AncestryService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AncestryServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AncestryServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AncestryServiceClient" to call the correct interceptors.

func RegisterAncestryServiceHandlerFromEndpoint

func RegisterAncestryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAncestryServiceHandlerFromEndpoint is same as RegisterAncestryServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAncestryServiceServer

func RegisterAncestryServiceServer(s *grpc.Server, srv AncestryServiceServer)

func RegisterNotificationServiceHandler

func RegisterNotificationServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterNotificationServiceHandler registers the http handlers for service NotificationService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterNotificationServiceHandlerClient

func RegisterNotificationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NotificationServiceClient) error

RegisterNotificationServiceHandler registers the http handlers for service NotificationService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NotificationServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NotificationServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "NotificationServiceClient" to call the correct interceptors.

func RegisterNotificationServiceHandlerFromEndpoint

func RegisterNotificationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterNotificationServiceHandlerFromEndpoint is same as RegisterNotificationServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterNotificationServiceServer

func RegisterNotificationServiceServer(s *grpc.Server, srv NotificationServiceServer)

func RegisterStatusServiceHandler

func RegisterStatusServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterStatusServiceHandler registers the http handlers for service StatusService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterStatusServiceHandlerClient

func RegisterStatusServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client StatusServiceClient) error

RegisterStatusServiceHandler registers the http handlers for service StatusService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "StatusServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "StatusServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "StatusServiceClient" to call the correct interceptors.

func RegisterStatusServiceHandlerFromEndpoint

func RegisterStatusServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterStatusServiceHandlerFromEndpoint is same as RegisterStatusServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterStatusServiceServer

func RegisterStatusServiceServer(s *grpc.Server, srv StatusServiceServer)

Types

type AncestryServiceClient

type AncestryServiceClient interface {
	// The RPC used to read the results of scanning for a particular ancestry.
	GetAncestry(ctx context.Context, in *GetAncestryRequest, opts ...grpc.CallOption) (*GetAncestryResponse, error)
	// The RPC used to create a new scan of an ancestry.
	PostAncestry(ctx context.Context, in *PostAncestryRequest, opts ...grpc.CallOption) (*PostAncestryResponse, error)
}

func NewAncestryServiceClient

func NewAncestryServiceClient(cc *grpc.ClientConn) AncestryServiceClient

type AncestryServiceServer

type AncestryServiceServer interface {
	// The RPC used to read the results of scanning for a particular ancestry.
	GetAncestry(context.Context, *GetAncestryRequest) (*GetAncestryResponse, error)
	// The RPC used to create a new scan of an ancestry.
	PostAncestry(context.Context, *PostAncestryRequest) (*PostAncestryResponse, error)
}

type ClairStatus

type ClairStatus struct {
	// The implemented detectors in this Clair instance
	Detectors []*Detector `protobuf:"bytes,1,rep,name=detectors" json:"detectors,omitempty"`
	// The time at which the updater last ran.
	LastUpdateTime *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=last_update_time,json=lastUpdateTime" json:"last_update_time,omitempty"`
}

func (*ClairStatus) Descriptor

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

func (*ClairStatus) GetDetectors

func (m *ClairStatus) GetDetectors() []*Detector

func (*ClairStatus) GetLastUpdateTime

func (m *ClairStatus) GetLastUpdateTime() *google_protobuf.Timestamp

func (*ClairStatus) ProtoMessage

func (*ClairStatus) ProtoMessage()

func (*ClairStatus) Reset

func (m *ClairStatus) Reset()

func (*ClairStatus) String

func (m *ClairStatus) String() string

type Detector

type Detector struct {
	// The name of the detector.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The version of the detector.
	Version string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"`
	// The type of the detector.
	Dtype Detector_DType `protobuf:"varint,3,opt,name=dtype,enum=coreos.clair.Detector_DType" json:"dtype,omitempty"`
}

func DetectorFromDatabaseModel

func DetectorFromDatabaseModel(detector database.Detector) *Detector

DetectorFromDatabaseModel converts database detector to api detector.

func DetectorsFromDatabaseModel

func DetectorsFromDatabaseModel(dbDetectors []database.Detector) []*Detector

DetectorsFromDatabaseModel converts database detectors to api detectors.

func (*Detector) Descriptor

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

func (*Detector) GetDtype

func (m *Detector) GetDtype() Detector_DType

func (*Detector) GetName

func (m *Detector) GetName() string

func (*Detector) GetVersion

func (m *Detector) GetVersion() string

func (*Detector) ProtoMessage

func (*Detector) ProtoMessage()

func (*Detector) Reset

func (m *Detector) Reset()

func (*Detector) String

func (m *Detector) String() string

type Detector_DType

type Detector_DType int32
const (
	Detector_DETECTOR_D_TYPE_INVALID   Detector_DType = 0
	Detector_DETECTOR_D_TYPE_NAMESPACE Detector_DType = 1
	Detector_DETECTOR_D_TYPE_FEATURE   Detector_DType = 2
)

func (Detector_DType) EnumDescriptor

func (Detector_DType) EnumDescriptor() ([]byte, []int)

func (Detector_DType) String

func (x Detector_DType) String() string

type Feature

type Feature struct {
	// The name of the feature.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The namespace in which the feature is detected.
	Namespace *Namespace `protobuf:"bytes,2,opt,name=namespace" json:"namespace,omitempty"`
	// The specific version of this feature.
	Version string `protobuf:"bytes,3,opt,name=version" json:"version,omitempty"`
	// The format used to parse version numbers for the feature.
	VersionFormat string `protobuf:"bytes,4,opt,name=version_format,json=versionFormat" json:"version_format,omitempty"`
	// The detector used to detect this feature. This only exists when present
	// in an Ancestry.
	Detector *Detector `protobuf:"bytes,5,opt,name=detector" json:"detector,omitempty"`
	// The list of vulnerabilities that affect the feature.
	Vulnerabilities []*Vulnerability `protobuf:"bytes,6,rep,name=vulnerabilities" json:"vulnerabilities,omitempty"`
	// The feature type indicates if the feature represents a source package or
	// binary package.
	FeatureType string `protobuf:"bytes,7,opt,name=feature_type,json=featureType" json:"feature_type,omitempty"`
}

func NamespacedFeatureFromDatabaseModel

func NamespacedFeatureFromDatabaseModel(feature database.AncestryFeature) *Feature

NamespacedFeatureFromDatabaseModel converts database namespacedFeature to api Feature.

func (*Feature) Descriptor

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

func (*Feature) GetDetector

func (m *Feature) GetDetector() *Detector

func (*Feature) GetFeatureType

func (m *Feature) GetFeatureType() string

func (*Feature) GetName

func (m *Feature) GetName() string

func (*Feature) GetNamespace

func (m *Feature) GetNamespace() *Namespace

func (*Feature) GetVersion

func (m *Feature) GetVersion() string

func (*Feature) GetVersionFormat

func (m *Feature) GetVersionFormat() string

func (*Feature) GetVulnerabilities

func (m *Feature) GetVulnerabilities() []*Vulnerability

func (*Feature) ProtoMessage

func (*Feature) ProtoMessage()

func (*Feature) Reset

func (m *Feature) Reset()

func (*Feature) String

func (m *Feature) String() string

type GetAncestryRequest

type GetAncestryRequest struct {
	// The name of the desired ancestry.
	AncestryName string `protobuf:"bytes,1,opt,name=ancestry_name,json=ancestryName" json:"ancestry_name,omitempty"`
}

func (*GetAncestryRequest) Descriptor

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

func (*GetAncestryRequest) GetAncestryName

func (m *GetAncestryRequest) GetAncestryName() string

func (*GetAncestryRequest) ProtoMessage

func (*GetAncestryRequest) ProtoMessage()

func (*GetAncestryRequest) Reset

func (m *GetAncestryRequest) Reset()

func (*GetAncestryRequest) String

func (m *GetAncestryRequest) String() string

type GetAncestryResponse

type GetAncestryResponse struct {
	// The ancestry requested.
	Ancestry *GetAncestryResponse_Ancestry `protobuf:"bytes,1,opt,name=ancestry" json:"ancestry,omitempty"`
	// The status of Clair at the time of the request
	Status *ClairStatus `protobuf:"bytes,2,opt,name=status" json:"status,omitempty"`
}

func (*GetAncestryResponse) Descriptor

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

func (*GetAncestryResponse) GetAncestry

func (*GetAncestryResponse) GetStatus

func (m *GetAncestryResponse) GetStatus() *ClairStatus

func (*GetAncestryResponse) ProtoMessage

func (*GetAncestryResponse) ProtoMessage()

func (*GetAncestryResponse) Reset

func (m *GetAncestryResponse) Reset()

func (*GetAncestryResponse) String

func (m *GetAncestryResponse) String() string

type GetAncestryResponse_Ancestry

type GetAncestryResponse_Ancestry struct {
	// The name of the desired ancestry.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The list of layers along with detected features in each.
	Layers []*GetAncestryResponse_AncestryLayer `protobuf:"bytes,3,rep,name=layers" json:"layers,omitempty"`
}

func (*GetAncestryResponse_Ancestry) Descriptor

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

func (*GetAncestryResponse_Ancestry) GetLayers

func (*GetAncestryResponse_Ancestry) GetName

func (m *GetAncestryResponse_Ancestry) GetName() string

func (*GetAncestryResponse_Ancestry) ProtoMessage

func (*GetAncestryResponse_Ancestry) ProtoMessage()

func (*GetAncestryResponse_Ancestry) Reset

func (m *GetAncestryResponse_Ancestry) Reset()

func (*GetAncestryResponse_Ancestry) String

type GetAncestryResponse_AncestryLayer

type GetAncestryResponse_AncestryLayer struct {
	// The layer's information.
	Layer *Layer `protobuf:"bytes,1,opt,name=layer" json:"layer,omitempty"`
	// The features detected in this layer.
	DetectedFeatures []*Feature `protobuf:"bytes,2,rep,name=detected_features,json=detectedFeatures" json:"detected_features,omitempty"`
}

func (*GetAncestryResponse_AncestryLayer) Descriptor

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

func (*GetAncestryResponse_AncestryLayer) GetDetectedFeatures

func (m *GetAncestryResponse_AncestryLayer) GetDetectedFeatures() []*Feature

func (*GetAncestryResponse_AncestryLayer) GetLayer

func (*GetAncestryResponse_AncestryLayer) ProtoMessage

func (*GetAncestryResponse_AncestryLayer) ProtoMessage()

func (*GetAncestryResponse_AncestryLayer) Reset

func (*GetAncestryResponse_AncestryLayer) String

type GetNotificationRequest

type GetNotificationRequest struct {
	// The current page of previous vulnerabilities for the ancestry.
	// This will be empty when it is the first page.
	OldVulnerabilityPage string `protobuf:"bytes,1,opt,name=old_vulnerability_page,json=oldVulnerabilityPage" json:"old_vulnerability_page,omitempty"`
	// The current page of vulnerabilities for the ancestry.
	// This will be empty when it is the first page.
	NewVulnerabilityPage string `protobuf:"bytes,2,opt,name=new_vulnerability_page,json=newVulnerabilityPage" json:"new_vulnerability_page,omitempty"`
	// The requested maximum number of results per page.
	Limit int32 `protobuf:"varint,3,opt,name=limit" json:"limit,omitempty"`
	// The name of the notification being requested.
	Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"`
}

func (*GetNotificationRequest) Descriptor

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

func (*GetNotificationRequest) GetLimit

func (m *GetNotificationRequest) GetLimit() int32

func (*GetNotificationRequest) GetName

func (m *GetNotificationRequest) GetName() string

func (*GetNotificationRequest) GetNewVulnerabilityPage

func (m *GetNotificationRequest) GetNewVulnerabilityPage() string

func (*GetNotificationRequest) GetOldVulnerabilityPage

func (m *GetNotificationRequest) GetOldVulnerabilityPage() string

func (*GetNotificationRequest) ProtoMessage

func (*GetNotificationRequest) ProtoMessage()

func (*GetNotificationRequest) Reset

func (m *GetNotificationRequest) Reset()

func (*GetNotificationRequest) String

func (m *GetNotificationRequest) String() string

type GetNotificationResponse

type GetNotificationResponse struct {
	// The notification as requested.
	Notification *GetNotificationResponse_Notification `protobuf:"bytes,1,opt,name=notification" json:"notification,omitempty"`
}

func (*GetNotificationResponse) Descriptor

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

func (*GetNotificationResponse) GetNotification

func (*GetNotificationResponse) ProtoMessage

func (*GetNotificationResponse) ProtoMessage()

func (*GetNotificationResponse) Reset

func (m *GetNotificationResponse) Reset()

func (*GetNotificationResponse) String

func (m *GetNotificationResponse) String() string

type GetNotificationResponse_Notification

type GetNotificationResponse_Notification struct {
	// The name of the requested notification.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The time at which the notification was created.
	Created string `protobuf:"bytes,2,opt,name=created" json:"created,omitempty"`
	// The time at which the notification was last sent out.
	Notified string `protobuf:"bytes,3,opt,name=notified" json:"notified,omitempty"`
	// The time at which a notification has been deleted.
	Deleted string `protobuf:"bytes,4,opt,name=deleted" json:"deleted,omitempty"`
	// The previous vulnerability and a paginated view of the ancestries it
	// affects.
	Old *PagedVulnerableAncestries `protobuf:"bytes,5,opt,name=old" json:"old,omitempty"`
	// The newly updated vulnerability and a paginated view of the
	// ancestries it affects.
	New *PagedVulnerableAncestries `protobuf:"bytes,6,opt,name=new" json:"new,omitempty"`
}

func NotificationFromDatabaseModel

func NotificationFromDatabaseModel(dbNotification database.VulnerabilityNotificationWithVulnerable) (*GetNotificationResponse_Notification, error)

NotificationFromDatabaseModel converts database notification, old and new vulnerabilities' paged vulnerable ancestries to be api notification.

func (*GetNotificationResponse_Notification) Descriptor

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

func (*GetNotificationResponse_Notification) GetCreated

func (*GetNotificationResponse_Notification) GetDeleted

func (*GetNotificationResponse_Notification) GetName

func (*GetNotificationResponse_Notification) GetNew

func (*GetNotificationResponse_Notification) GetNotified

func (*GetNotificationResponse_Notification) GetOld

func (*GetNotificationResponse_Notification) ProtoMessage

func (*GetNotificationResponse_Notification) ProtoMessage()

func (*GetNotificationResponse_Notification) Reset

func (*GetNotificationResponse_Notification) String

type GetStatusRequest

type GetStatusRequest struct {
}

func (*GetStatusRequest) Descriptor

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

func (*GetStatusRequest) ProtoMessage

func (*GetStatusRequest) ProtoMessage()

func (*GetStatusRequest) Reset

func (m *GetStatusRequest) Reset()

func (*GetStatusRequest) String

func (m *GetStatusRequest) String() string

type GetStatusResponse

type GetStatusResponse struct {
	// The status of the current Clair instance.
	Status *ClairStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
}

func (*GetStatusResponse) Descriptor

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

func (*GetStatusResponse) GetStatus

func (m *GetStatusResponse) GetStatus() *ClairStatus

func (*GetStatusResponse) ProtoMessage

func (*GetStatusResponse) ProtoMessage()

func (*GetStatusResponse) Reset

func (m *GetStatusResponse) Reset()

func (*GetStatusResponse) String

func (m *GetStatusResponse) String() string

type Layer

type Layer struct {
	// The sha256 tarsum for the layer.
	Hash string `protobuf:"bytes,1,opt,name=hash" json:"hash,omitempty"`
}

func (*Layer) Descriptor

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

func (*Layer) GetHash

func (m *Layer) GetHash() string

func (*Layer) ProtoMessage

func (*Layer) ProtoMessage()

func (*Layer) Reset

func (m *Layer) Reset()

func (*Layer) String

func (m *Layer) String() string

type MarkNotificationAsReadRequest

type MarkNotificationAsReadRequest struct {
	// The name of the Notification that has been processed.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}

func (*MarkNotificationAsReadRequest) Descriptor

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

func (*MarkNotificationAsReadRequest) GetName

func (*MarkNotificationAsReadRequest) ProtoMessage

func (*MarkNotificationAsReadRequest) ProtoMessage()

func (*MarkNotificationAsReadRequest) Reset

func (m *MarkNotificationAsReadRequest) Reset()

func (*MarkNotificationAsReadRequest) String

type MarkNotificationAsReadResponse

type MarkNotificationAsReadResponse struct {
}

func (*MarkNotificationAsReadResponse) Descriptor

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

func (*MarkNotificationAsReadResponse) ProtoMessage

func (*MarkNotificationAsReadResponse) ProtoMessage()

func (*MarkNotificationAsReadResponse) Reset

func (m *MarkNotificationAsReadResponse) Reset()

func (*MarkNotificationAsReadResponse) String

type Namespace

type Namespace struct {
	// The name of the namespace.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The detector used to detect the namespace. This only exists when present
	// in an Ancestry Feature.
	Detector *Detector `protobuf:"bytes,2,opt,name=detector" json:"detector,omitempty"`
}

func (*Namespace) Descriptor

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

func (*Namespace) GetDetector

func (m *Namespace) GetDetector() *Detector

func (*Namespace) GetName

func (m *Namespace) GetName() string

func (*Namespace) ProtoMessage

func (*Namespace) ProtoMessage()

func (*Namespace) Reset

func (m *Namespace) Reset()

func (*Namespace) String

func (m *Namespace) String() string

type NotificationServiceClient

type NotificationServiceClient interface {
	// The RPC used to get a particularly Notification.
	GetNotification(ctx context.Context, in *GetNotificationRequest, opts ...grpc.CallOption) (*GetNotificationResponse, error)
	// The RPC used to mark a Notification as read after it has been processed.
	MarkNotificationAsRead(ctx context.Context, in *MarkNotificationAsReadRequest, opts ...grpc.CallOption) (*MarkNotificationAsReadResponse, error)
}

func NewNotificationServiceClient

func NewNotificationServiceClient(cc *grpc.ClientConn) NotificationServiceClient

type NotificationServiceServer

type NotificationServiceServer interface {
	// The RPC used to get a particularly Notification.
	GetNotification(context.Context, *GetNotificationRequest) (*GetNotificationResponse, error)
	// The RPC used to mark a Notification as read after it has been processed.
	MarkNotificationAsRead(context.Context, *MarkNotificationAsReadRequest) (*MarkNotificationAsReadResponse, error)
}

type PagedVulnerableAncestries

type PagedVulnerableAncestries struct {
	// The identifier for the current page.
	CurrentPage string `protobuf:"bytes,1,opt,name=current_page,json=currentPage" json:"current_page,omitempty"`
	// The token used to request the next page.
	// This will be empty when there are no more pages.
	NextPage string `protobuf:"bytes,2,opt,name=next_page,json=nextPage" json:"next_page,omitempty"`
	// The requested maximum number of results per page.
	Limit int32 `protobuf:"varint,3,opt,name=limit" json:"limit,omitempty"`
	// The vulnerability that affects a given set of ancestries.
	Vulnerability *Vulnerability `protobuf:"bytes,4,opt,name=vulnerability" json:"vulnerability,omitempty"`
	// The ancestries affected by a vulnerability.
	Ancestries []*PagedVulnerableAncestries_IndexedAncestryName `protobuf:"bytes,5,rep,name=ancestries" json:"ancestries,omitempty"`
}

func PagedVulnerableAncestriesFromDatabaseModel

func PagedVulnerableAncestriesFromDatabaseModel(dbVuln *database.PagedVulnerableAncestries) (*PagedVulnerableAncestries, error)

PagedVulnerableAncestriesFromDatabaseModel converts database PagedVulnerableAncestries to api PagedVulnerableAncestries and assigns indexes to ancestries.

func (*PagedVulnerableAncestries) Descriptor

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

func (*PagedVulnerableAncestries) GetAncestries

func (*PagedVulnerableAncestries) GetCurrentPage

func (m *PagedVulnerableAncestries) GetCurrentPage() string

func (*PagedVulnerableAncestries) GetLimit

func (m *PagedVulnerableAncestries) GetLimit() int32

func (*PagedVulnerableAncestries) GetNextPage

func (m *PagedVulnerableAncestries) GetNextPage() string

func (*PagedVulnerableAncestries) GetVulnerability

func (m *PagedVulnerableAncestries) GetVulnerability() *Vulnerability

func (*PagedVulnerableAncestries) ProtoMessage

func (*PagedVulnerableAncestries) ProtoMessage()

func (*PagedVulnerableAncestries) Reset

func (m *PagedVulnerableAncestries) Reset()

func (*PagedVulnerableAncestries) String

func (m *PagedVulnerableAncestries) String() string

type PagedVulnerableAncestries_IndexedAncestryName

type PagedVulnerableAncestries_IndexedAncestryName struct {
	// The index is an ever increasing number associated with the particular
	// ancestry. This is useful if you're processing notifications, and need
	// to keep track of the progress of paginating the results.
	Index int32 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"`
	// The name of the ancestry.
	Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
}

func (*PagedVulnerableAncestries_IndexedAncestryName) Descriptor

func (*PagedVulnerableAncestries_IndexedAncestryName) GetIndex

func (*PagedVulnerableAncestries_IndexedAncestryName) GetName

func (*PagedVulnerableAncestries_IndexedAncestryName) ProtoMessage

func (*PagedVulnerableAncestries_IndexedAncestryName) Reset

func (*PagedVulnerableAncestries_IndexedAncestryName) String

type PostAncestryRequest

type PostAncestryRequest struct {
	// The name of the ancestry being scanned.
	// If scanning OCI images, this should be the hash of the manifest.
	AncestryName string `protobuf:"bytes,1,opt,name=ancestry_name,json=ancestryName" json:"ancestry_name,omitempty"`
	// The format of the image being uploaded.
	Format string `protobuf:"bytes,2,opt,name=format" json:"format,omitempty"`
	// The layers to be scanned for this Ancestry, ordered in the way that i th
	// layer is the parent of i + 1 th layer.
	Layers []*PostAncestryRequest_PostLayer `protobuf:"bytes,3,rep,name=layers" json:"layers,omitempty"`
}

func (*PostAncestryRequest) Descriptor

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

func (*PostAncestryRequest) GetAncestryName

func (m *PostAncestryRequest) GetAncestryName() string

func (*PostAncestryRequest) GetFormat

func (m *PostAncestryRequest) GetFormat() string

func (*PostAncestryRequest) GetLayers

func (*PostAncestryRequest) ProtoMessage

func (*PostAncestryRequest) ProtoMessage()

func (*PostAncestryRequest) Reset

func (m *PostAncestryRequest) Reset()

func (*PostAncestryRequest) String

func (m *PostAncestryRequest) String() string

type PostAncestryRequest_PostLayer

type PostAncestryRequest_PostLayer struct {
	// The hash of the layer.
	Hash string `protobuf:"bytes,1,opt,name=hash" json:"hash,omitempty"`
	// The location of the layer (URL or file path).
	Path string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"`
	// Any HTTP Headers that need to be used if requesting a layer over
	// HTTP(S).
	Headers map[string]string `` /* 134-byte string literal not displayed */
}

func (*PostAncestryRequest_PostLayer) Descriptor

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

func (*PostAncestryRequest_PostLayer) GetHash

func (*PostAncestryRequest_PostLayer) GetHeaders

func (m *PostAncestryRequest_PostLayer) GetHeaders() map[string]string

func (*PostAncestryRequest_PostLayer) GetPath

func (*PostAncestryRequest_PostLayer) ProtoMessage

func (*PostAncestryRequest_PostLayer) ProtoMessage()

func (*PostAncestryRequest_PostLayer) Reset

func (m *PostAncestryRequest_PostLayer) Reset()

func (*PostAncestryRequest_PostLayer) String

type PostAncestryResponse

type PostAncestryResponse struct {
	// The status of Clair at the time of the request.
	Status *ClairStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
}

func (*PostAncestryResponse) Descriptor

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

func (*PostAncestryResponse) GetStatus

func (m *PostAncestryResponse) GetStatus() *ClairStatus

func (*PostAncestryResponse) ProtoMessage

func (*PostAncestryResponse) ProtoMessage()

func (*PostAncestryResponse) Reset

func (m *PostAncestryResponse) Reset()

func (*PostAncestryResponse) String

func (m *PostAncestryResponse) String() string

type StatusServiceClient

type StatusServiceClient interface {
	// The RPC used to show the internal state of current Clair instance.
	GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error)
}

func NewStatusServiceClient

func NewStatusServiceClient(cc *grpc.ClientConn) StatusServiceClient

type StatusServiceServer

type StatusServiceServer interface {
	// The RPC used to show the internal state of current Clair instance.
	GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error)
}

type Vulnerability

type Vulnerability struct {
	// The name of the vulnerability.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The name of the namespace in which the vulnerability was detected.
	NamespaceName string `protobuf:"bytes,2,opt,name=namespace_name,json=namespaceName" json:"namespace_name,omitempty"`
	// A description of the vulnerability according to the source for the
	// namespace.
	Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
	// A link to the vulnerability according to the source for the namespace.
	Link string `protobuf:"bytes,4,opt,name=link" json:"link,omitempty"`
	// How dangerous the vulnerability is.
	Severity string `protobuf:"bytes,5,opt,name=severity" json:"severity,omitempty"`
	// Namespace agnostic metadata about the vulnerability.
	Metadata string `protobuf:"bytes,6,opt,name=metadata" json:"metadata,omitempty"`
	// The feature that fixes this vulnerability.
	// This field only exists when a vulnerability is a part of a Feature.
	FixedBy string `protobuf:"bytes,7,opt,name=fixed_by,json=fixedBy" json:"fixed_by,omitempty"`
	// The Features that are affected by the vulnerability.
	// This field only exists when a vulnerability is a part of a Notification.
	AffectedVersions []*Feature `protobuf:"bytes,8,rep,name=affected_versions,json=affectedVersions" json:"affected_versions,omitempty"`
}

func VulnerabilityFromDatabaseModel

func VulnerabilityFromDatabaseModel(dbVuln database.Vulnerability) (*Vulnerability, error)

VulnerabilityFromDatabaseModel converts database Vulnerability to api Vulnerability.

func VulnerabilityWithFixedInFromDatabaseModel

func VulnerabilityWithFixedInFromDatabaseModel(dbVuln database.VulnerabilityWithFixedIn) (*Vulnerability, error)

VulnerabilityWithFixedInFromDatabaseModel converts database VulnerabilityWithFixedIn to api Vulnerability.

func (*Vulnerability) Descriptor

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

func (*Vulnerability) GetAffectedVersions

func (m *Vulnerability) GetAffectedVersions() []*Feature

func (*Vulnerability) GetDescription

func (m *Vulnerability) GetDescription() string

func (*Vulnerability) GetFixedBy

func (m *Vulnerability) GetFixedBy() string
func (m *Vulnerability) GetLink() string

func (*Vulnerability) GetMetadata

func (m *Vulnerability) GetMetadata() string

func (*Vulnerability) GetName

func (m *Vulnerability) GetName() string

func (*Vulnerability) GetNamespaceName

func (m *Vulnerability) GetNamespaceName() string

func (*Vulnerability) GetSeverity

func (m *Vulnerability) GetSeverity() string

func (*Vulnerability) ProtoMessage

func (*Vulnerability) ProtoMessage()

func (*Vulnerability) Reset

func (m *Vulnerability) Reset()

func (*Vulnerability) String

func (m *Vulnerability) String() string

Jump to

Keyboard shortcuts

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