func deleteProject(uuid string) { project := model.ProjectByUUID(uuid) if project == nil { fmt.Println("No project found") return } project.Delete() fmt.Printf("Delete a project %s\n", project.UUID) }
func inspectProject(uuid string) { project := model.ProjectByUUID(uuid) if project == nil { fmt.Println("No project found") return } fmt.Printf("Project UUID - %s\n", project.UUID) fmt.Printf("Project Master Key - %s\n", project.MasterKey().Value) fmt.Printf("Project Read Key - %s\n", project.ReadKey().Value) fmt.Printf("Project Write Key - %s\n", project.WriteKey().Value) }
func currentProject(req *rest.Request) *model.Project { uuid := req.PathParam("project_id") return model.ProjectByUUID(uuid) }