Documentation ¶
Overview ¶
package v1alpha1 is an implementation of the v1alpha1 version of Grafeas.
Index ¶
- type Grafeas
- func (g *Grafeas) BatchCreateNotes(ctx context.Context, in *pb.BatchCreateNotesRequest) (*pb.BatchCreateNotesResponse, error)
- func (g *Grafeas) BatchCreateOccurrences(ctx context.Context, req *pb.BatchCreateOccurrencesRequest) (*pb.BatchCreateOccurrencesResponse, error)
- func (g *Grafeas) CreateNote(ctx context.Context, req *pb.CreateNoteRequest) (*pb.Note, error)
- func (g *Grafeas) CreateOccurrence(ctx context.Context, req *pb.CreateOccurrenceRequest) (*pb.Occurrence, error)
- func (g *Grafeas) CreateProject(ctx context.Context, req *prpb.CreateProjectRequest) (*prpb.Project, error)
- func (g *Grafeas) DeleteNote(ctx context.Context, req *pb.DeleteNoteRequest) (*empty.Empty, error)
- func (g *Grafeas) DeleteOccurrence(ctx context.Context, req *pb.DeleteOccurrenceRequest) (*empty.Empty, error)
- func (g *Grafeas) DeleteProject(ctx context.Context, req *prpb.DeleteProjectRequest) (*empty.Empty, error)
- func (g *Grafeas) GetNote(ctx context.Context, req *pb.GetNoteRequest) (*pb.Note, error)
- func (g *Grafeas) GetOccurrence(ctx context.Context, req *pb.GetOccurrenceRequest) (*pb.Occurrence, error)
- func (g *Grafeas) GetOccurrenceNote(ctx context.Context, req *pb.GetOccurrenceNoteRequest) (*pb.Note, error)
- func (g *Grafeas) GetProject(ctx context.Context, req *prpb.GetProjectRequest) (*prpb.Project, error)
- func (g *Grafeas) GetVulnerabilityOccurrencesSummary(ctx context.Context, req *pb.GetVulnerabilityOccurrencesSummaryRequest) (*pb.VulnerabilityOccurrencesSummary, error)
- func (g *Grafeas) ListNoteOccurrences(ctx context.Context, req *pb.ListNoteOccurrencesRequest) (*pb.ListNoteOccurrencesResponse, error)
- func (g *Grafeas) ListNotes(ctx context.Context, req *pb.ListNotesRequest) (*pb.ListNotesResponse, error)
- func (g *Grafeas) ListOccurrences(ctx context.Context, req *pb.ListOccurrencesRequest) (*pb.ListOccurrencesResponse, error)
- func (g *Grafeas) ListProjects(ctx context.Context, req *prpb.ListProjectsRequest) (*prpb.ListProjectsResponse, error)
- func (g *Grafeas) UpdateNote(ctx context.Context, req *pb.UpdateNoteRequest) (*pb.Note, error)
- func (g *Grafeas) UpdateOccurrence(ctx context.Context, req *pb.UpdateOccurrenceRequest) (*pb.Occurrence, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Grafeas ¶
type Grafeas struct {
S server.Storager
}
Grafeas is an implementation of the Grafeas API, which should be called by handler methods for verification of logic and storage.
func (*Grafeas) BatchCreateNotes ¶
func (g *Grafeas) BatchCreateNotes(ctx context.Context, in *pb.BatchCreateNotesRequest) (*pb.BatchCreateNotesResponse, error)
BatchCreateNotes validates that all notes are valid and then add them to the backing datastore.
func (*Grafeas) BatchCreateOccurrences ¶
func (g *Grafeas) BatchCreateOccurrences(ctx context.Context, req *pb.BatchCreateOccurrencesRequest) (*pb.BatchCreateOccurrencesResponse, error)
BatchCreateOccurrences validates that all notes are valid and then creates an associated occurrence per note in the backing datastore.
func (*Grafeas) CreateNote ¶
CreateNote validates that a note is valid and then creates a note in the backing datastore.
func (*Grafeas) CreateOccurrence ¶
func (g *Grafeas) CreateOccurrence(ctx context.Context, req *pb.CreateOccurrenceRequest) (*pb.Occurrence, error)
CreateOccurrence validates that a note is valid and then creates an occurrence in the backing datastore.
func (*Grafeas) CreateProject ¶
func (g *Grafeas) CreateProject(ctx context.Context, req *prpb.CreateProjectRequest) (*prpb.Project, error)
CreateProject validates that a project is valid and then creates a project in the backing datastore.
func (*Grafeas) DeleteNote ¶
DeleteNote deletes a note from the datastore.
func (*Grafeas) DeleteOccurrence ¶
func (g *Grafeas) DeleteOccurrence(ctx context.Context, req *pb.DeleteOccurrenceRequest) (*empty.Empty, error)
DeleteOccurrence deletes an occurrence from the datastore.
func (*Grafeas) DeleteProject ¶
func (g *Grafeas) DeleteProject(ctx context.Context, req *prpb.DeleteProjectRequest) (*empty.Empty, error)
DeleteProject deletes a project from the datastore.
func (*Grafeas) GetOccurrence ¶
func (g *Grafeas) GetOccurrence(ctx context.Context, req *pb.GetOccurrenceRequest) (*pb.Occurrence, error)
GetOccurrence gets a occurrence from the datastore.
func (*Grafeas) GetOccurrenceNote ¶
func (g *Grafeas) GetOccurrenceNote(ctx context.Context, req *pb.GetOccurrenceNoteRequest) (*pb.Note, error)
GetOccurrenceNote gets a the note for the provided occurrence from the datastore.
func (*Grafeas) GetProject ¶
func (g *Grafeas) GetProject(ctx context.Context, req *prpb.GetProjectRequest) (*prpb.Project, error)
GetProject gets a project from the datastore.
func (*Grafeas) GetVulnerabilityOccurrencesSummary ¶
func (g *Grafeas) GetVulnerabilityOccurrencesSummary(ctx context.Context, req *pb.GetVulnerabilityOccurrencesSummaryRequest) (*pb.VulnerabilityOccurrencesSummary, error)
func (*Grafeas) ListNoteOccurrences ¶
func (g *Grafeas) ListNoteOccurrences(ctx context.Context, req *pb.ListNoteOccurrencesRequest) (*pb.ListNoteOccurrencesResponse, error)
func (*Grafeas) ListNotes ¶
func (g *Grafeas) ListNotes(ctx context.Context, req *pb.ListNotesRequest) (*pb.ListNotesResponse, error)
func (*Grafeas) ListOccurrences ¶
func (g *Grafeas) ListOccurrences(ctx context.Context, req *pb.ListOccurrencesRequest) (*pb.ListOccurrencesResponse, error)
func (*Grafeas) ListProjects ¶
func (g *Grafeas) ListProjects(ctx context.Context, req *prpb.ListProjectsRequest) (*prpb.ListProjectsResponse, error)
ListProjects returns the project id for all projects in the backing datastore.
func (*Grafeas) UpdateNote ¶
func (*Grafeas) UpdateOccurrence ¶
func (g *Grafeas) UpdateOccurrence(ctx context.Context, req *pb.UpdateOccurrenceRequest) (*pb.Occurrence, error)