Torjus Håkestad
adc4f5ef5d
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
|
||
---|---|---|
actions | ||
certs | ||
config | ||
ezshare | ||
pb | ||
protos | ||
scripts | ||
server | ||
store | ||
.gitignore | ||
.goreleaser.yaml | ||
.woodpecker.yml | ||
Dockerfile | ||
ezshare.example.toml | ||
ezshare.minimal.env | ||
go.mod | ||
go.sum | ||
main.go | ||
README.md |
ezshare
Server
Running a server using docker:
# First, build the image
docker build -t ezshare:latest .
Copy config file to /var/ezshare/ezshare.toml (or see ezshare.minimal.env to see how to set config-values using envvars)
# Run the server
docker run --rm -d -v /var/ezshare:/data -e EZSHARE_CONFIG=/data/ezshare.toml ezshare:latest
Client
Compile the client:
go build -o ezshare cmd/ezshare.go
Generate client config, and fetch needed certificates:
./ezshare client login --overwrite "https://ezshare.example.org"
username: admin
password:
NAME:
ezshare client - Client commands
USAGE:
ezshare client command [command options] [arguments...]
COMMANDS:
get Get file with id
upload Upload file(s)
delete Delete file with id
list List files
config-init Initialize default config
help, h Shows a list of commands or help for one command
OPTIONS:
--addr value Address of server.
--help, -h show help (default: false)
Development
Recompile proto-files
protoc --go_out=. --go-grpc_out=. --go_opt=module=git.t-juice.club/torjus/ezshare --go-grpc_opt=module=git.t-juice.club/torjus/ezshare protos/ezshare.proto