Documentation ¶
Index ¶
- func HTTPAPI(a *AssetMon) http.Handler
- func OpenDB(dburi string) (*sql.DB, error)
- type Artifact
- type ArtifactResult
- type AssetMon
- func (a *AssetMon) Close()
- func (a *AssetMon) FindArtifacts(ctx context.Context, req *FindArtifactsRequest) (*FindArtifactsResponse, error)
- func (a *AssetMon) FullUpdate(ctx context.Context, req *FullUpdateRequest) (*UpdateResponse, error)
- func (a *AssetMon) GetContainerDeployment(ctx context.Context, req *GetContainerDeploymentRequest) ([]*ContainerInfo, error)
- func (a *AssetMon) GetImageSBOM(ctx context.Context, digest string) (*Image, error)
- func (a *AssetMon) ScanReport(ctx context.Context, req *ScanReportRequest) error
- func (a *AssetMon) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)
- type Client
- type Container
- type ContainerInfo
- type ContainerSummary
- type FindArtifactsRequest
- type FindArtifactsResponse
- type FullUpdateRequest
- type GetContainerDeploymentRequest
- type GetContainerDeploymentResponse
- type GetImageSBOMRequest
- type GetImageSBOMResponse
- type Image
- type Match
- type ScanReportRequest
- type UpdateRequest
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArtifactResult ¶
type ArtifactResult struct { Artifact ContainerInfo }
type AssetMon ¶
type AssetMon struct {
// contains filtered or unexported fields
}
AssetMon implements the asset management (tracking) service.
func NewAssetMon ¶
func (*AssetMon) FindArtifacts ¶
func (a *AssetMon) FindArtifacts(ctx context.Context, req *FindArtifactsRequest) (*FindArtifactsResponse, error)
func (*AssetMon) FullUpdate ¶
func (a *AssetMon) FullUpdate(ctx context.Context, req *FullUpdateRequest) (*UpdateResponse, error)
func (*AssetMon) GetContainerDeployment ¶
func (a *AssetMon) GetContainerDeployment(ctx context.Context, req *GetContainerDeploymentRequest) ([]*ContainerInfo, error)
func (*AssetMon) GetImageSBOM ¶
func (*AssetMon) ScanReport ¶
func (a *AssetMon) ScanReport(ctx context.Context, req *ScanReportRequest) error
func (*AssetMon) Update ¶
func (a *AssetMon) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for AssetMon, which implements the client side of the image scanning workflow. Note that the Context passed to client methods should allow for local execution of the scan of potentially multiple images, not just the network RPC, so we use a shorter timeout for the RPC part.
func (*Client) FullUpdate ¶
func (c *Client) FullUpdate(ctx context.Context, ctnrs []ContainerSummary) error
func (*Client) GetImageSBOM ¶
func (*Client) UpdateContainer ¶
type ContainerInfo ¶
type ContainerInfo struct { ContainerSummary Host string `json:"host"` Since time.Time `json:"running_since"` }
type ContainerSummary ¶
type ContainerSummary struct { Name string `json:"name"` ImageName string `json:"image_name"` ImageDigest string `json:"image_digest"` }
func RunningContainers ¶
func RunningContainers(ctx context.Context) ([]ContainerSummary, error)
RunningContainers returns the list of currently running (according to Podman) containers, along with their associated image IDs.
type FindArtifactsRequest ¶
type FindArtifactsRequest struct {
Match []Match `json:"match"`
}
type FindArtifactsResponse ¶
type FindArtifactsResponse struct {
Results []*ArtifactResult `json:"results"`
}
type FullUpdateRequest ¶
type FullUpdateRequest struct { Host string `json:"host"` Containers []ContainerSummary `json:"containers"` }
type GetContainerDeploymentResponse ¶
type GetContainerDeploymentResponse struct {
Containers []*ContainerInfo `json:"containers"`
}
type GetImageSBOMRequest ¶
type GetImageSBOMRequest struct {
Digest string `json:"digest"`
}
type GetImageSBOMResponse ¶
type GetImageSBOMResponse struct {
Image
}
type ScanReportRequest ¶
type ScanReportRequest struct {
Image *Image `json:"image"`
}
type UpdateRequest ¶
type UpdateRequest struct { Host string `json:"host"` Container ContainerSummary `json:"container"` }
type UpdateResponse ¶
type UpdateResponse struct {
ScanImages []string `json:"scan_images"`
}
Click to show internal directories.
Click to hide internal directories.