47
GitHub - lxlxw/s3-micro: This project is an upload and download micro service of...
source link: https://github.com/lxlxw/s3-micro
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
s3 upload micro service
This project is an upload and download micro service of Amazon S3 and KS3.
Table of Contents
Installation
Use go get to retrieve the project to add it to your GOPATH workspace, or project's Go module dependencies.
go get github.com/lxlxw/micro-s3-grpc
To update the project use go get -u to retrieve the latest version of the project.
go get -u github.com/lxlxw/micro-s3-grpc
Building
Configuring
Usage
RESTful API examples
curl http://localhost:8088/api/object/upload
Grpc examples
create a service client, make a request, handle the error, and process the response.
package main import ( "log" "golang.org/x/net/context" "google.golang.org/grpc" pb "github.com/lxlxw/micro-s3-grpc/rpc" ) func main() { conn, err := grpc.Dial(":50052", grpc.WithInsecure()) if err != nil { log.Println(err) } defer conn.Close() // new client c := pb.NewStoreApiServiceClient(conn) // get method req := &pb.CreateBucketRequest{Store: "ks3", Bucketname: "test-bucket"} res, err := c.CreateBucket(context.Background(), req) if err != nil { log.Println(err) } log.Println(res.Msg) }
Features
- Grpc
- RESTful API
- Swagger UI
- Middleware
- App configurable
- Logging
- JWT Authorization
Swagger
Support and Feedback
If you find a bug, please submit the issue in Github directly. Micro-S3-Grpc Issues
Contact
- Email:[email protected]
License
Micro-S3-Grpc is based on the MIT protocol.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK