mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Update gpg, graph api docs
This commit is contained in:
+12
-11
@@ -12,22 +12,23 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
// @Summary TODO
|
type gpgAddKeyParams struct {
|
||||||
// @Description **ToDo**
|
Keyserver string
|
||||||
// @Description To Do
|
GpgKeyID string
|
||||||
|
GpgKeyArmor string
|
||||||
|
Keyring string
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Summary Add GPG Key
|
||||||
|
// @Description Adds a GPG key to aptly keyring
|
||||||
// @Tags GPG
|
// @Tags GPG
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {object} string "msg"
|
// @Success 200 {object} string "OK"
|
||||||
|
// @Failure 400 {object} Error "Bad Request"
|
||||||
// @Failure 404 {object} Error "Not Found"
|
// @Failure 404 {object} Error "Not Found"
|
||||||
// @Router /api/gpg [post]
|
// @Router /api/gpg [post]
|
||||||
func apiGPGAddKey(c *gin.Context) {
|
func apiGPGAddKey(c *gin.Context) {
|
||||||
var b struct {
|
b := gpgAddKeyParams{}
|
||||||
Keyserver string
|
|
||||||
GpgKeyID string
|
|
||||||
GpgKeyArmor string
|
|
||||||
Keyring string
|
|
||||||
}
|
|
||||||
|
|
||||||
if c.Bind(&b) != nil {
|
if c.Bind(&b) != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-4
@@ -12,13 +12,16 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
// @Summary TODO
|
// @Summary Graph Output
|
||||||
// @Description **ToDo**
|
// @Description **Generate graph of aptly objects (same as in aptly graph command).**
|
||||||
// @Description To Do
|
// @Description e.g open url `http://localhost:8080/api/graph.svg?layout=vertical` in browser
|
||||||
// @Tags Graph
|
// @Tags Graph
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {object} string "msg"
|
// @Param ext path string true "ext specifies desired file extension, e.g. .png, .svg."
|
||||||
|
// @Param layout query string false "Change between a `horizontal` (default) and a `vertical` graph layout."
|
||||||
|
// @Success 200 {object} []byte "Output"
|
||||||
// @Failure 404 {object} Error "Not Found"
|
// @Failure 404 {object} Error "Not Found"
|
||||||
|
// @Failure 500 {object} Error "Internal Server Error"
|
||||||
// @Router /api/graph [get]
|
// @Router /api/graph [get]
|
||||||
// GET /api/graph.:ext?layout=[vertical|horizontal(default)]
|
// GET /api/graph.:ext?layout=[vertical|horizontal(default)]
|
||||||
func apiGraph(c *gin.Context) {
|
func apiGraph(c *gin.Context) {
|
||||||
|
|||||||
Reference in New Issue
Block a user