v1alpha1

package
v0.0.0-...-6af04dd Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

package v1alpha1 is an implementation of the v1alpha1 version of Grafeas.

Index

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

BatchCreateNotes validates that all notes are valid and then add them to the backing datastore.

func (*Grafeas) BatchCreateOccurrences

BatchCreateOccurrences validates that all notes are valid and then creates an associated occurrence per note in the backing datastore.

func (*Grafeas) CreateNote

func (g *Grafeas) CreateNote(ctx context.Context, req *pb.CreateNoteRequest) (*pb.Note, error)

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

func (g *Grafeas) DeleteNote(ctx context.Context, req *pb.DeleteNoteRequest) (*empty.Empty, error)

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) GetNote

func (g *Grafeas) GetNote(ctx context.Context, req *pb.GetNoteRequest) (*pb.Note, error)

GetNote gets a note 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) ListNoteOccurrences

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

ListProjects returns the project id for all projects in the backing datastore.

func (*Grafeas) UpdateNote

func (g *Grafeas) UpdateNote(ctx context.Context, req *pb.UpdateNoteRequest) (*pb.Note, error)

func (*Grafeas) UpdateOccurrence

func (g *Grafeas) UpdateOccurrence(ctx context.Context, req *pb.UpdateOccurrenceRequest) (*pb.Occurrence, error)

Jump to

Keyboard shortcuts

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