project

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Storage Storage
}

func (*API) CreateProject

func (gp *API) CreateProject(ctx context.Context, req *prpb.CreateProjectRequest, resp *prpb.Project) error

func (*API) DeleteProject

func (gp *API) DeleteProject(ctx context.Context, req *prpb.DeleteProjectRequest, _ *empty.Empty) error

DeleteProject deletes a project from the datastore.

func (*API) GetProject

func (gp *API) GetProject(ctx context.Context, req *prpb.GetProjectRequest, resp *prpb.Project) error

GetProject gets a project from the datastore.

func (*API) ListProjects

func (gp *API) ListProjects(ctx context.Context, req *prpb.ListProjectsRequest, resp *prpb.ListProjectsResponse) error

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

type Storage

type Storage interface {
	// CreateProject creates a project with the specified project ID
	CreateProject(ctx context.Context, pID string, p *prpb.Project) (*prpb.Project, error)
	// GetProject gets a project from the datastore
	GetProject(ctx context.Context, pID string) (*prpb.Project, error)
	// ListProjects returns the project IDs for all projects in the datastore
	ListProjects(ctx context.Context, filter string, pageSize int, pageToken string) ([]*prpb.Project, string, error)
	// DeleteProject deletes the specified project
	DeleteProject(ctx context.Context, pID string) error
}

Storage provides storage functions for this API.

Jump to

Keyboard shortcuts

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