v1beta1/

directory
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: Apache-2.0

README

Grafeas API Reference Implementation

This is an implementation of the Grafeas v1beta1 API spec.

Running the server

To run the server, do the following from the root directory:

cd go/v1beta1
go run main/main.go

This will start the Grafeas gRPC and REST APIs on localhost:8080.

To start grafeas with a custom configuration use the --config flag (e.g. --config config.yaml). See config.yaml that can be used as a starting point when creating your own config file.

Access REST API with curl

Grafeas provides both a REST API and a gRPC API. Here is an example of using the REST API to list projects in Grafeas.

curl http://localhost:8080/v1beta1/projects

Access gRPC API with a go client

client.go contains a small example of a go client that connects to Grafeas and outputs the notes in myproject.

go run example/client/client.go

Directories

Path Synopsis
api
Package grafeas is an implementation of the v1beta1 https://github.com/grafeas/grafeas/ API.
Package grafeas is an implementation of the v1beta1 https://github.com/grafeas/grafeas/ API.
validators/attestation
Package attestation implements functions to validate that the fields of attestation entities being passed into the API meet our requirements.
Package attestation implements functions to validate that the fields of attestation entities being passed into the API meet our requirements.
validators/build
Package build implements functions to validate that the fields of build entities being passed into the API meet our requirements.
Package build implements functions to validate that the fields of build entities being passed into the API meet our requirements.
validators/deployment
Package deployment implements functions to validate that the fields of deployment entities being passed into the API meet our requirements.
Package deployment implements functions to validate that the fields of deployment entities being passed into the API meet our requirements.
validators/discovery
Package discovery implements functions to validate that the fields of discovery entities being passed into the API meet our requirements.
Package discovery implements functions to validate that the fields of discovery entities being passed into the API meet our requirements.
validators/grafeas
Package grafeas implements functions to validate that the fields of Grafeas entities being passed into the API meet our requirements.
Package grafeas implements functions to validate that the fields of Grafeas entities being passed into the API meet our requirements.
validators/image
Package image implements functions to validate that the fields of image entities being passed into the API meet our requirements.
Package image implements functions to validate that the fields of image entities being passed into the API meet our requirements.
validators/package
Package pkg implements functions to validate that the fields of package entities being passed into the API meet our requirements.
Package pkg implements functions to validate that the fields of package entities being passed into the API meet our requirements.
validators/provenance
Package provenance implements functions to validate that the fields of provenance entities being passed into the API meet our requirements.
Package provenance implements functions to validate that the fields of provenance entities being passed into the API meet our requirements.
validators/vulnerability
Package vulnerability implements functions to validate that the fields of vulnerability entities being passed into the API meet our requirements.
Package vulnerability implements functions to validate that the fields of vulnerability entities being passed into the API meet our requirements.
example

Jump to

Keyboard shortcuts

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