Skip to content
Snippets Groups Projects

Create SET cache endpoint

Merged Yordan Kinkov requested to merge 3-implement-cache-set-endpoint into main
All threads resolved!
4 files
+ 62
1
Compare changes
  • Side-by-side
  • Inline
Files
4
  • 3a839d06
    #3 add cache set endpoint · 3a839d06
    Yordan Kinkov authored
+ 24
0
@@ -62,6 +62,30 @@ var _ = Service("cache", func() {
Response(StatusOK)
})
})
Method("Set", func() {
Description("Set value in the cache. The HTTP request body is stored as value and the key is assembled from HTTP request headers.")
Payload(CacheSetRequest)
Result(Empty)
HTTP(func() {
POST("/v1/cache")
Header("key:x-cache-key", String, "Cache entry key", func() {
Example("did:web:example.com")
})
Header("namespace:x-cache-namespace", String, "Cache entry namespace", func() {
Example("Login")
})
Header("scope:x-cache-scope", String, "Cache entry scope", func() {
Example("administration")
})
Body("data")
Response(StatusCreated)
})
})
})
var _ = Service("openapi", func() {
Loading