Documentation ¶
Index ¶
- type API
- func (gp *API) CreateProject(ctx context.Context, req *prpb.CreateProjectRequest) (*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) (*prpb.Project, error)
- func (gp *API) ListProjects(ctx context.Context, req *prpb.ListProjectsRequest) (*prpb.ListProjectsResponse, 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 (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 ¶
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.
Click to show internal directories.
Click to hide internal directories.