Documentation
¶
Index ¶
- Constants
- func CheckPrivateImage(imageRef name.Reference) (bool, error)
- func DownloadReport(fs blobfs.Interface, img string) ([]byte, error)
- func DownloadVersionInfo(fs blobfs.Interface, img string) ([]byte, error)
- func ErrorToAPIStatus(err error) *metav1.Status
- func ExistsReport(fs blobfs.Interface, img string) (bool, error)
- func GRPCCode(err error) gcerrors.ErrorCode
- func HTTPStatusFromCode(code gcerrors.ErrorCode) int32
- func NewBlobFS() blobfs.Interface
- func NewConnection(addr, credFile string) (nc *nats.Conn, err error)
- func ParseReference(img string) (repo string, digest string, err error)
- func SubmitScanRequest(nc *nats.Conn, subj string, img string) error
- func UploadReport(fs blobfs.Interface, img string) error
- type Manager
- type Options
Constants ¶
View Source
const ( RespondTypeReport = "report" RespondTypeVersion = "version" )
View Source
const (
NatsRequestTimeout = 10 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func DownloadVersionInfo ¶
func ErrorToAPIStatus ¶
ErrorToAPIStatus converts an error to an metav1.Status object.
func GRPCCode ¶
GRPCCode extracts the gRPC status code and converts it into an ErrorCode. It returns Unknown if the error isn't from gRPC.
func HTTPStatusFromCode ¶
HTTPStatusFromCode converts a gRPC error code into the corresponding HTTP response status. See: https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto See: https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.11.3/runtime/errors.go#L34-L77
func NewConnection ¶
NewConnection creates a new NATS connection
Types ¶
Click to show internal directories.
Click to hide internal directories.