Documentation ¶
Index ¶
- type API
- func (gp *API) CreateProject(ctx context.Context, req *prpb.CreateProjectRequest, resp *prpb.Project) error
- func (gp *API) DeleteProject(ctx context.Context, req *prpb.DeleteProjectRequest, _ *empty.Empty) error
- func (gp *API) GetProject(ctx context.Context, req *prpb.GetProjectRequest, resp *prpb.Project) error
- func (gp *API) ListProjects(ctx context.Context, req *prpb.ListProjectsRequest, ...) error
- type Storage
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 (*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.
Click to show internal directories.
Click to hide internal directories.