https://github.com/zikwall/fsclient
Golang fileserver client | https://github.com/zikwall/go-fileserver
https://github.com/zikwall/fsclient
go golang
Last synced: 12 months ago
JSON representation
Golang fileserver client | https://github.com/zikwall/go-fileserver
- Host: GitHub
- URL: https://github.com/zikwall/fsclient
- Owner: zikwall
- Created: 2021-06-04T12:14:03.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-06T11:01:23.000Z (about 5 years ago)
- Last Synced: 2025-07-01T11:08:21.243Z (12 months ago)
- Topics: go, golang
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Client for Go file server
#### Install
`$ go get -u github.com/zikwall/fsclient@v0.0.3`
#### Install server
- Visit: https://github.com/zikwall/go-fileserver
### Usage
#### Create client
```go
client, err := fsclient.WithCopyFsClient(fsclient.FsClient{
// fileserver host
Uri: "http://localhost:1337/",
SecureType: fsclient.TypeToken,
// for token auth or JWT
TokenType: requesters.TokenTypeQuery,
Token: "changemeplease123",
// for base auth
User: "qwx1337",
Password: "123456",
})
```
#### Call API for send files
```go
if err := client.SendFile(context.Background(), file, fileAnother); err != nil {
log.Fatal(err)
}
```