Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
neolynx committed Nov 28, 2024
1 parent f9e5e8a commit c759c62
Show file tree
Hide file tree
Showing 18 changed files with 46 additions and 76 deletions.
8 changes: 5 additions & 3 deletions api/gpg.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ type gpgAddKeyParams struct {
Keyring string
}

// @Summary Add GPG Key
// @Description Adds a GPG key to aptly keyring
// @Tags GPG
// @Summary Add GPG Keys
// @Description **Adds GPG keys to aptly keyring**
// @Description
// @Description Add GPG public keys for veryfing remote repositories for mirroring.
// @Tags Mirrors
// @Produce json
// @Success 200 {object} string "OK"
// @Failure 400 {object} Error "Bad Request"
Expand Down
19 changes: 14 additions & 5 deletions api/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,26 @@ import (
)

// @Summary Graph Output
// @Description **Generate graph of aptly objects (same as in aptly graph command).**
// @Description e.g open url `http://localhost:8080/api/graph.svg?layout=vertical` in browser
// @Tags Graph
// @Description **Generate dependency graph**
// @Description
// @Description Command graph generates graph of dependencies:
// @Description
// @Description * between snapshots and mirrors (what mirror was used to create each snapshot)
// @Description * between snapshots and local repos (what local repo was used to create snapshot)
// @Description * between snapshots (pulling, merging, etc.)
// @Description * between snapshots, local repos and published repositories (how snapshots were published).
// @Description
// @Description Graph is rendered to PNG file using graphviz package.
// @Description
// @Description Example URL: `http://localhost:8080/api/graph.svg?layout=vertical`
// @Tags Status
// @Produce json
// @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 500 {object} Error "Internal Server Error"
// @Router /api/graph [get]
// GET /api/graph.:ext?layout=[vertical|horizontal(default)]
// @Router /api/graph.{ext} [get]
func apiGraph(c *gin.Context) {
var (
err error
Expand Down
6 changes: 3 additions & 3 deletions api/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func getVerifier(keyRings []string) (pgp.Verifier, error) {
return verifier, nil
}

// @Summary Get mirrors
// @Summary Get Mirrors
// @Description **Show list of currently available mirrors**
// @Description Each mirror is returned as in “show” API.
// @Tags Mirrors
Expand Down Expand Up @@ -82,8 +82,8 @@ type mirrorCreateParams struct {
IgnoreSignatures bool ` json:"IgnoreSignatures"`
}

// @Summary Create mirror
// @Description **Create a mirror**
// @Summary Create Mirror
// @Description **Create a mirror of a remote repositoru**
// @Tags Mirrors
// @Consume json
// @Param request body mirrorCreateParams true "Parameters"
Expand Down
6 changes: 4 additions & 2 deletions api/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import (

// @Summary S3 buckets
// @Description **Get list of S3 buckets**
// @Tags S3
// @Produce json
// @Description
// @Description List configured S3 buckets.
// @Tags Status
// @Produce json
// @Success 200 {array} string "List of S3 buckets"
// @Router /api/s3 [get]
func apiS3List(c *gin.Context) {
Expand Down
2 changes: 2 additions & 0 deletions api/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ type diskFree struct {

// @Summary Get Storage Utilization
// @Description **Get disk free information of aptly storage**
// @Description
// @Description Units in MiB.
// @Tags Status
// @Produce json
// @Success 200 {object} diskFree "Storage information"
Expand Down
2 changes: 1 addition & 1 deletion docs/Database.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Aptly Database Operations
# Maintenance Operations
<div>
Manage aptly’s internal metadata database and package pool.
</div>
2 changes: 1 addition & 1 deletion docs/Files.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File Operations
# Upload Package Files
<div>
Upload package files temporarily to aptly service. These files
could be added to local repositories using [local repositories API](/doc/api/repos).
Expand Down
4 changes: 0 additions & 4 deletions docs/GPG.md

This file was deleted.

30 changes: 0 additions & 30 deletions docs/Graph.md

This file was deleted.

7 changes: 4 additions & 3 deletions docs/Mirrors.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Repository Mirrors
# Remote Repository Mirrors
<div>
aptly allows to create mirrors of remote Debian repositories, HTTP, HTTPS and FTP repositories are supported.
Manage mirrors of remote Debian repositories.

HTTP, HTTPS and FTP repositories are supported.

Mirrors are created with [`aptly mirror create`](/doc/aptly/mirror/create/) command, mirror contents are downloaded with [`aptly mirror update`](/doc/aptly/mirror/update/) command. Mirror could be updated at any moment. In order to preserve current mirror state, [create snapshot](/doc/aptly/snapshot/create/) of the mirror. Snapshot could be published or used to build other snapshots.
</div>

2 changes: 1 addition & 1 deletion docs/Packages.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Packages
# Search Packages
<div>
Perform operations on the whole collection of packages in apty database.
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/Publish.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Aptly Publish Points
# Publish repositories and mirrors
<div>

Publish snapshot or local repo as Debian repository which could be served by HTTP/FTP/rsync server. Repository is signed by user's key with GnuPG. Key should be created beforehand (see section GPG Keys below). Published repository could be consumed directly by apt.
Expand Down
2 changes: 1 addition & 1 deletion docs/Repos.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Repositories
# Manage Local Repositories
<div>
Local repository is a collection of packages (most usually custom packages created internally).
Packages could be added to local repository at any moment, removed, moved or copied between repos.
Expand Down
5 changes: 0 additions & 5 deletions docs/S3.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/Snapshots.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Repository and Mirror Snapshots
# Manage repository and mirror Snapshots
<div>
Snapshot is a fixed state of remote repository mirror or local repository. Internally snapshot is list of references to packages. Snapshot is immutable, i.e. it can’t be changed since it has been created. Snapshots could be merged, filtered, individual packages could be pulled, snapshot could be verified for missing dependencies. Finally, snapshots could be published as repositories.
</div>
7 changes: 1 addition & 6 deletions docs/Status.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Aptly Status Information
<div>

## Something

Very interesting ... asd wer


Various status information.

</div>
6 changes: 5 additions & 1 deletion docs/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
font-size: 16pt !important;
}

/* Group Spacing */
.swagger-ui .opblock-tag-section {
padding-top: 40px !important;
}

/* Tag Group */
.swagger-ui .opblock-tag-section > .opblock-tag > a {
color: grey !important;
Expand All @@ -51,7 +56,6 @@
.swagger-ui .opblock-tag-section .opblock-tag .markdown > h1 {
font-size: 14pt;
margin-top: 0px;
margin-left: 1em;
}

/* Group Description */
Expand Down
10 changes: 2 additions & 8 deletions docs/swagger.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,18 @@ package docs
// @Tag.description.markdown
// @Tag.name Files
// @Tag.description.markdown
// @Tag.name Packages
// @Tag.description.markdown
// @Tag.name Mirrors
// @Tag.description.markdown
// @Tag.name Snapshots
// @Tag.description.markdown
// @Tag.name Publish
// @Tag.description.markdown
// @Tag.name Graph
// @Tag.description.markdown
// @Tag.name S3
// @Tag.name Packages
// @Tag.description.markdown
// @Tag.name GPG
// @Tag.name Status
// @Tag.description.markdown
// @Tag.name Database
// @Tag.description.markdown
// @Tag.name Status
// @Tag.description.markdown
// @Tag.name Tasks
// @Tag.description.markdown

Expand Down

0 comments on commit c759c62

Please sign in to comment.