project

package
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 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) (*prpb.Project, error)

CreateProject creates the specified project in the storage.

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) (*prpb.Project, error)

GetProject gets a project from the datastore.

func (*API) ListProjects

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

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

type Storage

type Storage interface {
	// CreateProject creates the specified project in the storage.
	CreateProject(ctx context.Context, pID string, p *prpb.Project) (*prpb.Project, error)
	// GetProject gets the specified project from the storage.
	GetProject(ctx context.Context, pID string) (*prpb.Project, error)
	// ListProjects returns projects in the storage.
	ListProjects(ctx context.Context, filter string, pageSize int, pageToken string) ([]*prpb.Project, string, error)
	// DeleteProject deletes the specified project from the storage.
	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