Skip to content

Commit

Permalink
Updates catalog refresh API to refresh by its name
Browse files Browse the repository at this point in the history
Signed-off-by: Shivam Mukhade <smukhade@redhat.com>
  • Loading branch information
SM43 committed Mar 11, 2021
1 parent df6388c commit 4e401a6
Show file tree
Hide file tree
Showing 22 changed files with 666 additions and 348 deletions.
9 changes: 6 additions & 3 deletions api/design/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,21 @@ var _ = Service("catalog", func() {
Error("not-found", ErrorResult, "Resource Not Found Error")

Method("Refresh", func() {
Description("Refreshes Tekton Catalog")
Description("Refresh a Tekton Catalog by its name")
Security(types.JWTAuth, func() {
Scope("catalog:refresh")
})
Payload(func() {
Attribute("catalogName", String, "Name of catalog", func() {
Example("catalogName", "tekton")
})
Token("token", String, "JWT")
Required("token")
Required("token","catalogName")
})
Result(types.Job)

HTTP(func() {
POST("/catalog/refresh")
POST("/catalog/{catalogName}/refresh")
Header("token:Authorization")

Response(StatusOK)
Expand Down
3 changes: 2 additions & 1 deletion api/design/types/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ var HubService = Type("HubService", func() {
var Job = ResultType("application/vnd.hub.job", "Job", func() {
Description("The Job type describes a catalog refresh job that is run asynchronously")
Attribute("id", UInt, "id of the job")
Attribute("catalogName", String, "Name of the catalog")
Attribute("status", String, "status of the job")
Required("id", "status")
Required("id", "catalogName", "status")
})

var Resources = ResultType("application/vnd.hub.resources", "Resources", func() {
Expand Down
14 changes: 11 additions & 3 deletions api/gen/catalog/service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions api/gen/catalog/views/view.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/gen/http/admin/client/cli.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion api/gen/http/catalog/client/cli.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion api/gen/http/catalog/client/encode_decode.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions api/gen/http/catalog/client/paths.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions api/gen/http/catalog/client/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions api/gen/http/catalog/server/encode_decode.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions api/gen/http/catalog/server/paths.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions api/gen/http/catalog/server/server.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions api/gen/http/catalog/server/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4e401a6

Please sign in to comment.