Community
·
Blog
moov-io/go-sftp
Moov's mission is to give developers an easy way to create and integrate bank processing into their own software products. Our open source projects are each focused on solving a single responsibility in financial services and designed around performance, scalability, and ease of use.
GoSFTP provides a simple SFTP client interface for uploading, listing, and opening files on an SFTP server.
type Client interface {
Ping() error
Close() error
Open(path string) (*File, error)
Reader(path string) (*File, error)
Delete(path string) error
UploadFile(path string, contents io.ReadCloser) error
ListFiles(dir string) ([]string, error)
Walk(dir string, fn fs.WalkDirFunc) error
}
The library also includes a mock client implementation which uses a local filesystem temporary directory for testing.
Project status
Moov GoSFTP is actively used in production environments. Please star the project if you are interested in its progress. Please let us know if you encounter any bugs/unclear documentation or have feature suggestions by opening up an issue or pull request. Thanks!
Getting help
channel | info |
---|
Twitter @moov | You can follow Moov.io's Twitter feed to get updates on our project(s). You can also tweet us questions or just share blogs or stories. |
GitHub Issue | If you are able to reproduce a problem please open a GitHub Issue under the specific project that caused the error. |
moov-io slack | Join our slack channel (#infra ) to have an interactive discussion about the development of the project. |
Supported and tested platforms
- 64-bit Linux (Ubuntu, Debian), macOS, and Windows
Contributing
Yes please! Please review our Contributing guide and Code of Conduct to get started!
This project uses Go Modules and Go v1.18 or newer. See Golang's install instructions for help setting up Go. You can download the source code and we offer tagged and released versions as well. We highly recommend you use a tagged release for production.
Releasing
To make a release of go-sftp simply open a pull request with CHANGELOG.md
and version.go
updated with the next version number and details. You'll also need to push the tag (i.e. git push origin v1.0.0
) to origin in order for CI to make the release.
Testing
We maintain a comprehensive suite of unit tests and recommend table-driven testing when a particular function warrants several very similar test cases. After starting the services with Docker Compose run all tests with go test ./...
. Current overall coverage can be found on Codecov.
License
Apache License 2.0 - See LICENSE for details.