瀏覽代碼

初始化

Tao Zhang 4 年之前
當前提交
a060e6dd27

+ 5 - 0
.gitignore

@@ -0,0 +1,5 @@
+##
+.idea
+/rpc/jyfs_rpc
+/api/jyfs_api
+

+ 3 - 0
README.md

@@ -0,0 +1,3 @@
+# 剑鱼文件系统
+## 说明
+对阿里云OSS进行封装;对外提供统一文件操作服务。

+ 7 - 0
api/README.md

@@ -0,0 +1,7 @@
+# 剑鱼文件系统RestFul 接口
+## 使用说明
+### 1.域操作
+- 创建域
+curl -XPOST -d "name=jytest2&meta=name,ext,length"  http://192.168.20.106:8085/filesystem/domain/create
+- 删除域
+curl -XPOST -d "name=jytest2"  http://192.168.20.106:8085/filesystem/domain/delete

+ 8 - 0
api/etc/filesystem-api.yaml

@@ -0,0 +1,8 @@
+Name: filesystem-api
+Host: 0.0.0.0
+Port: 8085
+FileSystemConf:
+  Etcd:
+    Hosts:
+      - 192.168.3.240:2379
+    Key: moapp.filesystem.rpc

+ 27 - 0
api/filesystem.api

@@ -0,0 +1,27 @@
+info(
+	title: "Jianyu Filesystem"
+	desc: "剑鱼文件系统,基于阿里云OSS封装"
+	author: "Tao Zhang"
+	email: "zhanghongbo@topnet.net.cn"
+)
+type (
+	CreateDomainReq {
+		name string `form:"name"`
+		meta string `form:"meta"`
+	}
+	DomainOpResp {
+		state string `json:"state"`
+	}
+	LoadDomainReq {
+		name string `form:"name"`
+	}
+)
+
+service filesystem-api {
+	//创建域
+	@handler CreateDomain
+	post /filesystem/domain/create (CreateDomainReq) returns (DomainOpResp)
+	//删除域
+	@handler DeleteDomain
+	post /filesystem/domain/delete (LoadDomainReq) returns (DomainOpResp)
+}

+ 31 - 0
api/filesystem.go

@@ -0,0 +1,31 @@
+package main
+
+import (
+	"flag"
+	"fmt"
+
+	"app.yhyue.com/moapp/jyfs/api/internal/config"
+	"app.yhyue.com/moapp/jyfs/api/internal/handler"
+	"app.yhyue.com/moapp/jyfs/api/internal/svc"
+
+	"github.com/tal-tech/go-zero/core/conf"
+	"github.com/tal-tech/go-zero/rest"
+)
+
+var configFile = flag.String("f", "etc/filesystem-api.yaml", "the config file")
+
+func main() {
+	flag.Parse()
+
+	var c config.Config
+	conf.MustLoad(*configFile, &c)
+
+	ctx := svc.NewServiceContext(c)
+	server := rest.MustNewServer(c.RestConf)
+	defer server.Stop()
+
+	handler.RegisterHandlers(server, ctx)
+
+	fmt.Printf("Starting server at %s:%d...\n", c.Host, c.Port)
+	server.Start()
+}

+ 11 - 0
api/internal/config/config.go

@@ -0,0 +1,11 @@
+package config
+
+import (
+	"github.com/tal-tech/go-zero/rest"
+	"github.com/tal-tech/go-zero/zrpc"
+)
+
+type Config struct {
+	rest.RestConf
+	FileSystemConf zrpc.RpcClientConf
+}

+ 29 - 0
api/internal/handler/createdomainhandler.go

@@ -0,0 +1,29 @@
+package handler
+
+import (
+	"net/http"
+
+	"app.yhyue.com/moapp/jyfs/api/internal/logic"
+	"app.yhyue.com/moapp/jyfs/api/internal/svc"
+	"app.yhyue.com/moapp/jyfs/api/internal/types"
+
+	"github.com/tal-tech/go-zero/rest/httpx"
+)
+
+func CreateDomainHandler(ctx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.CreateDomainReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.Error(w, err)
+			return
+		}
+
+		l := logic.NewCreateDomainLogic(r.Context(), ctx)
+		resp, err := l.CreateDomain(req)
+		if err != nil {
+			httpx.Error(w, err)
+		} else {
+			httpx.OkJson(w, resp)
+		}
+	}
+}

+ 29 - 0
api/internal/handler/deletedomainhandler.go

@@ -0,0 +1,29 @@
+package handler
+
+import (
+	"net/http"
+
+	"app.yhyue.com/moapp/jyfs/api/internal/logic"
+	"app.yhyue.com/moapp/jyfs/api/internal/svc"
+	"app.yhyue.com/moapp/jyfs/api/internal/types"
+
+	"github.com/tal-tech/go-zero/rest/httpx"
+)
+
+func DeleteDomainHandler(ctx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.LoadDomainReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.Error(w, err)
+			return
+		}
+
+		l := logic.NewDeleteDomainLogic(r.Context(), ctx)
+		resp, err := l.DeleteDomain(req)
+		if err != nil {
+			httpx.Error(w, err)
+		} else {
+			httpx.OkJson(w, resp)
+		}
+	}
+}

+ 27 - 0
api/internal/handler/routes.go

@@ -0,0 +1,27 @@
+// Code generated by goctl. DO NOT EDIT.
+package handler
+
+import (
+	"net/http"
+
+	"app.yhyue.com/moapp/jyfs/api/internal/svc"
+
+	"github.com/tal-tech/go-zero/rest"
+)
+
+func RegisterHandlers(engine *rest.Server, serverCtx *svc.ServiceContext) {
+	engine.AddRoutes(
+		[]rest.Route{
+			{
+				Method:  http.MethodPost,
+				Path:    "/filesystem/domain/create",
+				Handler: CreateDomainHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/filesystem/domain/delete",
+				Handler: DeleteDomainHandler(serverCtx),
+			},
+		},
+	)
+}

+ 39 - 0
api/internal/logic/createdomainlogic.go

@@ -0,0 +1,39 @@
+package logic
+
+import (
+	"context"
+	"strings"
+
+	"app.yhyue.com/moapp/jyfs/api/internal/svc"
+	"app.yhyue.com/moapp/jyfs/api/internal/types"
+
+	fsc "app.yhyue.com/moapp/jyfs/rpc/filesystemclient"
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type CreateDomainLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewCreateDomainLogic(ctx context.Context, svcCtx *svc.ServiceContext) CreateDomainLogic {
+	return CreateDomainLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *CreateDomainLogic) CreateDomain(req types.CreateDomainReq) (*types.DomainOpResp, error) {
+	// todo: add your logic here and delete this line
+	resp, err := l.svcCtx.FileSystem.CreateDomain(l.ctx, &fsc.DomainReq{
+		Name:       req.Name,
+		MetaFields: strings.Split(req.Meta, ","),
+	})
+	if err != nil || (resp != nil && !resp.State) {
+		return &types.DomainOpResp{State: "创建失败"}, nil
+	} else {
+		return &types.DomainOpResp{State: "创建成功"}, nil
+	}
+}

+ 35 - 0
api/internal/logic/deletedomainlogic.go

@@ -0,0 +1,35 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jyfs/api/internal/svc"
+	"app.yhyue.com/moapp/jyfs/api/internal/types"
+	"context"
+
+	fsc "app.yhyue.com/moapp/jyfs/rpc/filesystemclient"
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type DeleteDomainLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewDeleteDomainLogic(ctx context.Context, svcCtx *svc.ServiceContext) DeleteDomainLogic {
+	return DeleteDomainLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *DeleteDomainLogic) DeleteDomain(req types.LoadDomainReq) (*types.DomainOpResp, error) {
+	resp, err := l.svcCtx.FileSystem.DeleteDomain(l.ctx, &fsc.DomainReq{
+		Name: req.Name,
+	})
+	if err != nil || (resp != nil && !resp.State) {
+		return &types.DomainOpResp{State: "删除失败"}, nil
+	} else {
+		return &types.DomainOpResp{State: "删除成功"}, nil
+	}
+}

+ 19 - 0
api/internal/svc/servicecontext.go

@@ -0,0 +1,19 @@
+package svc
+
+import (
+	"app.yhyue.com/moapp/jyfs/api/internal/config"
+	"app.yhyue.com/moapp/jyfs/rpc/filesystemclient"
+	"github.com/tal-tech/go-zero/zrpc"
+)
+
+type ServiceContext struct {
+	Config     config.Config
+	FileSystem filesystemclient.FileSystem
+}
+
+func NewServiceContext(c config.Config) *ServiceContext {
+	return &ServiceContext{
+		Config:     c,
+		FileSystem: filesystemclient.NewFileSystem(zrpc.MustNewClient(c.FileSystemConf)),
+	}
+}

+ 15 - 0
api/internal/types/types.go

@@ -0,0 +1,15 @@
+// Code generated by goctl. DO NOT EDIT.
+package types
+
+type CreateDomainReq struct {
+	Name string `form:"name"`
+	Meta string `form:"meta"`
+}
+
+type DomainOpResp struct {
+	State string `json:"state"`
+}
+
+type LoadDomainReq struct {
+	Name string `form:"name"`
+}

+ 1 - 0
docs/README.md

@@ -0,0 +1 @@
+目录结构说明

+ 14 - 0
go.mod

@@ -0,0 +1,14 @@
+module app.yhyue.com/moapp/jyfs
+
+go 1.14
+
+require (
+	github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible
+	github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
+	github.com/golang/protobuf v1.4.2
+	github.com/satori/go.uuid v1.2.0 // indirect
+	github.com/tal-tech/go-zero v1.1.2
+	google.golang.org/grpc v1.29.1
+)
+
+replace google.golang.org/grpc => google.golang.org/grpc v1.29.1

+ 402 - 0
go.sum

@@ -0,0 +1,402 @@
+github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/ClickHouse/clickhouse-go v1.4.3/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
+github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
+github.com/StackExchange/wmi v0.0.0-20170410192909-ea383cf3ba6e/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
+github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk=
+github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
+github.com/alicebob/miniredis/v2 v2.14.1 h1:GjlbSeoJ24bzdLRs13HoMEeaRZx9kg5nHoRW7QV/nCs=
+github.com/alicebob/miniredis/v2 v2.14.1/go.mod h1:uS970Sw5Gs9/iK3yBg0l9Uj9s25wXxSpQUE9EaJ/Blg=
+github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible h1:Ft+KeWIJxFP76LqgJbvtOA1qBIoC8vGkTV3QeCOeJC4=
+github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
+github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q=
+github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f h1:ZNv7On9kyUzm7fvRZumSyy/IUiSC7AzL0I1jKKtwooA=
+github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=
+github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
+github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
+github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
+github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
+github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
+github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4=
+github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
+github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
+github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
+github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
+github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
+github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
+github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
+github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y=
+github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
+github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=
+github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQamW5YV28=
+github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
+github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs=
+github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/emicklei/proto v1.9.0/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A=
+github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
+github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
+github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94=
+github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o=
+github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
+github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
+github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
+github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8=
+github.com/go-redis/redis v6.15.7+incompatible h1:3skhDh95XQMpnqeqNftPkQD9jL9e5e36z/1SUm6dy1U=
+github.com/go-redis/redis v6.15.7+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
+github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
+github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
+github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/go-xorm/builder v0.3.4/go.mod h1:KxkQkNN1DpPKTedxXyTQcmH+rXfvk4LZ9SOOBoZBAxw=
+github.com/go-xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:56xuuqnHyryaerycW3BfssRdxQstACi0Epw/yC5E2xM=
+github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
+github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
+github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=
+github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/mock v1.4.3 h1:GV+pQPG/EUUbkh47niozDcADz6go/dUwhVzdUQHIVRw=
+github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
+github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
+github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
+github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/gops v0.3.7/go.mod h1:bj0cwMmX1X4XIJFTjR99R5sCxNssNJ8HebFNvoQlmgY=
+github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
+github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
+github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
+github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
+github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg=
+github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
+github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
+github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
+github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
+github.com/grpc-ecosystem/grpc-gateway v1.14.3 h1:OCJlWkOUoTnl0neNGlf4fUm3TmbEtguw7vR+nGtnDjY=
+github.com/grpc-ecosystem/grpc-gateway v1.14.3/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0=
+github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw=
+github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/iancoleman/strcase v0.1.2/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE=
+github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
+github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks=
+github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
+github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
+github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
+github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
+github.com/justinas/alice v1.2.0 h1:+MHSA/vccVCF4Uq37S42jwlkvI2Xzl7zTPCN5BnZNVo=
+github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA=
+github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
+github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
+github.com/keybase/go-ps v0.0.0-20161005175911-668c8856d999/go.mod h1:hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ=
+github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
+github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=
+github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
+github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
+github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
+github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
+github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
+github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
+github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
+github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
+github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
+github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
+github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
+github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
+github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
+github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4=
+github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
+github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
+github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA=
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
+github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo=
+github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
+github.com/pierrec/lz4 v2.5.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
+github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
+github.com/prometheus/client_golang v1.5.1 h1:bdHYieyGlH+6OLEk2YQha8THib30KP0/yD0YH9m6xcA=
+github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
+github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
+github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U=
+github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
+github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
+github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8=
+github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
+github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
+github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
+github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
+github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
+github.com/shirou/gopsutil v0.0.0-20180427012116-c95755e4bcd7/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
+github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
+github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
+github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
+github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
+github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
+github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
+github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
+github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
+github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
+github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4=
+github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/tal-tech/go-zero v1.1.2 h1:jgnuoaKBYPVMm+Pn2Ft3gMCT+tkuEx/E4MjLtYcRhyQ=
+github.com/tal-tech/go-zero v1.1.2/go.mod h1:lzBHtH8qAplwP1culBv1vsfrYpVQSAgAM4wNRDmQgPA=
+github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
+github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 h1:lYIiVDtZnyTWlNwiAxLj0bbpTcx1BWCFhXjfsvmPdNc=
+github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
+github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
+github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
+github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
+github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=
+github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2/go.mod h1:hzfGeIUDq/j97IG+FhNqkowIyEcD88LrW6fyU3K3WqY=
+github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb h1:ZkM6LRnq40pR1Ox0hTHlnpkcOTuFIDQpZ1IN8rKKhX0=
+github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
+go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg=
+go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
+go.etcd.io/etcd v0.0.0-20200402134248-51bdeb39e698 h1:jWtjCJX1qxhHISBMLRztWwR+EXkI7MJAF2HjHAE/x/I=
+go.etcd.io/etcd v0.0.0-20200402134248-51bdeb39e698/go.mod h1:YoUyTScD3Vcv2RBm3eGVOq7i1ULiz3OuXoQFWOirmAM=
+go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk=
+go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
+go.uber.org/automaxprocs v1.3.0 h1:II28aZoGdaglS5vVNnspf28lnZpXScxtIozx1lAjdb0=
+go.uber.org/automaxprocs v1.3.0/go.mod h1:9CWT6lKIep8U41DDaPiH6eFscnTyjfTANNQNx6LrIcA=
+go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A=
+go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
+go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4=
+go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
+go.uber.org/zap v1.14.1 h1:nYDKopTbvAPq/NrUVZwT15y2lpROBiLLyoRTbXOYWOo=
+go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
+golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
+golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
+golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k=
+golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
+golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
+golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU=
+golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20171017063910-8dbc5d05d6ed/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 h1:sIky/MyNRSHTrdxfsiUSS4WIAMvInbeXljJz+jDjeYE=
+golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=
+golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
+golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200410132612-ae9902aceb98 h1:ibc1eDGW5ajwA4qzFTj0WHlD9eofMe1gAre+A0a3Vhs=
+golang.org/x/tools v0.0.0-20200410132612-ae9902aceb98/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
+google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
+google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f h1:ohwtWcCwB/fZUxh/vjazHorYmBnua3NmY3CAjwC7mEA=
+google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4=
+google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
+google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
+google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
+gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
+gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
+gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
+gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+gopkg.in/h2non/gock.v1 v1.0.15 h1:SzLqcIlb/fDfg7UvukMpNcWsu7sI5tWwL+KCATZqks0=
+gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE=
+gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
+gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
+honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
+honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
+honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
+rsc.io/goversion v1.0.0/go.mod h1:Eih9y/uIBS3ulggl7KNJ09xGSLcuNaLgmvvqa07sgfo=
+rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
+rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
+sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
+sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
+sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=

+ 4 - 0
jyfs.go

@@ -0,0 +1,4 @@
+/***
+剑鱼文件系统
+*/
+package jyfs

+ 11 - 0
rpc/etc/filesystem.yaml

@@ -0,0 +1,11 @@
+Name: filesystem.rpc
+ListenOn: 192.168.20.106:8080
+#阿里云OSS配置
+OssEndPoint: "oss-cn-beijing.aliyuncs.com"
+OssAccessKeyId: "LTAI4G5x9aoZx8dDamQ7vfZi"
+OssAccessKeySecret: "Bk98FsbPYXcJe72n1bG3Ssf73acuNh"
+#etcd配置
+Etcd:
+  Hosts:
+    - 192.168.3.240:2379
+  Key: moapp.filesystem.rpc

+ 35 - 0
rpc/filesystem.go

@@ -0,0 +1,35 @@
+// Code generated by goctl. DO NOT EDIT!
+// Source: filesystem.proto
+
+package main
+
+import (
+	"app.yhyue.com/moapp/jyfs/rpc/filesystem"
+	"app.yhyue.com/moapp/jyfs/rpc/internal/config"
+	"app.yhyue.com/moapp/jyfs/rpc/internal/server"
+	"app.yhyue.com/moapp/jyfs/rpc/internal/svc"
+	"flag"
+	"fmt"
+	"github.com/tal-tech/go-zero/core/conf"
+	"github.com/tal-tech/go-zero/zrpc"
+	"google.golang.org/grpc"
+)
+
+var configFile = flag.String("f", "etc/filesystem.yaml", "the config file")
+
+func main() {
+	flag.Parse()
+
+	var c config.Config
+	conf.MustLoad(*configFile, &c)
+	ctx := svc.NewServiceContext(c)
+	srv := server.NewFileSystemServer(ctx)
+
+	s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
+		filesystem.RegisterFileSystemServer(grpcServer, srv)
+	})
+	defer s.Stop()
+
+	fmt.Printf("Starting rpc server at %s...\n", c.ListenOn)
+	s.Start()
+}

+ 63 - 0
rpc/filesystem.proto

@@ -0,0 +1,63 @@
+syntax = "proto3";
+
+package filesystem;
+
+message DomainReq {
+  string name = 1;
+  repeated string metaFields = 2;//必须元数据
+}
+
+message DomainResp {
+  bool state = 1;
+}
+//
+message SaveFileReq {
+  string domain = 1;//存入哪个buckets
+  map<string, string> meta = 2;//元数据
+  bytes rawFileContent = 3;//文件内容
+}
+//
+message FileOpResp {
+  bool state = 1;
+  string domain = 2;
+  string fileId = 3;//文件ID
+}
+//
+message UpdateFileMetaReq{
+  string domain = 1;//存入哪个buckets
+  string fileId = 2;
+  map<string, string> meta = 3;//元数据
+}
+//
+message LoadFileReq{
+  string domain = 1;//存入哪个buckets
+  string fileId = 2;
+}
+//
+message LoadFileResp{
+  map<string, string> meta = 2;//元数据
+  bytes rawFileContent = 3;//文件内容
+}
+//
+message LoadFileMetaResp{
+  map<string, string> meta = 2;//元数据
+}
+
+service FileSystem {
+  //创建域
+  rpc CreateDomain(DomainReq) returns(DomainResp);
+  //更新域
+  rpc UpdateDomainMeta(DomainReq)returns(DomainResp);
+  //删除域
+  rpc DeleteDomain(DomainReq)returns(DomainResp);
+  //保存文件
+  rpc SaveFile(SaveFileReq)returns(FileOpResp);
+  //更新文件元数据
+  rpc UpdateFileMeta(UpdateFileMetaReq)returns(FileOpResp);
+  //删除文件
+  rpc DeleteFile(LoadFileReq)returns(FileOpResp);
+  //获取文件
+  rpc GetFile(LoadFileReq)returns(LoadFileResp);
+  //获取文件元数据
+  rpc GetFileMeta(LoadFileReq)returns(LoadFileMetaResp);
+}

+ 816 - 0
rpc/filesystem/filesystem.pb.go

@@ -0,0 +1,816 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: filesystem.proto
+
+package filesystem
+
+import (
+	context "context"
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
+	math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+type DomainReq struct {
+	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+	MetaFields           []string `protobuf:"bytes,2,rep,name=metaFields,proto3" json:"metaFields,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *DomainReq) Reset()         { *m = DomainReq{} }
+func (m *DomainReq) String() string { return proto.CompactTextString(m) }
+func (*DomainReq) ProtoMessage()    {}
+func (*DomainReq) Descriptor() ([]byte, []int) {
+	return fileDescriptor_0a9f8093c6c7067e, []int{0}
+}
+
+func (m *DomainReq) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_DomainReq.Unmarshal(m, b)
+}
+func (m *DomainReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_DomainReq.Marshal(b, m, deterministic)
+}
+func (m *DomainReq) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_DomainReq.Merge(m, src)
+}
+func (m *DomainReq) XXX_Size() int {
+	return xxx_messageInfo_DomainReq.Size(m)
+}
+func (m *DomainReq) XXX_DiscardUnknown() {
+	xxx_messageInfo_DomainReq.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DomainReq proto.InternalMessageInfo
+
+func (m *DomainReq) GetName() string {
+	if m != nil {
+		return m.Name
+	}
+	return ""
+}
+
+func (m *DomainReq) GetMetaFields() []string {
+	if m != nil {
+		return m.MetaFields
+	}
+	return nil
+}
+
+type DomainResp struct {
+	State                bool     `protobuf:"varint,1,opt,name=state,proto3" json:"state,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *DomainResp) Reset()         { *m = DomainResp{} }
+func (m *DomainResp) String() string { return proto.CompactTextString(m) }
+func (*DomainResp) ProtoMessage()    {}
+func (*DomainResp) Descriptor() ([]byte, []int) {
+	return fileDescriptor_0a9f8093c6c7067e, []int{1}
+}
+
+func (m *DomainResp) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_DomainResp.Unmarshal(m, b)
+}
+func (m *DomainResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_DomainResp.Marshal(b, m, deterministic)
+}
+func (m *DomainResp) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_DomainResp.Merge(m, src)
+}
+func (m *DomainResp) XXX_Size() int {
+	return xxx_messageInfo_DomainResp.Size(m)
+}
+func (m *DomainResp) XXX_DiscardUnknown() {
+	xxx_messageInfo_DomainResp.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DomainResp proto.InternalMessageInfo
+
+func (m *DomainResp) GetState() bool {
+	if m != nil {
+		return m.State
+	}
+	return false
+}
+
+//
+type SaveFileReq struct {
+	Domain               string            `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
+	Meta                 map[string]string `protobuf:"bytes,2,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+	RawFileContent       []byte            `protobuf:"bytes,3,opt,name=rawFileContent,proto3" json:"rawFileContent,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
+	XXX_unrecognized     []byte            `json:"-"`
+	XXX_sizecache        int32             `json:"-"`
+}
+
+func (m *SaveFileReq) Reset()         { *m = SaveFileReq{} }
+func (m *SaveFileReq) String() string { return proto.CompactTextString(m) }
+func (*SaveFileReq) ProtoMessage()    {}
+func (*SaveFileReq) Descriptor() ([]byte, []int) {
+	return fileDescriptor_0a9f8093c6c7067e, []int{2}
+}
+
+func (m *SaveFileReq) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_SaveFileReq.Unmarshal(m, b)
+}
+func (m *SaveFileReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_SaveFileReq.Marshal(b, m, deterministic)
+}
+func (m *SaveFileReq) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SaveFileReq.Merge(m, src)
+}
+func (m *SaveFileReq) XXX_Size() int {
+	return xxx_messageInfo_SaveFileReq.Size(m)
+}
+func (m *SaveFileReq) XXX_DiscardUnknown() {
+	xxx_messageInfo_SaveFileReq.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SaveFileReq proto.InternalMessageInfo
+
+func (m *SaveFileReq) GetDomain() string {
+	if m != nil {
+		return m.Domain
+	}
+	return ""
+}
+
+func (m *SaveFileReq) GetMeta() map[string]string {
+	if m != nil {
+		return m.Meta
+	}
+	return nil
+}
+
+func (m *SaveFileReq) GetRawFileContent() []byte {
+	if m != nil {
+		return m.RawFileContent
+	}
+	return nil
+}
+
+//
+type FileOpResp struct {
+	State                bool     `protobuf:"varint,1,opt,name=state,proto3" json:"state,omitempty"`
+	Domain               string   `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
+	FileId               string   `protobuf:"bytes,3,opt,name=fileId,proto3" json:"fileId,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *FileOpResp) Reset()         { *m = FileOpResp{} }
+func (m *FileOpResp) String() string { return proto.CompactTextString(m) }
+func (*FileOpResp) ProtoMessage()    {}
+func (*FileOpResp) Descriptor() ([]byte, []int) {
+	return fileDescriptor_0a9f8093c6c7067e, []int{3}
+}
+
+func (m *FileOpResp) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_FileOpResp.Unmarshal(m, b)
+}
+func (m *FileOpResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_FileOpResp.Marshal(b, m, deterministic)
+}
+func (m *FileOpResp) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_FileOpResp.Merge(m, src)
+}
+func (m *FileOpResp) XXX_Size() int {
+	return xxx_messageInfo_FileOpResp.Size(m)
+}
+func (m *FileOpResp) XXX_DiscardUnknown() {
+	xxx_messageInfo_FileOpResp.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FileOpResp proto.InternalMessageInfo
+
+func (m *FileOpResp) GetState() bool {
+	if m != nil {
+		return m.State
+	}
+	return false
+}
+
+func (m *FileOpResp) GetDomain() string {
+	if m != nil {
+		return m.Domain
+	}
+	return ""
+}
+
+func (m *FileOpResp) GetFileId() string {
+	if m != nil {
+		return m.FileId
+	}
+	return ""
+}
+
+//
+type UpdateFileMetaReq struct {
+	Domain               string            `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
+	FileId               string            `protobuf:"bytes,2,opt,name=fileId,proto3" json:"fileId,omitempty"`
+	Meta                 map[string]string `protobuf:"bytes,3,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
+	XXX_unrecognized     []byte            `json:"-"`
+	XXX_sizecache        int32             `json:"-"`
+}
+
+func (m *UpdateFileMetaReq) Reset()         { *m = UpdateFileMetaReq{} }
+func (m *UpdateFileMetaReq) String() string { return proto.CompactTextString(m) }
+func (*UpdateFileMetaReq) ProtoMessage()    {}
+func (*UpdateFileMetaReq) Descriptor() ([]byte, []int) {
+	return fileDescriptor_0a9f8093c6c7067e, []int{4}
+}
+
+func (m *UpdateFileMetaReq) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_UpdateFileMetaReq.Unmarshal(m, b)
+}
+func (m *UpdateFileMetaReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_UpdateFileMetaReq.Marshal(b, m, deterministic)
+}
+func (m *UpdateFileMetaReq) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_UpdateFileMetaReq.Merge(m, src)
+}
+func (m *UpdateFileMetaReq) XXX_Size() int {
+	return xxx_messageInfo_UpdateFileMetaReq.Size(m)
+}
+func (m *UpdateFileMetaReq) XXX_DiscardUnknown() {
+	xxx_messageInfo_UpdateFileMetaReq.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UpdateFileMetaReq proto.InternalMessageInfo
+
+func (m *UpdateFileMetaReq) GetDomain() string {
+	if m != nil {
+		return m.Domain
+	}
+	return ""
+}
+
+func (m *UpdateFileMetaReq) GetFileId() string {
+	if m != nil {
+		return m.FileId
+	}
+	return ""
+}
+
+func (m *UpdateFileMetaReq) GetMeta() map[string]string {
+	if m != nil {
+		return m.Meta
+	}
+	return nil
+}
+
+//
+type LoadFileReq struct {
+	Domain               string   `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
+	FileId               string   `protobuf:"bytes,2,opt,name=fileId,proto3" json:"fileId,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *LoadFileReq) Reset()         { *m = LoadFileReq{} }
+func (m *LoadFileReq) String() string { return proto.CompactTextString(m) }
+func (*LoadFileReq) ProtoMessage()    {}
+func (*LoadFileReq) Descriptor() ([]byte, []int) {
+	return fileDescriptor_0a9f8093c6c7067e, []int{5}
+}
+
+func (m *LoadFileReq) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_LoadFileReq.Unmarshal(m, b)
+}
+func (m *LoadFileReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_LoadFileReq.Marshal(b, m, deterministic)
+}
+func (m *LoadFileReq) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_LoadFileReq.Merge(m, src)
+}
+func (m *LoadFileReq) XXX_Size() int {
+	return xxx_messageInfo_LoadFileReq.Size(m)
+}
+func (m *LoadFileReq) XXX_DiscardUnknown() {
+	xxx_messageInfo_LoadFileReq.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LoadFileReq proto.InternalMessageInfo
+
+func (m *LoadFileReq) GetDomain() string {
+	if m != nil {
+		return m.Domain
+	}
+	return ""
+}
+
+func (m *LoadFileReq) GetFileId() string {
+	if m != nil {
+		return m.FileId
+	}
+	return ""
+}
+
+//
+type LoadFileResp struct {
+	Meta                 map[string]string `protobuf:"bytes,2,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+	RawFileContent       []byte            `protobuf:"bytes,3,opt,name=rawFileContent,proto3" json:"rawFileContent,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
+	XXX_unrecognized     []byte            `json:"-"`
+	XXX_sizecache        int32             `json:"-"`
+}
+
+func (m *LoadFileResp) Reset()         { *m = LoadFileResp{} }
+func (m *LoadFileResp) String() string { return proto.CompactTextString(m) }
+func (*LoadFileResp) ProtoMessage()    {}
+func (*LoadFileResp) Descriptor() ([]byte, []int) {
+	return fileDescriptor_0a9f8093c6c7067e, []int{6}
+}
+
+func (m *LoadFileResp) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_LoadFileResp.Unmarshal(m, b)
+}
+func (m *LoadFileResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_LoadFileResp.Marshal(b, m, deterministic)
+}
+func (m *LoadFileResp) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_LoadFileResp.Merge(m, src)
+}
+func (m *LoadFileResp) XXX_Size() int {
+	return xxx_messageInfo_LoadFileResp.Size(m)
+}
+func (m *LoadFileResp) XXX_DiscardUnknown() {
+	xxx_messageInfo_LoadFileResp.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LoadFileResp proto.InternalMessageInfo
+
+func (m *LoadFileResp) GetMeta() map[string]string {
+	if m != nil {
+		return m.Meta
+	}
+	return nil
+}
+
+func (m *LoadFileResp) GetRawFileContent() []byte {
+	if m != nil {
+		return m.RawFileContent
+	}
+	return nil
+}
+
+//
+type LoadFileMetaResp struct {
+	Meta                 map[string]string `protobuf:"bytes,2,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
+	XXX_unrecognized     []byte            `json:"-"`
+	XXX_sizecache        int32             `json:"-"`
+}
+
+func (m *LoadFileMetaResp) Reset()         { *m = LoadFileMetaResp{} }
+func (m *LoadFileMetaResp) String() string { return proto.CompactTextString(m) }
+func (*LoadFileMetaResp) ProtoMessage()    {}
+func (*LoadFileMetaResp) Descriptor() ([]byte, []int) {
+	return fileDescriptor_0a9f8093c6c7067e, []int{7}
+}
+
+func (m *LoadFileMetaResp) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_LoadFileMetaResp.Unmarshal(m, b)
+}
+func (m *LoadFileMetaResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_LoadFileMetaResp.Marshal(b, m, deterministic)
+}
+func (m *LoadFileMetaResp) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_LoadFileMetaResp.Merge(m, src)
+}
+func (m *LoadFileMetaResp) XXX_Size() int {
+	return xxx_messageInfo_LoadFileMetaResp.Size(m)
+}
+func (m *LoadFileMetaResp) XXX_DiscardUnknown() {
+	xxx_messageInfo_LoadFileMetaResp.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LoadFileMetaResp proto.InternalMessageInfo
+
+func (m *LoadFileMetaResp) GetMeta() map[string]string {
+	if m != nil {
+		return m.Meta
+	}
+	return nil
+}
+
+func init() {
+	proto.RegisterType((*DomainReq)(nil), "filesystem.DomainReq")
+	proto.RegisterType((*DomainResp)(nil), "filesystem.DomainResp")
+	proto.RegisterType((*SaveFileReq)(nil), "filesystem.SaveFileReq")
+	proto.RegisterMapType((map[string]string)(nil), "filesystem.SaveFileReq.MetaEntry")
+	proto.RegisterType((*FileOpResp)(nil), "filesystem.FileOpResp")
+	proto.RegisterType((*UpdateFileMetaReq)(nil), "filesystem.UpdateFileMetaReq")
+	proto.RegisterMapType((map[string]string)(nil), "filesystem.UpdateFileMetaReq.MetaEntry")
+	proto.RegisterType((*LoadFileReq)(nil), "filesystem.LoadFileReq")
+	proto.RegisterType((*LoadFileResp)(nil), "filesystem.LoadFileResp")
+	proto.RegisterMapType((map[string]string)(nil), "filesystem.LoadFileResp.MetaEntry")
+	proto.RegisterType((*LoadFileMetaResp)(nil), "filesystem.LoadFileMetaResp")
+	proto.RegisterMapType((map[string]string)(nil), "filesystem.LoadFileMetaResp.MetaEntry")
+}
+
+func init() {
+	proto.RegisterFile("filesystem.proto", fileDescriptor_0a9f8093c6c7067e)
+}
+
+var fileDescriptor_0a9f8093c6c7067e = []byte{
+	// 473 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xdd, 0x6a, 0x13, 0x41,
+	0x14, 0x66, 0x36, 0x31, 0x76, 0x4f, 0x42, 0x89, 0x07, 0x8d, 0x4b, 0x51, 0x89, 0x73, 0x51, 0x73,
+	0x95, 0x8b, 0x8a, 0x3f, 0xb4, 0x06, 0x91, 0xc6, 0x16, 0x41, 0x11, 0xa6, 0xf8, 0x00, 0x23, 0x7b,
+	0x84, 0xe0, 0xfe, 0xb9, 0x33, 0x56, 0xf2, 0x04, 0xbe, 0x81, 0xaf, 0xe0, 0x33, 0x78, 0xe1, 0xbb,
+	0xc9, 0xcc, 0xec, 0x36, 0xb3, 0x6d, 0x77, 0xc5, 0x22, 0xbd, 0xdb, 0x39, 0x99, 0xef, 0x3b, 0xdf,
+	0xf7, 0xcd, 0x39, 0x81, 0xf1, 0xa7, 0x55, 0x42, 0x6a, 0xad, 0x34, 0xa5, 0xf3, 0xa2, 0xcc, 0x75,
+	0x8e, 0xb0, 0xa9, 0xf0, 0x97, 0x10, 0x2e, 0xf3, 0x54, 0xae, 0x32, 0x41, 0x5f, 0x10, 0xa1, 0x9f,
+	0xc9, 0x94, 0x22, 0x36, 0x65, 0xb3, 0x50, 0xd8, 0x6f, 0x7c, 0x00, 0x90, 0x92, 0x96, 0x47, 0x2b,
+	0x4a, 0x62, 0x15, 0x05, 0xd3, 0xde, 0x2c, 0x14, 0x5e, 0x85, 0x73, 0x80, 0x9a, 0x40, 0x15, 0x78,
+	0x1b, 0x6e, 0x28, 0x2d, 0xb5, 0xa3, 0xd8, 0x12, 0xee, 0xc0, 0x7f, 0x33, 0x18, 0x9e, 0xc8, 0x53,
+	0x3a, 0x5a, 0x25, 0x64, 0xfa, 0x4c, 0x60, 0x10, 0x5b, 0x4c, 0xd5, 0xa9, 0x3a, 0xe1, 0x13, 0xe8,
+	0x1b, 0x66, 0xdb, 0x65, 0xb8, 0xf7, 0x70, 0xee, 0x29, 0xf7, 0xe0, 0xf3, 0x77, 0xa4, 0xe5, 0xeb,
+	0x4c, 0x97, 0x6b, 0x61, 0xaf, 0xe3, 0x2e, 0x6c, 0x97, 0xf2, 0x9b, 0xf9, 0xf5, 0x30, 0xcf, 0x34,
+	0x65, 0x3a, 0xea, 0x4d, 0xd9, 0x6c, 0x24, 0xce, 0x55, 0x77, 0x9e, 0x41, 0x78, 0x06, 0xc5, 0x31,
+	0xf4, 0x3e, 0xd3, 0xba, 0x12, 0x60, 0x3e, 0x8d, 0xf6, 0x53, 0x99, 0x7c, 0xa5, 0x28, 0xb0, 0x35,
+	0x77, 0xd8, 0x0f, 0x9e, 0x33, 0x2e, 0x00, 0x0c, 0xcf, 0xfb, 0xa2, 0xdd, 0xa3, 0xe7, 0x29, 0x68,
+	0x78, 0x9a, 0xc0, 0xc0, 0xd8, 0x78, 0x13, 0x5b, 0x51, 0xa1, 0xa8, 0x4e, 0xfc, 0x17, 0x83, 0x5b,
+	0x1f, 0x8a, 0x58, 0x6a, 0x6b, 0xcb, 0xe8, 0xea, 0x4a, 0x66, 0xc3, 0x12, 0xf8, 0x2c, 0x78, 0x50,
+	0x25, 0xd6, 0xb3, 0x89, 0x3d, 0xf2, 0x13, 0xbb, 0x40, 0x7e, 0x3e, 0xb7, 0xab, 0xe7, 0xb1, 0x80,
+	0xe1, 0xdb, 0x5c, 0xc6, 0x7f, 0x7b, 0xce, 0x16, 0xd1, 0xfc, 0x27, 0x83, 0xd1, 0x06, 0xaf, 0x0a,
+	0x7c, 0xda, 0x78, 0x77, 0xee, 0xbb, 0xf0, 0xef, 0x5d, 0xff, 0xc3, 0x7f, 0x67, 0x30, 0xae, 0x15,
+	0xb8, 0x14, 0x55, 0x81, 0xfb, 0x0d, 0xb5, 0xbb, 0x97, 0xa9, 0xad, 0xef, 0xfe, 0xb7, 0xc8, 0xf7,
+	0x7e, 0xf4, 0xdd, 0x0c, 0x9e, 0xd8, 0x46, 0xb8, 0x80, 0xd1, 0x61, 0x49, 0x52, 0x93, 0xdb, 0x3d,
+	0xbc, 0xe3, 0xab, 0x38, 0x5b, 0xe8, 0x9d, 0xc9, 0x65, 0x65, 0x55, 0xe0, 0x2b, 0x18, 0xbb, 0xf1,
+	0x70, 0x35, 0x23, 0xe9, 0x5f, 0x29, 0x16, 0x30, 0x5a, 0x52, 0x42, 0x57, 0x55, 0x70, 0x00, 0x5b,
+	0xf5, 0x4a, 0xe3, 0xdd, 0x96, 0x45, 0x6f, 0x82, 0xbd, 0x0d, 0x3c, 0x86, 0xed, 0xe6, 0x74, 0xe3,
+	0xfd, 0xce, 0xc9, 0x6f, 0x25, 0x5a, 0x00, 0x38, 0x13, 0x17, 0x75, 0x78, 0x03, 0xde, 0x0a, 0x7f,
+	0x01, 0x37, 0x8f, 0x49, 0x77, 0x63, 0xa3, 0xb6, 0x69, 0xc6, 0x25, 0x0c, 0x2b, 0xb4, 0xb5, 0xd0,
+	0xca, 0x70, 0xaf, 0x6b, 0xc2, 0x3e, 0x0e, 0xec, 0x7f, 0xfa, 0xe3, 0x3f, 0x01, 0x00, 0x00, 0xff,
+	0xff, 0x2f, 0xd9, 0x28, 0x01, 0xe7, 0x05, 0x00, 0x00,
+}
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ context.Context
+var _ grpc.ClientConnInterface
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+const _ = grpc.SupportPackageIsVersion6
+
+// FileSystemClient is the client API for FileSystem service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
+type FileSystemClient interface {
+	//创建域
+	CreateDomain(ctx context.Context, in *DomainReq, opts ...grpc.CallOption) (*DomainResp, error)
+	//更新域
+	UpdateDomainMeta(ctx context.Context, in *DomainReq, opts ...grpc.CallOption) (*DomainResp, error)
+	//删除域
+	DeleteDomain(ctx context.Context, in *DomainReq, opts ...grpc.CallOption) (*DomainResp, error)
+	//保存文件
+	SaveFile(ctx context.Context, in *SaveFileReq, opts ...grpc.CallOption) (*FileOpResp, error)
+	//更新文件元数据
+	UpdateFileMeta(ctx context.Context, in *UpdateFileMetaReq, opts ...grpc.CallOption) (*FileOpResp, error)
+	//删除文件
+	DeleteFile(ctx context.Context, in *LoadFileReq, opts ...grpc.CallOption) (*FileOpResp, error)
+	//获取文件
+	GetFile(ctx context.Context, in *LoadFileReq, opts ...grpc.CallOption) (*LoadFileResp, error)
+	//获取文件元数据
+	GetFileMeta(ctx context.Context, in *LoadFileReq, opts ...grpc.CallOption) (*LoadFileMetaResp, error)
+}
+
+type fileSystemClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewFileSystemClient(cc grpc.ClientConnInterface) FileSystemClient {
+	return &fileSystemClient{cc}
+}
+
+func (c *fileSystemClient) CreateDomain(ctx context.Context, in *DomainReq, opts ...grpc.CallOption) (*DomainResp, error) {
+	out := new(DomainResp)
+	err := c.cc.Invoke(ctx, "/filesystem.FileSystem/CreateDomain", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *fileSystemClient) UpdateDomainMeta(ctx context.Context, in *DomainReq, opts ...grpc.CallOption) (*DomainResp, error) {
+	out := new(DomainResp)
+	err := c.cc.Invoke(ctx, "/filesystem.FileSystem/UpdateDomainMeta", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *fileSystemClient) DeleteDomain(ctx context.Context, in *DomainReq, opts ...grpc.CallOption) (*DomainResp, error) {
+	out := new(DomainResp)
+	err := c.cc.Invoke(ctx, "/filesystem.FileSystem/DeleteDomain", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *fileSystemClient) SaveFile(ctx context.Context, in *SaveFileReq, opts ...grpc.CallOption) (*FileOpResp, error) {
+	out := new(FileOpResp)
+	err := c.cc.Invoke(ctx, "/filesystem.FileSystem/SaveFile", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *fileSystemClient) UpdateFileMeta(ctx context.Context, in *UpdateFileMetaReq, opts ...grpc.CallOption) (*FileOpResp, error) {
+	out := new(FileOpResp)
+	err := c.cc.Invoke(ctx, "/filesystem.FileSystem/UpdateFileMeta", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *fileSystemClient) DeleteFile(ctx context.Context, in *LoadFileReq, opts ...grpc.CallOption) (*FileOpResp, error) {
+	out := new(FileOpResp)
+	err := c.cc.Invoke(ctx, "/filesystem.FileSystem/DeleteFile", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *fileSystemClient) GetFile(ctx context.Context, in *LoadFileReq, opts ...grpc.CallOption) (*LoadFileResp, error) {
+	out := new(LoadFileResp)
+	err := c.cc.Invoke(ctx, "/filesystem.FileSystem/GetFile", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *fileSystemClient) GetFileMeta(ctx context.Context, in *LoadFileReq, opts ...grpc.CallOption) (*LoadFileMetaResp, error) {
+	out := new(LoadFileMetaResp)
+	err := c.cc.Invoke(ctx, "/filesystem.FileSystem/GetFileMeta", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// FileSystemServer is the server API for FileSystem service.
+type FileSystemServer interface {
+	//创建域
+	CreateDomain(context.Context, *DomainReq) (*DomainResp, error)
+	//更新域
+	UpdateDomainMeta(context.Context, *DomainReq) (*DomainResp, error)
+	//删除域
+	DeleteDomain(context.Context, *DomainReq) (*DomainResp, error)
+	//保存文件
+	SaveFile(context.Context, *SaveFileReq) (*FileOpResp, error)
+	//更新文件元数据
+	UpdateFileMeta(context.Context, *UpdateFileMetaReq) (*FileOpResp, error)
+	//删除文件
+	DeleteFile(context.Context, *LoadFileReq) (*FileOpResp, error)
+	//获取文件
+	GetFile(context.Context, *LoadFileReq) (*LoadFileResp, error)
+	//获取文件元数据
+	GetFileMeta(context.Context, *LoadFileReq) (*LoadFileMetaResp, error)
+}
+
+// UnimplementedFileSystemServer can be embedded to have forward compatible implementations.
+type UnimplementedFileSystemServer struct {
+}
+
+func (*UnimplementedFileSystemServer) CreateDomain(ctx context.Context, req *DomainReq) (*DomainResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CreateDomain not implemented")
+}
+func (*UnimplementedFileSystemServer) UpdateDomainMeta(ctx context.Context, req *DomainReq) (*DomainResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UpdateDomainMeta not implemented")
+}
+func (*UnimplementedFileSystemServer) DeleteDomain(ctx context.Context, req *DomainReq) (*DomainResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DeleteDomain not implemented")
+}
+func (*UnimplementedFileSystemServer) SaveFile(ctx context.Context, req *SaveFileReq) (*FileOpResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method SaveFile not implemented")
+}
+func (*UnimplementedFileSystemServer) UpdateFileMeta(ctx context.Context, req *UpdateFileMetaReq) (*FileOpResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UpdateFileMeta not implemented")
+}
+func (*UnimplementedFileSystemServer) DeleteFile(ctx context.Context, req *LoadFileReq) (*FileOpResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DeleteFile not implemented")
+}
+func (*UnimplementedFileSystemServer) GetFile(ctx context.Context, req *LoadFileReq) (*LoadFileResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetFile not implemented")
+}
+func (*UnimplementedFileSystemServer) GetFileMeta(ctx context.Context, req *LoadFileReq) (*LoadFileMetaResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetFileMeta not implemented")
+}
+
+func RegisterFileSystemServer(s *grpc.Server, srv FileSystemServer) {
+	s.RegisterService(&_FileSystem_serviceDesc, srv)
+}
+
+func _FileSystem_CreateDomain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DomainReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(FileSystemServer).CreateDomain(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/filesystem.FileSystem/CreateDomain",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(FileSystemServer).CreateDomain(ctx, req.(*DomainReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _FileSystem_UpdateDomainMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DomainReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(FileSystemServer).UpdateDomainMeta(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/filesystem.FileSystem/UpdateDomainMeta",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(FileSystemServer).UpdateDomainMeta(ctx, req.(*DomainReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _FileSystem_DeleteDomain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DomainReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(FileSystemServer).DeleteDomain(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/filesystem.FileSystem/DeleteDomain",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(FileSystemServer).DeleteDomain(ctx, req.(*DomainReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _FileSystem_SaveFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(SaveFileReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(FileSystemServer).SaveFile(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/filesystem.FileSystem/SaveFile",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(FileSystemServer).SaveFile(ctx, req.(*SaveFileReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _FileSystem_UpdateFileMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UpdateFileMetaReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(FileSystemServer).UpdateFileMeta(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/filesystem.FileSystem/UpdateFileMeta",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(FileSystemServer).UpdateFileMeta(ctx, req.(*UpdateFileMetaReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _FileSystem_DeleteFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(LoadFileReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(FileSystemServer).DeleteFile(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/filesystem.FileSystem/DeleteFile",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(FileSystemServer).DeleteFile(ctx, req.(*LoadFileReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _FileSystem_GetFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(LoadFileReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(FileSystemServer).GetFile(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/filesystem.FileSystem/GetFile",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(FileSystemServer).GetFile(ctx, req.(*LoadFileReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _FileSystem_GetFileMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(LoadFileReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(FileSystemServer).GetFileMeta(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/filesystem.FileSystem/GetFileMeta",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(FileSystemServer).GetFileMeta(ctx, req.(*LoadFileReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+var _FileSystem_serviceDesc = grpc.ServiceDesc{
+	ServiceName: "filesystem.FileSystem",
+	HandlerType: (*FileSystemServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "CreateDomain",
+			Handler:    _FileSystem_CreateDomain_Handler,
+		},
+		{
+			MethodName: "UpdateDomainMeta",
+			Handler:    _FileSystem_UpdateDomainMeta_Handler,
+		},
+		{
+			MethodName: "DeleteDomain",
+			Handler:    _FileSystem_DeleteDomain_Handler,
+		},
+		{
+			MethodName: "SaveFile",
+			Handler:    _FileSystem_SaveFile_Handler,
+		},
+		{
+			MethodName: "UpdateFileMeta",
+			Handler:    _FileSystem_UpdateFileMeta_Handler,
+		},
+		{
+			MethodName: "DeleteFile",
+			Handler:    _FileSystem_DeleteFile_Handler,
+		},
+		{
+			MethodName: "GetFile",
+			Handler:    _FileSystem_GetFile_Handler,
+		},
+		{
+			MethodName: "GetFileMeta",
+			Handler:    _FileSystem_GetFileMeta_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "filesystem.proto",
+}

+ 102 - 0
rpc/filesystemclient/filesystem.go

@@ -0,0 +1,102 @@
+// Code generated by goctl. DO NOT EDIT!
+// Source: filesystem.proto
+
+//go:generate mockgen -destination ./filesystem_mock.go -package filesystemclient -source $GOFILE
+
+package filesystemclient
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jyfs/rpc/filesystem"
+
+	"github.com/tal-tech/go-zero/zrpc"
+)
+
+type (
+	FileOpResp        = filesystem.FileOpResp
+	UpdateFileMetaReq = filesystem.UpdateFileMetaReq
+	LoadFileReq       = filesystem.LoadFileReq
+	LoadFileResp      = filesystem.LoadFileResp
+	LoadFileMetaResp  = filesystem.LoadFileMetaResp
+	DomainReq         = filesystem.DomainReq
+	DomainResp        = filesystem.DomainResp
+	SaveFileReq       = filesystem.SaveFileReq
+
+	FileSystem interface {
+		// 创建域
+		CreateDomain(ctx context.Context, in *DomainReq) (*DomainResp, error)
+		// 更新域
+		UpdateDomainMeta(ctx context.Context, in *DomainReq) (*DomainResp, error)
+		// 删除域
+		DeleteDomain(ctx context.Context, in *DomainReq) (*DomainResp, error)
+		// 保存文件
+		SaveFile(ctx context.Context, in *SaveFileReq) (*FileOpResp, error)
+		// 更新文件元数据
+		UpdateFileMeta(ctx context.Context, in *UpdateFileMetaReq) (*FileOpResp, error)
+		// 删除文件
+		DeleteFile(ctx context.Context, in *LoadFileReq) (*FileOpResp, error)
+		// 获取文件
+		GetFile(ctx context.Context, in *LoadFileReq) (*LoadFileResp, error)
+		// 获取文件元数据
+		GetFileMeta(ctx context.Context, in *LoadFileReq) (*LoadFileMetaResp, error)
+	}
+
+	defaultFileSystem struct {
+		cli zrpc.Client
+	}
+)
+
+func NewFileSystem(cli zrpc.Client) FileSystem {
+	return &defaultFileSystem{
+		cli: cli,
+	}
+}
+
+// 创建域
+func (m *defaultFileSystem) CreateDomain(ctx context.Context, in *DomainReq) (*DomainResp, error) {
+	client := filesystem.NewFileSystemClient(m.cli.Conn())
+	return client.CreateDomain(ctx, in)
+}
+
+// 更新域
+func (m *defaultFileSystem) UpdateDomainMeta(ctx context.Context, in *DomainReq) (*DomainResp, error) {
+	client := filesystem.NewFileSystemClient(m.cli.Conn())
+	return client.UpdateDomainMeta(ctx, in)
+}
+
+// 删除域
+func (m *defaultFileSystem) DeleteDomain(ctx context.Context, in *DomainReq) (*DomainResp, error) {
+	client := filesystem.NewFileSystemClient(m.cli.Conn())
+	return client.DeleteDomain(ctx, in)
+}
+
+// 保存文件
+func (m *defaultFileSystem) SaveFile(ctx context.Context, in *SaveFileReq) (*FileOpResp, error) {
+	client := filesystem.NewFileSystemClient(m.cli.Conn())
+	return client.SaveFile(ctx, in)
+}
+
+// 更新文件元数据
+func (m *defaultFileSystem) UpdateFileMeta(ctx context.Context, in *UpdateFileMetaReq) (*FileOpResp, error) {
+	client := filesystem.NewFileSystemClient(m.cli.Conn())
+	return client.UpdateFileMeta(ctx, in)
+}
+
+// 删除文件
+func (m *defaultFileSystem) DeleteFile(ctx context.Context, in *LoadFileReq) (*FileOpResp, error) {
+	client := filesystem.NewFileSystemClient(m.cli.Conn())
+	return client.DeleteFile(ctx, in)
+}
+
+// 获取文件
+func (m *defaultFileSystem) GetFile(ctx context.Context, in *LoadFileReq) (*LoadFileResp, error) {
+	client := filesystem.NewFileSystemClient(m.cli.Conn())
+	return client.GetFile(ctx, in)
+}
+
+// 获取文件元数据
+func (m *defaultFileSystem) GetFileMeta(ctx context.Context, in *LoadFileReq) (*LoadFileMetaResp, error) {
+	client := filesystem.NewFileSystemClient(m.cli.Conn())
+	return client.GetFileMeta(ctx, in)
+}

+ 10 - 0
rpc/internal/config/config.go

@@ -0,0 +1,10 @@
+package config
+
+import "github.com/tal-tech/go-zero/zrpc"
+
+type Config struct {
+	zrpc.RpcServerConf
+	OssEndPoint        string
+	OssAccessKeyId     string
+	OssAccessKeySecret string
+}

+ 34 - 0
rpc/internal/logic/createdomainlogic.go

@@ -0,0 +1,34 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jyfs/rpc/filesystem"
+	"app.yhyue.com/moapp/jyfs/rpc/internal/svc"
+	"context"
+
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type CreateDomainLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewCreateDomainLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateDomainLogic {
+	return &CreateDomainLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 创建域
+func (l *CreateDomainLogic) CreateDomain(in *filesystem.DomainReq) (*filesystem.DomainResp, error) {
+	err := l.svcCtx.OssClient.CreateBucket(in.Name)
+	// todo: 本地存储bucket和meta的对应关系
+	if err != nil {
+		return &filesystem.DomainResp{State: false}, nil
+	} else {
+		return &filesystem.DomainResp{State: true}, nil
+	}
+}

+ 34 - 0
rpc/internal/logic/deletedomainlogic.go

@@ -0,0 +1,34 @@
+package logic
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jyfs/rpc/filesystem"
+	"app.yhyue.com/moapp/jyfs/rpc/internal/svc"
+
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type DeleteDomainLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewDeleteDomainLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteDomainLogic {
+	return &DeleteDomainLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 删除域
+func (l *DeleteDomainLogic) DeleteDomain(in *filesystem.DomainReq) (*filesystem.DomainResp, error) {
+	err := l.svcCtx.OssClient.DeleteBucket(in.Name)
+	if err != nil {
+		return &filesystem.DomainResp{State: false}, nil
+	} else {
+		return &filesystem.DomainResp{State: true}, nil
+	}
+}

+ 31 - 0
rpc/internal/logic/deletefilelogic.go

@@ -0,0 +1,31 @@
+package logic
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jyfs/rpc/filesystem"
+	"app.yhyue.com/moapp/jyfs/rpc/internal/svc"
+
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type DeleteFileLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewDeleteFileLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteFileLogic {
+	return &DeleteFileLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 删除文件
+func (l *DeleteFileLogic) DeleteFile(in *filesystem.LoadFileReq) (*filesystem.FileOpResp, error) {
+	// todo: add your logic here and delete this line
+
+	return &filesystem.FileOpResp{}, nil
+}

+ 31 - 0
rpc/internal/logic/getfilelogic.go

@@ -0,0 +1,31 @@
+package logic
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jyfs/rpc/filesystem"
+	"app.yhyue.com/moapp/jyfs/rpc/internal/svc"
+
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type GetFileLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewGetFileLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetFileLogic {
+	return &GetFileLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 获取文件
+func (l *GetFileLogic) GetFile(in *filesystem.LoadFileReq) (*filesystem.LoadFileResp, error) {
+	// todo: add your logic here and delete this line
+
+	return &filesystem.LoadFileResp{}, nil
+}

+ 31 - 0
rpc/internal/logic/getfilemetalogic.go

@@ -0,0 +1,31 @@
+package logic
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jyfs/rpc/filesystem"
+	"app.yhyue.com/moapp/jyfs/rpc/internal/svc"
+
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type GetFileMetaLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewGetFileMetaLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetFileMetaLogic {
+	return &GetFileMetaLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 获取文件元数据
+func (l *GetFileMetaLogic) GetFileMeta(in *filesystem.LoadFileReq) (*filesystem.LoadFileMetaResp, error) {
+	// todo: add your logic here and delete this line
+
+	return &filesystem.LoadFileMetaResp{}, nil
+}

+ 31 - 0
rpc/internal/logic/savefilelogic.go

@@ -0,0 +1,31 @@
+package logic
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jyfs/rpc/filesystem"
+	"app.yhyue.com/moapp/jyfs/rpc/internal/svc"
+
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type SaveFileLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewSaveFileLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SaveFileLogic {
+	return &SaveFileLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 保存文件
+func (l *SaveFileLogic) SaveFile(in *filesystem.SaveFileReq) (*filesystem.FileOpResp, error) {
+	// todo: add your logic here and delete this line
+
+	return &filesystem.FileOpResp{}, nil
+}

+ 31 - 0
rpc/internal/logic/updatedomainmetalogic.go

@@ -0,0 +1,31 @@
+package logic
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jyfs/rpc/filesystem"
+	"app.yhyue.com/moapp/jyfs/rpc/internal/svc"
+
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type UpdateDomainMetaLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewUpdateDomainMetaLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateDomainMetaLogic {
+	return &UpdateDomainMetaLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 更新域
+func (l *UpdateDomainMetaLogic) UpdateDomainMeta(in *filesystem.DomainReq) (*filesystem.DomainResp, error) {
+	// todo: add your logic here and delete this line
+
+	return &filesystem.DomainResp{}, nil
+}

+ 31 - 0
rpc/internal/logic/updatefilemetalogic.go

@@ -0,0 +1,31 @@
+package logic
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jyfs/rpc/filesystem"
+	"app.yhyue.com/moapp/jyfs/rpc/internal/svc"
+
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type UpdateFileMetaLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewUpdateFileMetaLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateFileMetaLogic {
+	return &UpdateFileMetaLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 更新文件元数据
+func (l *UpdateFileMetaLogic) UpdateFileMeta(in *filesystem.UpdateFileMetaReq) (*filesystem.FileOpResp, error) {
+	// todo: add your logic here and delete this line
+
+	return &filesystem.FileOpResp{}, nil
+}

+ 70 - 0
rpc/internal/server/filesystemserver.go

@@ -0,0 +1,70 @@
+// Code generated by goctl. DO NOT EDIT!
+// Source: filesystem.proto
+
+package server
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jyfs/rpc/filesystem"
+	"app.yhyue.com/moapp/jyfs/rpc/internal/logic"
+	"app.yhyue.com/moapp/jyfs/rpc/internal/svc"
+)
+
+type FileSystemServer struct {
+	svcCtx *svc.ServiceContext
+}
+
+func NewFileSystemServer(svcCtx *svc.ServiceContext) *FileSystemServer {
+	return &FileSystemServer{
+		svcCtx: svcCtx,
+	}
+}
+
+// 创建域
+func (s *FileSystemServer) CreateDomain(ctx context.Context, in *filesystem.DomainReq) (*filesystem.DomainResp, error) {
+	l := logic.NewCreateDomainLogic(ctx, s.svcCtx)
+	return l.CreateDomain(in)
+}
+
+// 更新域
+func (s *FileSystemServer) UpdateDomainMeta(ctx context.Context, in *filesystem.DomainReq) (*filesystem.DomainResp, error) {
+	l := logic.NewUpdateDomainMetaLogic(ctx, s.svcCtx)
+	return l.UpdateDomainMeta(in)
+}
+
+// 删除域
+func (s *FileSystemServer) DeleteDomain(ctx context.Context, in *filesystem.DomainReq) (*filesystem.DomainResp, error) {
+	l := logic.NewDeleteDomainLogic(ctx, s.svcCtx)
+	return l.DeleteDomain(in)
+}
+
+// 保存文件
+func (s *FileSystemServer) SaveFile(ctx context.Context, in *filesystem.SaveFileReq) (*filesystem.FileOpResp, error) {
+	l := logic.NewSaveFileLogic(ctx, s.svcCtx)
+	return l.SaveFile(in)
+}
+
+// 更新文件元数据
+func (s *FileSystemServer) UpdateFileMeta(ctx context.Context, in *filesystem.UpdateFileMetaReq) (*filesystem.FileOpResp, error) {
+	l := logic.NewUpdateFileMetaLogic(ctx, s.svcCtx)
+	return l.UpdateFileMeta(in)
+}
+
+// 删除文件
+func (s *FileSystemServer) DeleteFile(ctx context.Context, in *filesystem.LoadFileReq) (*filesystem.FileOpResp, error) {
+	l := logic.NewDeleteFileLogic(ctx, s.svcCtx)
+	return l.DeleteFile(in)
+}
+
+// 获取文件
+func (s *FileSystemServer) GetFile(ctx context.Context, in *filesystem.LoadFileReq) (*filesystem.LoadFileResp, error) {
+	l := logic.NewGetFileLogic(ctx, s.svcCtx)
+	return l.GetFile(in)
+}
+
+// 获取文件元数据
+func (s *FileSystemServer) GetFileMeta(ctx context.Context, in *filesystem.LoadFileReq) (*filesystem.LoadFileMetaResp, error) {
+	l := logic.NewGetFileMetaLogic(ctx, s.svcCtx)
+	return l.GetFileMeta(in)
+}

+ 23 - 0
rpc/internal/svc/servicecontext.go

@@ -0,0 +1,23 @@
+package svc
+
+import (
+	"app.yhyue.com/moapp/jyfs/rpc/internal/config"
+	"github.com/aliyun/aliyun-oss-go-sdk/oss"
+	"log"
+)
+
+type ServiceContext struct {
+	Config    config.Config
+	OssClient *oss.Client
+}
+
+func NewServiceContext(c config.Config) *ServiceContext {
+	client, err := oss.New(c.OssEndPoint, c.OssAccessKeyId, c.OssAccessKeySecret)
+	if err != nil {
+		log.Fatal(err)
+	}
+	return &ServiceContext{
+		Config:    c,
+		OssClient: client,
+	}
+}