-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from anikitenko/staging
Release 1.0.0
- Loading branch information
Showing
37 changed files
with
1,118 additions
and
206 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
name: Custom issue template | ||
about: Describe this issue template's purpose here. | ||
|
||
--- | ||
|
||
|
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,17 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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 |
---|---|---|
|
@@ -8,4 +8,6 @@ run/vendor/*/ | |
node_modules/ | ||
log/ | ||
cypress/videos/ | ||
cypress/screenshots/ | ||
cypress/screenshots/ | ||
docs/ | ||
run/run.exe |
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,16 @@ | ||
## Mini sFTP client API | ||
|
||
### API was created using Swagger | ||
|
||
In order to see detailed reference you should navigate | ||
to http://127.0.0.1:9000/api/v1 | ||
|
||
API has the following endpoints: | ||
* PUT /connect | ||
* DELETE /disconnect/{id} | ||
* GET /download/{id} | ||
* GET /getConnections | ||
* GET /getLocalHomeDirectory | ||
* GET /getLocalPathCompletion | ||
* GET /getRemoteHomeDirectory/{id} | ||
* GET /getRemotePathCompletion/{id} |
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,17 @@ | ||
## How to contribute to sFTP client | ||
|
||
#### **Did you find a bug?** | ||
|
||
Okay then, open a new issue and select template "Bug" | ||
|
||
#### **Did you find a security issue?** | ||
|
||
Please open a new issue with information about how to reproduce it | ||
|
||
#### **Did you write a patch that fixes a bug?** | ||
|
||
* Open a new GitHub pull request with the patch. | ||
* Please fill in template about new pull request | ||
|
||
#### **Other information** | ||
* Branches master & staging are protected against writes without pull requests |
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,23 @@ | ||
package controllers | ||
|
||
import ( | ||
"github.com/revel/revel" | ||
) | ||
|
||
type ApiV1 struct { | ||
*revel.Controller | ||
} | ||
|
||
// @title Mini sFTP client API | ||
// @version 1.0.0 | ||
// @description This API was created to automate your work with sFTP client | ||
|
||
// @license.name MIT | ||
// @license.url https://github.com/anikitenko/mini-sftp-client/blob/staging/LICENSE | ||
|
||
// @host 127.0.0.1:9000 | ||
// @BasePath /api/v1 | ||
|
||
func (c ApiV1) Help() revel.Result { | ||
return c.Redirect("/api/v1/index.html") | ||
} |
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,24 @@ | ||
package controllers | ||
|
||
import "github.com/revel/revel" | ||
|
||
// @Summary Disconnect | ||
// @Description remove stored connection | ||
// @ID disconnect | ||
// @Accept json | ||
// @Produce json | ||
// @Param id path string true "Connection ID" | ||
// @Success 200 {object} controllers.GeneralResponse "Success" | ||
// @Failure 403 {string} string "Not authorized!" | ||
// @Router /disconnect/{id} [delete] | ||
func (c ApiV1) Disconnect(id string) revel.Result { | ||
if _, ok := ApiConnections[id]; !ok { | ||
response := CompileJSONResult(false, "Connection does not exist!") | ||
return c.RenderJSON(response) | ||
} | ||
|
||
delete(ApiConnections, id) | ||
|
||
response := CompileJSONResult(true, "") | ||
return c.RenderJSON(response) | ||
} |
Oops, something went wrong.