This repository has been archived by the owner on Feb 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to v4 apufferi, begin documentation work
- Loading branch information
Showing
48 changed files
with
588 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT | ||
// This file was generated by swaggo/swag at | ||
// 2019-10-22 13:48:36.6271935 -0500 CDT m=+3.760001801 | ||
|
||
package docs | ||
|
||
import ( | ||
"bytes" | ||
"encoding/json" | ||
"strings" | ||
|
||
"github.com/alecthomas/template" | ||
"github.com/swaggo/swag" | ||
) | ||
|
||
var doc = `{ | ||
"schemes": {{ marshal .Schemes }}, | ||
"swagger": "2.0", | ||
"info": { | ||
"description": "{{.Description}}", | ||
"title": "{{.Title}}", | ||
"contact": { | ||
"name": "PufferPanel", | ||
"url": "https://pufferpanel.com" | ||
}, | ||
"license": { | ||
"name": "Apache 2.0", | ||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html" | ||
}, | ||
"version": "{{.Version}}" | ||
}, | ||
"host": "{{.Host}}", | ||
"basePath": "{{.BasePath}}", | ||
"paths": { | ||
"/server/{id}": { | ||
"post": { | ||
"description": "Starts the given server", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"summary": "Starts server", | ||
"parameters": [ | ||
{ | ||
"type": "string", | ||
"description": "Server Identifier", | ||
"name": "id", | ||
"in": "path", | ||
"required": true | ||
} | ||
], | ||
"responses": { | ||
"200": {}, | ||
"400": { | ||
"description": "Bad Request", | ||
"schema": { | ||
"$ref": "#/definitions/response.Error" | ||
} | ||
}, | ||
"403": { | ||
"description": "Forbidden", | ||
"schema": { | ||
"$ref": "#/definitions/response.Error" | ||
} | ||
}, | ||
"404": { | ||
"description": "Not Found", | ||
"schema": { | ||
"$ref": "#/definitions/response.Error" | ||
} | ||
}, | ||
"500": { | ||
"description": "Internal Server Error", | ||
"schema": { | ||
"$ref": "#/definitions/response.Error" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"response.Error": { | ||
"type": "object", | ||
"properties": { | ||
"error": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}` | ||
|
||
type swaggerInfo struct { | ||
Version string | ||
Host string | ||
BasePath string | ||
Schemes []string | ||
Title string | ||
Description string | ||
} | ||
|
||
// SwaggerInfo holds exported Swagger Info so clients can modify it | ||
var SwaggerInfo = swaggerInfo{ | ||
Version: "2.0", | ||
Host: "", | ||
BasePath: "", | ||
Schemes: []string{}, | ||
Title: "Pufferd API", | ||
Description: "PufferPanel daemon service", | ||
} | ||
|
||
type s struct{} | ||
|
||
func (s *s) ReadDoc() string { | ||
sInfo := SwaggerInfo | ||
sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1) | ||
|
||
t, err := template.New("swagger_info").Funcs(template.FuncMap{ | ||
"marshal": func(v interface{}) string { | ||
a, _ := json.Marshal(v) | ||
return string(a) | ||
}, | ||
}).Parse(doc) | ||
if err != nil { | ||
return doc | ||
} | ||
|
||
var tpl bytes.Buffer | ||
if err := t.Execute(&tpl, sInfo); err != nil { | ||
return doc | ||
} | ||
|
||
return tpl.String() | ||
} | ||
|
||
func init() { | ||
swag.Register(swag.Name, &s{}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"description": "PufferPanel daemon service", | ||
"title": "Pufferd API", | ||
"contact": { | ||
"name": "PufferPanel", | ||
"url": "https://pufferpanel.com" | ||
}, | ||
"license": { | ||
"name": "Apache 2.0", | ||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html" | ||
}, | ||
"version": "2.0" | ||
}, | ||
"paths": { | ||
"/server/{id}": { | ||
"post": { | ||
"description": "Starts the given server", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"summary": "Starts server", | ||
"parameters": [ | ||
{ | ||
"type": "string", | ||
"description": "Server Identifier", | ||
"name": "id", | ||
"in": "path", | ||
"required": true | ||
} | ||
], | ||
"responses": { | ||
"200": {}, | ||
"400": { | ||
"description": "Bad Request", | ||
"schema": { | ||
"$ref": "#/definitions/response.Error" | ||
} | ||
}, | ||
"403": { | ||
"description": "Forbidden", | ||
"schema": { | ||
"$ref": "#/definitions/response.Error" | ||
} | ||
}, | ||
"404": { | ||
"description": "Not Found", | ||
"schema": { | ||
"$ref": "#/definitions/response.Error" | ||
} | ||
}, | ||
"500": { | ||
"description": "Internal Server Error", | ||
"schema": { | ||
"$ref": "#/definitions/response.Error" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"response.Error": { | ||
"type": "object", | ||
"properties": { | ||
"error": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
definitions: | ||
response.Error: | ||
properties: | ||
error: | ||
type: string | ||
type: object | ||
info: | ||
contact: | ||
name: PufferPanel | ||
url: https://pufferpanel.com | ||
description: PufferPanel daemon service | ||
license: | ||
name: Apache 2.0 | ||
url: http://www.apache.org/licenses/LICENSE-2.0.html | ||
title: Pufferd API | ||
version: "2.0" | ||
paths: | ||
/server/{id}: | ||
post: | ||
consumes: | ||
- application/json | ||
description: Starts the given server | ||
parameters: | ||
- description: Server Identifier | ||
in: path | ||
name: id | ||
required: true | ||
type: string | ||
produces: | ||
- application/json | ||
responses: | ||
"200": {} | ||
"400": | ||
description: Bad Request | ||
schema: | ||
$ref: '#/definitions/response.Error' | ||
"403": | ||
description: Forbidden | ||
schema: | ||
$ref: '#/definitions/response.Error' | ||
"404": | ||
description: Not Found | ||
schema: | ||
$ref: '#/definitions/response.Error' | ||
"500": | ||
description: Internal Server Error | ||
schema: | ||
$ref: '#/definitions/response.Error' | ||
summary: Starts server | ||
swagger: "2.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.