diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index e8a0107..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,103 +0,0 @@ -name: Generate docs -on: - push: - branches: [master] - -jobs: - docs: - name: Generate docs - runs-on: ubuntu-latest - steps: - - name: Set up Go 1.13 - uses: actions/setup-go@v2 - with: - go-version: 1.13 - id: go - - - name: Install Protoc - uses: arduino/setup-protoc@master - - - name: Check out this code - uses: actions/checkout@v2 - with: - path: services - - - name: Check out micro code - uses: actions/checkout@v2 - with: - repository: 'micro/micro' - path: 'micro' - ref: 'master' - - - name: Enable caching - uses: actions/cache@v2 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - - name: Install protoc gen micro plugin - working-directory: micro/cmd/protoc-gen-micro - run: | - go get -u github.com/golang/protobuf/protoc-gen-go - go install - - - name: Install redoc cli - run: | - # https://github.com/actions/virtual-environments/issues/599 - sudo npm install -g redoc-cli - - - name: Install openapi plugin - working-directory: micro/cmd/protoc-gen-openapi - run: | - go install - - - name: Install hugo - run: sudo snap install hugo --channel=extended - - - name: Generate openapi spec and html - working-directory: services - run: | - go run cmd/docgen/main.go . - env: - MICRO_ADMIN_TOKEN: ${{ secrets.MICRO_ADMIN_TOKEN }} - - - name: Deploy - if: github.ref == 'refs/heads/master' - uses: s0/git-publish-subdir-action@develop - env: - REPO: self - BRANCH: gh-pages - FOLDER: services/docs - GITHUB_TOKEN: ${{ secrets.GH_PAT }} - - - name: Generate package - working-directory: services - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: | - go run cmd/tsgen/main.go . - - # publish to github first under micro/services - # .npmrc has settings for it - - uses: JS-DevTools/npm-publish@v1 - #if: github.ref == 'refs/heads/master' - with: - access: public - package: services/clients/ts/package.json - token: ${{ secrets.NPM_TOKEN }} - - # publish to npm m3o/services - - name: Change npm settings - working-directory: services - run: | - rm clients/ts/.npmrc - sed -i 's/micro/m3o/g' clients/ts/package.json - - - uses: JS-DevTools/npm-publish@v1 - #if: github.ref == 'refs/heads/master' - with: - access: public - package: services/clients/ts/package.json - token: ${{ secrets.NPM_SITE_TOKEN }} diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 62ad3fb..5f61b01 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -49,7 +49,7 @@ jobs: run: | bash services/test/image/test-docker.sh - - name: Test Blog services + - name: Test Services working-directory: services/test/integration run: | go clean -testcache && GOMAXPROCS=4 go test -timeout 15m --tags=integration -v ./... diff --git a/blog/Dockerfile b/blog/Dockerfile deleted file mode 100644 index 2a2845c..0000000 --- a/blog/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM alpine -ADD blog /blog -ENTRYPOINT [ "/blog" ] diff --git a/blog/Makefile b/blog/Makefile deleted file mode 100644 index bf27cb8..0000000 --- a/blog/Makefile +++ /dev/null @@ -1,27 +0,0 @@ - -GOPATH:=$(shell go env GOPATH) -.PHONY: init -init: - go get -u github.com/golang/protobuf/proto - go get -u github.com/golang/protobuf/protoc-gen-go - go get github.com/micro/micro/v3/cmd/protoc-gen-micro -.PHONY: proto -proto: - protoc --openapi_out=. --proto_path=$$GOPATH/src:. --micro_out=. --go_out=:. proto/blog.proto - -.PHONY: docs -docs: - protoc --openapi_out=. --proto_path=$$GOPATH/src:. --micro_out=. --go_out=:. proto/blog.proto - @redoc-cli bundle api-blog.json - -.PHONY: build -build: - go build -o blog *.go - -.PHONY: test -test: - go test -v ./... -cover - -.PHONY: docker -docker: - docker build . -t blog:latest diff --git a/blog/README.md b/blog/README.md deleted file mode 100644 index 491f29e..0000000 --- a/blog/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# Blog - -This is a full end to end example of writing a multi-service blog application - -## Usage - -Check out the [blog tutorial](https://m3o.dev/tutorials/building-a-blog) on the developer docs. - -## How it works - -### Present - -The blog services are designed so a user can deploy them to their own micro namespace, write content with their Micro account with commands like - -```sh -micro posts save --id=7 --tags=News,Finance --title="Breaking News" --content="The stock market has just crashed" -``` - -and display content on their frontend by consuming the API: - -```sh -curl -H "Authorization: Bearer $MICRO_API_TOKEN" "Micro-Namespace: $NAMESPACE" https://api.m3o.com/tags/list - - -{ - "tags": [ - { - "type": "post-tag", - "slug": "news", - "title": "News", - "count": "3" - } - ] -] -``` - -There are no comments provided yet, just posts and tags. -Access is governed by auth rules, ie. Posts List, Tags List is open, Posts Save requires a Micro login. - -### Future possibilities - -#### Enable non Micro users to write posts, comments - -If we provide a user/login service (markedly different from auth, it can be a simple session based auth) to enable non Micro users to register, the following can be done: - -- A user (let's call the user Alice from this point) launches posts, tags, login service in their namespace. -- Alice opens up said endpoints -- People (let's call them Yoga Pants Co and Drone Inc) hosting JS and HTML on Netlify or Github Pages could create accounts in the services hosted by Alice. In this way, Alice, by having a Micro account becomes a headless CMS provider. Multiple blogs can be created on top of Alice's service instances. - -Questions: -- How will Yoga Pants Co or Drone Inc pay Alice or M3O for the costs of their backend hosting? \ No newline at end of file diff --git a/blog/generate.go b/blog/generate.go deleted file mode 100644 index 7d9db91..0000000 --- a/blog/generate.go +++ /dev/null @@ -1,3 +0,0 @@ -package main - -//go:generate make proto diff --git a/blog/handler/blog.go b/blog/handler/blog.go deleted file mode 100644 index b7128ec..0000000 --- a/blog/handler/blog.go +++ /dev/null @@ -1,55 +0,0 @@ -package handler - -import ( - "context" - - proto "github.com/micro/services/blog/proto" - comments "github.com/micro/services/comments/proto" - posts "github.com/micro/services/posts/proto" - tags "github.com/micro/services/tags/proto" -) - -type Blog struct { - ps posts.PostsService - cs comments.CommentsService - ts tags.TagsService -} - -func NewBlog(ps posts.PostsService, - cs comments.CommentsService, - ts tags.TagsService) *Blog { - return &Blog{ - ps: ps, - cs: cs, - ts: ts, - } -} - -func (e *Blog) Latest(ctx context.Context, req *proto.LatestRequest, rsp *proto.LatestResponse) error { - resp, err := e.ps.Query(ctx, &posts.QueryRequest{Limit: 1}) - if err != nil { - return err - } - - if len(resp.Posts) == 0 { - return nil - } - - rsp.Latest = resp.Posts[0] - - return nil -} - -func (e *Blog) Posts(ctx context.Context, req *proto.PostsRequest, rsp *proto.PostsResponse) error { - resp, err := e.ps.Query(ctx, &posts.QueryRequest{ - Limit: req.Limit, - Offset: req.Offset, - }) - - if err != nil { - return err - } - - rsp.Posts = resp.Posts - return nil -} diff --git a/blog/main.go b/blog/main.go deleted file mode 100644 index 495fc23..0000000 --- a/blog/main.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "github.com/micro/services/blog/handler" - proto "github.com/micro/services/blog/proto" - comments "github.com/micro/services/comments/proto" - posts "github.com/micro/services/posts/proto" - tags "github.com/micro/services/tags/proto" - - "github.com/micro/micro/v3/service" - "github.com/micro/micro/v3/service/logger" -) - -func main() { - // Create service - srv := service.New( - service.Name("blog"), - ) - - // Register handler - proto.RegisterBlogHandler(srv.Server(), handler.NewBlog( - posts.NewPostsService("posts", srv.Client()), - comments.NewCommentsService("comments", srv.Client()), - tags.NewTagsService("tags", srv.Client()), - )) - - // Run service - if err := srv.Run(); err != nil { - logger.Fatal(err) - } -} diff --git a/blog/micro.mu b/blog/micro.mu deleted file mode 100644 index d79115e..0000000 --- a/blog/micro.mu +++ /dev/null @@ -1 +0,0 @@ -service blog diff --git a/blog/proto/blog.pb.go b/blog/proto/blog.pb.go deleted file mode 100644 index 65b6671..0000000 --- a/blog/proto/blog.pb.go +++ /dev/null @@ -1,206 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: proto/blog.proto - -package blog - -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - proto1 "github.com/micro/services/posts/proto" - 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 LatestRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LatestRequest) Reset() { *m = LatestRequest{} } -func (m *LatestRequest) String() string { return proto.CompactTextString(m) } -func (*LatestRequest) ProtoMessage() {} -func (*LatestRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fc5203cdc85000bc, []int{0} -} - -func (m *LatestRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LatestRequest.Unmarshal(m, b) -} -func (m *LatestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LatestRequest.Marshal(b, m, deterministic) -} -func (m *LatestRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LatestRequest.Merge(m, src) -} -func (m *LatestRequest) XXX_Size() int { - return xxx_messageInfo_LatestRequest.Size(m) -} -func (m *LatestRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LatestRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LatestRequest proto.InternalMessageInfo - -type LatestResponse struct { - Latest *proto1.Post `protobuf:"bytes,1,opt,name=latest,proto3" json:"latest,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LatestResponse) Reset() { *m = LatestResponse{} } -func (m *LatestResponse) String() string { return proto.CompactTextString(m) } -func (*LatestResponse) ProtoMessage() {} -func (*LatestResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fc5203cdc85000bc, []int{1} -} - -func (m *LatestResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LatestResponse.Unmarshal(m, b) -} -func (m *LatestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LatestResponse.Marshal(b, m, deterministic) -} -func (m *LatestResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LatestResponse.Merge(m, src) -} -func (m *LatestResponse) XXX_Size() int { - return xxx_messageInfo_LatestResponse.Size(m) -} -func (m *LatestResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LatestResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LatestResponse proto.InternalMessageInfo - -func (m *LatestResponse) GetLatest() *proto1.Post { - if m != nil { - return m.Latest - } - return nil -} - -type PostsRequest struct { - Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` - Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PostsRequest) Reset() { *m = PostsRequest{} } -func (m *PostsRequest) String() string { return proto.CompactTextString(m) } -func (*PostsRequest) ProtoMessage() {} -func (*PostsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fc5203cdc85000bc, []int{2} -} - -func (m *PostsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PostsRequest.Unmarshal(m, b) -} -func (m *PostsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PostsRequest.Marshal(b, m, deterministic) -} -func (m *PostsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PostsRequest.Merge(m, src) -} -func (m *PostsRequest) XXX_Size() int { - return xxx_messageInfo_PostsRequest.Size(m) -} -func (m *PostsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PostsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PostsRequest proto.InternalMessageInfo - -func (m *PostsRequest) GetLimit() int64 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *PostsRequest) GetOffset() int64 { - if m != nil { - return m.Offset - } - return 0 -} - -type PostsResponse struct { - Posts []*proto1.Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PostsResponse) Reset() { *m = PostsResponse{} } -func (m *PostsResponse) String() string { return proto.CompactTextString(m) } -func (*PostsResponse) ProtoMessage() {} -func (*PostsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fc5203cdc85000bc, []int{3} -} - -func (m *PostsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PostsResponse.Unmarshal(m, b) -} -func (m *PostsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PostsResponse.Marshal(b, m, deterministic) -} -func (m *PostsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PostsResponse.Merge(m, src) -} -func (m *PostsResponse) XXX_Size() int { - return xxx_messageInfo_PostsResponse.Size(m) -} -func (m *PostsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PostsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PostsResponse proto.InternalMessageInfo - -func (m *PostsResponse) GetPosts() []*proto1.Post { - if m != nil { - return m.Posts - } - return nil -} - -func init() { - proto.RegisterType((*LatestRequest)(nil), "blog.LatestRequest") - proto.RegisterType((*LatestResponse)(nil), "blog.LatestResponse") - proto.RegisterType((*PostsRequest)(nil), "blog.PostsRequest") - proto.RegisterType((*PostsResponse)(nil), "blog.PostsResponse") -} - -func init() { proto.RegisterFile("proto/blog.proto", fileDescriptor_fc5203cdc85000bc) } - -var fileDescriptor_fc5203cdc85000bc = []byte{ - // 238 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x50, 0xb1, 0x4e, 0xc3, 0x30, - 0x10, 0x25, 0xb4, 0xc9, 0x70, 0xa5, 0x80, 0xae, 0x15, 0x8a, 0x32, 0x15, 0xb3, 0x30, 0xc5, 0x22, - 0xa8, 0x1b, 0x13, 0x33, 0x03, 0xca, 0x1f, 0x90, 0xc8, 0x0d, 0x96, 0x1c, 0x2e, 0xcd, 0xb9, 0x7c, - 0x3f, 0xaa, 0xcf, 0x91, 0x48, 0xb7, 0xf7, 0xde, 0xf9, 0xbd, 0x77, 0x3e, 0xb8, 0x1f, 0x46, 0xf2, - 0xa4, 0x1b, 0x47, 0x5d, 0x19, 0x20, 0x2e, 0xcf, 0xb8, 0x78, 0xe9, 0xac, 0xff, 0x3e, 0x35, 0x65, - 0x4b, 0xbd, 0xee, 0x6d, 0x3b, 0x92, 0x66, 0x33, 0xfe, 0xda, 0xd6, 0xb0, 0x1e, 0x88, 0x3d, 0x6b, - 0xf1, 0x05, 0x2c, 0x46, 0x75, 0x07, 0xeb, 0x8f, 0x2f, 0x6f, 0xd8, 0xd7, 0xe6, 0x78, 0x32, 0xec, - 0xd5, 0x1e, 0x6e, 0x27, 0x81, 0x07, 0xfa, 0x61, 0x83, 0x4f, 0x90, 0xb9, 0xa0, 0xe4, 0xc9, 0x2e, - 0x79, 0x5e, 0x55, 0xab, 0x52, 0x02, 0x3e, 0x89, 0x7d, 0x1d, 0x47, 0xea, 0x0d, 0x6e, 0xce, 0x9c, - 0x63, 0x0c, 0x6e, 0x21, 0x75, 0xb6, 0xb7, 0xe2, 0x59, 0xd4, 0x42, 0xf0, 0x01, 0x32, 0x3a, 0x1c, - 0xd8, 0xf8, 0xfc, 0x3a, 0xc8, 0x91, 0xa9, 0x0a, 0xd6, 0xd1, 0x1d, 0x3b, 0x1f, 0x21, 0x0d, 0x25, - 0x79, 0xb2, 0x5b, 0x5c, 0x56, 0xca, 0xa4, 0x3a, 0xc2, 0xf2, 0xdd, 0x51, 0x87, 0x7b, 0xc8, 0x64, - 0x61, 0xdc, 0x94, 0xe1, 0x22, 0xb3, 0xff, 0x14, 0xdb, 0xb9, 0x28, 0xf9, 0xea, 0x0a, 0x2b, 0x48, - 0x43, 0x25, 0xa2, 0x3c, 0xf8, 0xbf, 0x7d, 0xb1, 0x99, 0x69, 0x93, 0xa7, 0xc9, 0xc2, 0xcd, 0x5e, - 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x04, 0x74, 0x9b, 0x75, 0x80, 0x01, 0x00, 0x00, -} diff --git a/blog/proto/blog.pb.micro.go b/blog/proto/blog.pb.micro.go deleted file mode 100644 index 98efb27..0000000 --- a/blog/proto/blog.pb.micro.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by protoc-gen-micro. DO NOT EDIT. -// source: proto/blog.proto - -package blog - -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - _ "github.com/micro/services/posts/proto" - math "math" -) - -import ( - context "context" - api "github.com/micro/micro/v3/service/api" - client "github.com/micro/micro/v3/service/client" - server "github.com/micro/micro/v3/service/server" -) - -// 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 - -// Reference imports to suppress errors if they are not otherwise used. -var _ api.Endpoint -var _ context.Context -var _ client.Option -var _ server.Option - -// Api Endpoints for Blog service - -func NewBlogEndpoints() []*api.Endpoint { - return []*api.Endpoint{} -} - -// Client API for Blog service - -type BlogService interface { - // Latest returns the latest blog post - Latest(ctx context.Context, in *LatestRequest, opts ...client.CallOption) (*LatestResponse, error) - // Posts returns all the posts - Posts(ctx context.Context, in *PostsRequest, opts ...client.CallOption) (*PostsResponse, error) -} - -type blogService struct { - c client.Client - name string -} - -func NewBlogService(name string, c client.Client) BlogService { - return &blogService{ - c: c, - name: name, - } -} - -func (c *blogService) Latest(ctx context.Context, in *LatestRequest, opts ...client.CallOption) (*LatestResponse, error) { - req := c.c.NewRequest(c.name, "Blog.Latest", in) - out := new(LatestResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blogService) Posts(ctx context.Context, in *PostsRequest, opts ...client.CallOption) (*PostsResponse, error) { - req := c.c.NewRequest(c.name, "Blog.Posts", in) - out := new(PostsResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for Blog service - -type BlogHandler interface { - // Latest returns the latest blog post - Latest(context.Context, *LatestRequest, *LatestResponse) error - // Posts returns all the posts - Posts(context.Context, *PostsRequest, *PostsResponse) error -} - -func RegisterBlogHandler(s server.Server, hdlr BlogHandler, opts ...server.HandlerOption) error { - type blog interface { - Latest(ctx context.Context, in *LatestRequest, out *LatestResponse) error - Posts(ctx context.Context, in *PostsRequest, out *PostsResponse) error - } - type Blog struct { - blog - } - h := &blogHandler{hdlr} - return s.Handle(s.NewHandler(&Blog{h}, opts...)) -} - -type blogHandler struct { - BlogHandler -} - -func (h *blogHandler) Latest(ctx context.Context, in *LatestRequest, out *LatestResponse) error { - return h.BlogHandler.Latest(ctx, in, out) -} - -func (h *blogHandler) Posts(ctx context.Context, in *PostsRequest, out *PostsResponse) error { - return h.BlogHandler.Posts(ctx, in, out) -} diff --git a/blog/proto/blog.proto b/blog/proto/blog.proto deleted file mode 100644 index 9dd8b38..0000000 --- a/blog/proto/blog.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -package blog; - -import "github.com/micro/services/posts/proto/posts.proto"; - -service Blog { - // Latest returns the latest blog post - rpc Latest(LatestRequest) returns (LatestResponse) {} - // Posts returns all the posts - rpc Posts(PostsRequest) returns (PostsResponse) {}; -} - -message LatestRequest {} - -message LatestResponse{ - posts.Post latest = 1; -} - -message PostsRequest { - int64 limit = 1; - int64 offset = 2; -} - -message PostsResponse { - repeated posts.Post posts = 1; -} diff --git a/blog/skip b/blog/skip deleted file mode 100644 index e69de29..0000000 diff --git a/cmd/docgen/README.md b/cmd/docgen/README.md deleted file mode 100644 index a734496..0000000 --- a/cmd/docgen/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Docgen - -This scripts takes open api specs that are generated in each folder by `make proto` (see `api-users.json` and similar in each folder), and existing `README.md` and generates docs that appear on services.m3o.com. - -The readmes are taken verbatim and autogenerated client call examples are appended to them to produce an output readme, so there is no need to write curl or micro cli or any other examples. Focus on the describing the service in the readmes. - -Some rules on how to write protos so they nicely appear in the output of this script: - -- The request types (eg. `LoginRequest`) comments will be taken and used as a description for the endpoint (eg. `Login`) itself. This might change. -- The proto message field comments will be taken and displayed to craft them with care - -To provide example values use the following format: - -```shell -// rss feed name -// eg. a16z -string name = 1; -``` - -The part after the `eg. ` until the newline will be used as example value. \ No newline at end of file diff --git a/cmd/docgen/main.go b/cmd/docgen/main.go deleted file mode 100644 index 54accaf..0000000 --- a/cmd/docgen/main.go +++ /dev/null @@ -1,462 +0,0 @@ -package main - -import ( - "bytes" - "encoding/json" - "fmt" - "io" - "io/ioutil" - "log" - "net/http" - "os" - "os/exec" - "path/filepath" - "strings" - "text/template" - - "github.com/getkin/kin-openapi/openapi3" - "github.com/stoewer/go-strcase" -) - -func saveMeta(service, readme, openapiJSON, examplesJSON string, pricing map[string]int64) error { - client := &http.Client{} - - apiSpec := map[string]interface{}{ - "name": service, - "description": readme, - "open_api_json": openapiJSON, - "pricing": pricing, - "examples_json": examplesJSON, - } - - //Encode the data - postBody, _ := json.Marshal(map[string]interface{}{ - "api": apiSpec, - }) - rbody := bytes.NewBuffer(postBody) - - //Leverage Go's HTTP Post function to make request - req, err := http.NewRequest("POST", "https://api.m3o.com/publicapi/Publish", rbody) - - // Add auth headers here if needed - req.Header.Add("Authorization", `Bearer `+os.Getenv("MICRO_ADMIN_TOKEN")) - resp, err := client.Do(req) - - if err != nil { - return err - } - defer resp.Body.Close() - io.Copy(ioutil.Discard, resp.Body) - - return nil -} - -const ( - postContentPath = "docs/hugo-tania/site/content/post" - docsURL = "services.m3o.com" -) - -func main() { - files, err := ioutil.ReadDir(os.Args[1]) - if err != nil { - log.Fatal(err) - } - workDir, _ := os.Getwd() - - docPath := filepath.Join(workDir, "docs") - err = ioutil.WriteFile(filepath.Join(docPath, "CNAME"), []byte(docsURL), 0777) - if err != nil { - fmt.Printf("Failed to CNAME") - os.Exit(1) - } - - for _, f := range files { - if f.IsDir() && !strings.HasPrefix(f.Name(), ".") { - serviceDir := filepath.Join(workDir, f.Name()) - serviceFiles, err := ioutil.ReadDir(serviceDir) - if err != nil { - fmt.Println("Failed to read service dir", err) - os.Exit(1) - } - skip := false - for _, serviceFile := range serviceFiles { - if serviceFile.Name() == "skip" { - skip = true - } - } - if skip { - continue - } - - fmt.Println("Processing folder", serviceDir) - makeProto := exec.Command("make", "docs") - makeProto.Dir = serviceDir - fmt.Println(serviceDir) - outp, err := makeProto.CombinedOutput() - if err != nil { - fmt.Println("Failed to make docs", string(outp)) - os.Exit(1) - } - serviceName := f.Name() - dat, err := ioutil.ReadFile(filepath.Join(serviceDir, "README.md")) - if err != nil { - fmt.Println("Failed to read readme", string(outp)) - os.Exit(1) - } - - contentDir := filepath.Join(workDir, postContentPath) - err = os.MkdirAll(contentDir, 0777) - if err != nil { - fmt.Println("Failed to create content dir", string(outp)) - os.Exit(1) - } - - apiJSON := filepath.Join(serviceDir, "api-"+serviceName+".json") - js, err := ioutil.ReadFile(apiJSON) - if err != nil { - apiJSON := filepath.Join(serviceDir, "api-protobuf.json") - js, err = ioutil.ReadFile(apiJSON) - if err != nil { - fmt.Println("Failed to read json spec", err) - os.Exit(1) - } - } - spec := &openapi3.Swagger{} - err = json.Unmarshal(js, &spec) - if err != nil { - fmt.Println("Failed to unmarshal", err) - os.Exit(1) - } - - // not every service has examples - examples, _ := ioutil.ReadFile(filepath.Join(serviceDir, "examples.json")) - - pricingRaw, _ := ioutil.ReadFile(filepath.Join(serviceDir, "pricing.json")) - pricing := map[string]int64{} - if len(pricingRaw) > 0 { - json.Unmarshal(pricingRaw, &pricing) - } - - err = saveMeta(serviceName, string(dat), string(js), string(examples), pricing) - if err != nil { - fmt.Println("Failed to save data to publicapi service", err) - os.Exit(1) - } - - err = saveSpec(dat, contentDir, serviceName, spec) - if err != nil { - fmt.Println("Failed to save to spec file", err) - os.Exit(1) - } - - openAPIDir := filepath.Join(docPath, serviceName, "api") - err = os.MkdirAll(openAPIDir, 0777) - if err != nil { - fmt.Println("Failed to create api folder", string(outp)) - os.Exit(1) - } - - err = CopyFile(filepath.Join(serviceDir, "redoc-static.html"), filepath.Join(docPath, serviceName, "api", "index.html")) - if err != nil { - fmt.Println("Failed to copy redoc", string(outp)) - os.Exit(1) - } - - cmd := exec.Command("hugo", "-D", "-d", "../../") - cmd.Dir = filepath.Join(docPath, "hugo-tania", "site") - outp, err = cmd.CombinedOutput() - if err != nil { - fmt.Println("Build hugo site", string(outp)) - os.Exit(1) - } - } - } -} - -type specType struct { - name string - tag string - includeReadme bool - filePostFix string - titlePostFix string - template string -} - -var specTypes = []specType{ - { - name: "default markdown", - tag: "Readme", - filePostFix: ".md", - template: defTempl, - includeReadme: true, - }, - { - name: "microjs markdown", - tag: "Micro.js", - filePostFix: "-microjs.md", - titlePostFix: " Micro.js", - template: microJSTempl, - includeReadme: false, - }, -} - -var servicesToTags = map[string][]string{ - "users": []string{"Backend"}, - "helloworld": []string{"Backend"}, - "emails": []string{"Communications"}, - "sms": []string{"Communications"}, - "posts": []string{"Headless CMS"}, - "tags": []string{"Headless CMS"}, - "feeds": []string{"Headless CMS"}, - "datastore": []string{"Backend"}, - "geocoding": []string{"Logistics"}, - "places": []string{"Logistics"}, - "routing": []string{"Logistics"}, - "etas": []string{"Logistics"}, - "notes": []string{"Misc"}, - "messages": []string{"Misc"}, -} - -func saveSpec(originalMarkDown []byte, contentDir, serviceName string, spec *openapi3.Swagger) error { - for _, v := range specTypes { - fmt.Println("Processing ", v.name) - contentFile := filepath.Join(contentDir, serviceName+v.filePostFix) - var app []byte - if v.includeReadme { - app = originalMarkDown - } - tags := []string{v.tag} - serviceTags, ok := servicesToTags[serviceName] - if ok { - tags = append(tags, serviceTags...) - } - tagsString := "\n- " + strings.Join(tags, "\n- ") - - err := ioutil.WriteFile(contentFile, append([]byte("---\ntitle: "+serviceName+v.titlePostFix+"\nservicename: "+serviceName+"\nlabels: "+tagsString+"\n---\n"), app...), 0777) - if err != nil { - fmt.Printf("Failed to write post content to %v:\n%v\n", contentFile, err) - os.Exit(1) - } - fi, err := os.OpenFile(contentFile, os.O_APPEND|os.O_WRONLY, os.ModeAppend) - if err != nil { - return err - } - tmpl, err := template.New("test").Funcs(template.FuncMap{ - "params": func(p openapi3.Parameters) string { - ls := "" - for _, v := range p { - //if v.Value.In == "body" { - bs, _ := v.MarshalJSON() - ls += string(bs) + ", " - //} - } - return ls - }, - // @todo should take SpecRef here not RequestBodyRef - "schemaJSON": func(prepend int, ref string) string { - for k, v := range spec.Components.Schemas { - // ie. #/components/requestBodies/PostsSaveRequest contains - // SaveRequest, can't see any other way to correlate - if strings.HasSuffix(ref, k) { - bs, _ := json.MarshalIndent(schemaToMap(v, spec.Components.Schemas), "", strings.Repeat(" ", prepend)+" ") - // last line wont get prepended so we fix that here - parts := strings.Split(string(bs), "\n") - // skip if it's only 1 line, ie it's '{}' - if len(parts) <= 1 { - return string(bs) - } - parts[len(parts)-1] = parts[len(parts)-1] - return strings.Join(parts, "\n") - } - } - - return "Schema related to " + ref + " not found" - - }, - "schemaDescription": func(ref string) string { - for k, v := range spec.Components.Schemas { - // ie. #/components/requestBodies/PostsSaveRequest contains - // SaveRequest, can't see any other way to correlate - if strings.HasSuffix(ref, k) { - return v.Value.Description - } - } - - return "Schema related to " + ref + " not found" - }, - // turn chat/Chat/History - // to Chat History - "titleize": func(s string) string { - parts := strings.Split(s, "/") - if len(parts) > 2 { - return strings.Join(parts[2:], " ") - } - return strings.Join(parts, " ") - }, - "firstResponseRef": func(rs openapi3.Responses) string { - return rs.Get(200).Ref - }, - }).Parse(v.template) - if err != nil { - panic(err) - } - err = tmpl.Execute(fi, spec) - if err != nil { - return err - } - } - return nil -} - -func schemaToMap(spec *openapi3.SchemaRef, schemas map[string]*openapi3.SchemaRef) map[string]interface{} { - var recurse func(props map[string]*openapi3.SchemaRef) map[string]interface{} - getAtomic := func(v *openapi3.SchemaRef) interface{} { - switch v.Value.Type { - case "string": - if len(v.Value.Description) > 0 { - return strings.Replace(v.Value.Description, "\n", ".", -1) - } else { - return v.Value.Type - } - case "number": - return 1 - case "boolean": - return true - } - return "UNKOWN TYPE " + v.Value.Type - } - recurse = func(props map[string]*openapi3.SchemaRef) map[string]interface{} { - ret := map[string]interface{}{} - for k, v := range props { - k = strcase.SnakeCase(k) - - if v.Value.Type == "object" { - ret[k] = recurse(v.Value.Properties) - continue - } - if v.Value.Type == "array" { - if v.Value.Items.Value.Type != "object" { - ret[k] = []interface{}{getAtomic(v.Value.Items)} - } else { - ret[k] = []interface{}{recurse(v.Value.Items.Value.Properties)} - } - continue - } - ret[k] = getAtomic(v) - - } - return ret - } - return recurse(spec.Value.Properties) -} - -const defTempl = ` -## cURL - -{{ range $key, $value := .Paths }} -### {{ $key | titleize }} - -{{ $value.Post.RequestBody.Ref | schemaDescription }} -` + "```" + `shell -> curl 'https://api.m3o.com{{ $key }}' \ - -H 'micro-namespace: $yourNamespace' \ - -H 'authorization: Bearer $yourToken' \ - -d {{ $value.Post.RequestBody.Ref | schemaJSON 0 }}; -# Response -{{ $value.Post.Responses | firstResponseRef | schemaJSON 0 }} -` + "```" + ` - -{{ end }} -` - -const microJSTempl = ` -## Micro.js - -{{ range $key, $value := .Paths }} -### {{ $key | titleize }} - -{{ $value.Post.RequestBody.Ref | schemaDescription }} -` + "```" + `html - - -` + "```" + ` - -{{ end }} -` - -// CopyFile copies a file from src to dst. If src and dst files exist, and are -// the same, then return success. Otherise, attempt to create a hard link -// between the two files. If that fail, copy the file contents from src to dst. -// from https://stackoverflow.com/questions/21060945/simple-way-to-copy-a-file-in-golang -func CopyFile(src, dst string) (err error) { - sfi, err := os.Stat(src) - if err != nil { - return - } - if !sfi.Mode().IsRegular() { - // cannot copy non-regular files (e.g., directories, - // symlinks, devices, etc.) - return fmt.Errorf("CopyFile: non-regular source file %s (%q)", sfi.Name(), sfi.Mode().String()) - } - dfi, err := os.Stat(dst) - if err != nil { - if !os.IsNotExist(err) { - return - } - } else { - if !(dfi.Mode().IsRegular()) { - return fmt.Errorf("CopyFile: non-regular destination file %s (%q)", dfi.Name(), dfi.Mode().String()) - } - if os.SameFile(sfi, dfi) { - return - } - } - if err = os.Link(src, dst); err == nil { - return - } - err = copyFileContents(src, dst) - return -} - -// copyFileContents copies the contents of the file named src to the file named -// by dst. The file will be created if it does not already exist. If the -// destination file exists, all it's contents will be replaced by the contents -// of the source file. -func copyFileContents(src, dst string) (err error) { - in, err := os.Open(src) - if err != nil { - return - } - defer in.Close() - out, err := os.Create(dst) - if err != nil { - return - } - defer func() { - cerr := out.Close() - if err == nil { - err = cerr - } - }() - if _, err = io.Copy(out, in); err != nil { - return - } - err = out.Sync() - return -} diff --git a/comments/.gitignore b/comments/.gitignore deleted file mode 100644 index 6e54133..0000000 --- a/comments/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ - -comment-service diff --git a/comments/Dockerfile b/comments/Dockerfile deleted file mode 100644 index 74f8e06..0000000 --- a/comments/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM alpine -ADD comments-service /comments-service -ENTRYPOINT [ "/comments-service" ] diff --git a/comments/Makefile b/comments/Makefile deleted file mode 100644 index 0da996e..0000000 --- a/comments/Makefile +++ /dev/null @@ -1,27 +0,0 @@ - -GOPATH:=$(shell go env GOPATH) -MODIFY=Mgithub.com/micro/micro/proto/api/api.proto=github.com/micro/micro/v3/proto/api - -.PHONY: proto -proto: - - protoc --openapi_out=. --proto_path=. --micro_out=${MODIFY}:. --go_out=${MODIFY}:. proto/comments.proto - -.PHONY: docs -docs: - - protoc --openapi_out=. --proto_path=. --micro_out=${MODIFY}:. --go_out=${MODIFY}:. proto/comments.proto - @redoc-cli bundle api-comments.json - -.PHONY: build -build: proto - - go build -o comments-service *.go - -.PHONY: test -test: - go test -v ./... -cover - -.PHONY: docker -docker: - docker build . -t comments-service:latest diff --git a/comments/README.md b/comments/README.md deleted file mode 100644 index e743b9c..0000000 --- a/comments/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Comments Service - -Still yet to implement diff --git a/comments/generate.go b/comments/generate.go deleted file mode 100644 index 7d9db91..0000000 --- a/comments/generate.go +++ /dev/null @@ -1,3 +0,0 @@ -package main - -//go:generate make proto diff --git a/comments/handler/comments.go b/comments/handler/comments.go deleted file mode 100644 index e999246..0000000 --- a/comments/handler/comments.go +++ /dev/null @@ -1,46 +0,0 @@ -package handler - -import ( - "context" - "time" - - "github.com/google/uuid" - "github.com/micro/dev/model" - "github.com/micro/micro/v3/service/store" - pb "github.com/micro/services/comments/proto" -) - -type Comments struct { - comments model.Model - idIndex model.Index - postIndex model.Index -} - -func NewComments() *Comments { - postIndex := model.ByEquality("post") - postIndex.Order.Type = model.OrderTypeDesc - postIndex.Order.FieldName = "created" - - idIndex := model.ByEquality("id") - idIndex.Order.Type = model.OrderTypeUnordered - - return &Comments{ - comments: model.New(store.DefaultStore, "users", model.Indexes(postIndex), nil), - postIndex: postIndex, - idIndex: idIndex, - } -} - -func (c *Comments) New(ctx context.Context, req *pb.NewRequest, rsp *pb.NewResponse) error { - return c.comments.Save(pb.Comment{ - Id: uuid.New().String(), - Post: req.Post, - Author: req.Author, - Message: req.Message, - Created: time.Now().Unix(), - }) -} - -func (c *Comments) List(ctx context.Context, req *pb.ListRequest, rsp *pb.ListResponse) error { - return c.comments.List(c.postIndex.ToQuery(req.Post), &rsp.Comments) -} diff --git a/comments/main.go b/comments/main.go deleted file mode 100644 index 2f22b82..0000000 --- a/comments/main.go +++ /dev/null @@ -1,22 +0,0 @@ -package main - -import ( - "github.com/micro/micro/v3/service" - "github.com/micro/micro/v3/service/logger" - "github.com/micro/services/comments/handler" -) - -func main() { - // Create the service - srv := service.New( - service.Name("comments"), - ) - - // Register Handler - srv.Handle(handler.NewComments()) - - // Run service - if err := srv.Run(); err != nil { - logger.Fatal(err) - } -} diff --git a/comments/micro.mu b/comments/micro.mu deleted file mode 100644 index aea6436..0000000 --- a/comments/micro.mu +++ /dev/null @@ -1 +0,0 @@ -service comments \ No newline at end of file diff --git a/comments/proto/comments.pb.go b/comments/proto/comments.pb.go deleted file mode 100644 index 5ee63c4..0000000 --- a/comments/proto/comments.pb.go +++ /dev/null @@ -1,459 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.15.5 -// source: proto/comments.proto - -package comments - -import ( - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type Comment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Post string `protobuf:"bytes,2,opt,name=post,proto3" json:"post,omitempty"` - Author string `protobuf:"bytes,3,opt,name=author,proto3" json:"author,omitempty"` - Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` - Created int64 `protobuf:"varint,5,opt,name=created,proto3" json:"created,omitempty"` -} - -func (x *Comment) Reset() { - *x = Comment{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_comments_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Comment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Comment) ProtoMessage() {} - -func (x *Comment) ProtoReflect() protoreflect.Message { - mi := &file_proto_comments_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Comment.ProtoReflect.Descriptor instead. -func (*Comment) Descriptor() ([]byte, []int) { - return file_proto_comments_proto_rawDescGZIP(), []int{0} -} - -func (x *Comment) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Comment) GetPost() string { - if x != nil { - return x.Post - } - return "" -} - -func (x *Comment) GetAuthor() string { - if x != nil { - return x.Author - } - return "" -} - -func (x *Comment) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *Comment) GetCreated() int64 { - if x != nil { - return x.Created - } - return 0 -} - -type NewRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // post id - Post string `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"` - // message to leave - Author string `protobuf:"bytes,2,opt,name=author,proto3" json:"author,omitempty"` - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *NewRequest) Reset() { - *x = NewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_comments_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NewRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NewRequest) ProtoMessage() {} - -func (x *NewRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_comments_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NewRequest.ProtoReflect.Descriptor instead. -func (*NewRequest) Descriptor() ([]byte, []int) { - return file_proto_comments_proto_rawDescGZIP(), []int{1} -} - -func (x *NewRequest) GetPost() string { - if x != nil { - return x.Post - } - return "" -} - -func (x *NewRequest) GetAuthor() string { - if x != nil { - return x.Author - } - return "" -} - -func (x *NewRequest) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -type NewResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *NewResponse) Reset() { - *x = NewResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_comments_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NewResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NewResponse) ProtoMessage() {} - -func (x *NewResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_comments_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NewResponse.ProtoReflect.Descriptor instead. -func (*NewResponse) Descriptor() ([]byte, []int) { - return file_proto_comments_proto_rawDescGZIP(), []int{2} -} - -type ListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Post string `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"` -} - -func (x *ListRequest) Reset() { - *x = ListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_comments_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListRequest) ProtoMessage() {} - -func (x *ListRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_comments_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. -func (*ListRequest) Descriptor() ([]byte, []int) { - return file_proto_comments_proto_rawDescGZIP(), []int{3} -} - -func (x *ListRequest) GetPost() string { - if x != nil { - return x.Post - } - return "" -} - -type ListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Comments []*Comment `protobuf:"bytes,1,rep,name=comments,proto3" json:"comments,omitempty"` -} - -func (x *ListResponse) Reset() { - *x = ListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_comments_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListResponse) ProtoMessage() {} - -func (x *ListResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_comments_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListResponse.ProtoReflect.Descriptor instead. -func (*ListResponse) Descriptor() ([]byte, []int) { - return file_proto_comments_proto_rawDescGZIP(), []int{4} -} - -func (x *ListResponse) GetComments() []*Comment { - if x != nil { - return x.Comments - } - return nil -} - -var File_proto_comments_proto protoreflect.FileDescriptor - -var file_proto_comments_proto_rawDesc = []byte{ - 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x22, 0x79, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x52, 0x0a, 0x0a, 0x4e, - 0x65, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, - 0x0d, 0x0a, 0x0b, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, - 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x73, - 0x74, 0x22, 0x3d, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x32, 0x79, 0x0a, 0x08, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x03, - 0x4e, 0x65, 0x77, 0x12, 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4e, - 0x65, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x37, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x10, 0x5a, 0x0e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_comments_proto_rawDescOnce sync.Once - file_proto_comments_proto_rawDescData = file_proto_comments_proto_rawDesc -) - -func file_proto_comments_proto_rawDescGZIP() []byte { - file_proto_comments_proto_rawDescOnce.Do(func() { - file_proto_comments_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_comments_proto_rawDescData) - }) - return file_proto_comments_proto_rawDescData -} - -var file_proto_comments_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_proto_comments_proto_goTypes = []interface{}{ - (*Comment)(nil), // 0: comments.Comment - (*NewRequest)(nil), // 1: comments.NewRequest - (*NewResponse)(nil), // 2: comments.NewResponse - (*ListRequest)(nil), // 3: comments.ListRequest - (*ListResponse)(nil), // 4: comments.ListResponse -} -var file_proto_comments_proto_depIdxs = []int32{ - 0, // 0: comments.ListResponse.comments:type_name -> comments.Comment - 1, // 1: comments.Comments.New:input_type -> comments.NewRequest - 3, // 2: comments.Comments.List:input_type -> comments.ListRequest - 2, // 3: comments.Comments.New:output_type -> comments.NewResponse - 4, // 4: comments.Comments.List:output_type -> comments.ListResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_proto_comments_proto_init() } -func file_proto_comments_proto_init() { - if File_proto_comments_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_comments_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Comment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_comments_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_comments_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NewResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_comments_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_comments_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_comments_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_comments_proto_goTypes, - DependencyIndexes: file_proto_comments_proto_depIdxs, - MessageInfos: file_proto_comments_proto_msgTypes, - }.Build() - File_proto_comments_proto = out.File - file_proto_comments_proto_rawDesc = nil - file_proto_comments_proto_goTypes = nil - file_proto_comments_proto_depIdxs = nil -} diff --git a/comments/proto/comments.pb.micro.go b/comments/proto/comments.pb.micro.go deleted file mode 100644 index ccff854..0000000 --- a/comments/proto/comments.pb.micro.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by protoc-gen-micro. DO NOT EDIT. -// source: proto/comments.proto - -package comments - -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" -) - -import ( - context "context" - api "github.com/micro/micro/v3/service/api" - client "github.com/micro/micro/v3/service/client" - server "github.com/micro/micro/v3/service/server" -) - -// 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 - -// Reference imports to suppress errors if they are not otherwise used. -var _ api.Endpoint -var _ context.Context -var _ client.Option -var _ server.Option - -// Api Endpoints for Comments service - -func NewCommentsEndpoints() []*api.Endpoint { - return []*api.Endpoint{} -} - -// Client API for Comments service - -type CommentsService interface { - New(ctx context.Context, in *NewRequest, opts ...client.CallOption) (*NewResponse, error) - List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (*ListResponse, error) -} - -type commentsService struct { - c client.Client - name string -} - -func NewCommentsService(name string, c client.Client) CommentsService { - return &commentsService{ - c: c, - name: name, - } -} - -func (c *commentsService) New(ctx context.Context, in *NewRequest, opts ...client.CallOption) (*NewResponse, error) { - req := c.c.NewRequest(c.name, "Comments.New", in) - out := new(NewResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *commentsService) List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (*ListResponse, error) { - req := c.c.NewRequest(c.name, "Comments.List", in) - out := new(ListResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for Comments service - -type CommentsHandler interface { - New(context.Context, *NewRequest, *NewResponse) error - List(context.Context, *ListRequest, *ListResponse) error -} - -func RegisterCommentsHandler(s server.Server, hdlr CommentsHandler, opts ...server.HandlerOption) error { - type comments interface { - New(ctx context.Context, in *NewRequest, out *NewResponse) error - List(ctx context.Context, in *ListRequest, out *ListResponse) error - } - type Comments struct { - comments - } - h := &commentsHandler{hdlr} - return s.Handle(s.NewHandler(&Comments{h}, opts...)) -} - -type commentsHandler struct { - CommentsHandler -} - -func (h *commentsHandler) New(ctx context.Context, in *NewRequest, out *NewResponse) error { - return h.CommentsHandler.New(ctx, in, out) -} - -func (h *commentsHandler) List(ctx context.Context, in *ListRequest, out *ListResponse) error { - return h.CommentsHandler.List(ctx, in, out) -} diff --git a/comments/proto/comments.proto b/comments/proto/comments.proto deleted file mode 100644 index 5104d44..0000000 --- a/comments/proto/comments.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package comments; -option go_package = "./proto;comments"; - -service Comments { - rpc New(NewRequest) returns (NewResponse) {} - rpc List(ListRequest) returns (ListResponse) {} -} - -message Comment { - string id = 1; - string post = 2; - string author = 3; - string message = 4; - int64 created = 5; -} - -message NewRequest { - // post id - string post = 1; - // message to leave - string author = 2; - string message = 3; -} - -message NewResponse {} - -message ListRequest{ - string post = 1; -} - -message ListResponse{ - repeated Comment comments = 1; -} diff --git a/comments/skip b/comments/skip deleted file mode 100644 index e69de29..0000000 diff --git a/docs/hugo-tania/.gitignore b/docs/hugo-tania/.gitignore deleted file mode 100644 index 388bf7f..0000000 --- a/docs/hugo-tania/.gitignore +++ /dev/null @@ -1 +0,0 @@ -exampleSite/resources \ No newline at end of file diff --git a/docs/hugo-tania/LICENSE b/docs/hugo-tania/LICENSE deleted file mode 100644 index a00fd7a..0000000 --- a/docs/hugo-tania/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 WingLim - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/docs/hugo-tania/README.md b/docs/hugo-tania/README.md deleted file mode 100644 index 3b47b3a..0000000 --- a/docs/hugo-tania/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# Hugo Theme Tania - -A simple theme for bloggers. - -## Demo - -[Example Site](https://hugo-tania.netlify.app/) - -[![Netlify Status](https://api.netlify.com/api/v1/badges/bae5db51-7cc6-41e2-9615-029ade8aa264/deploy-status)](https://app.netlify.com/sites/hugo-tania/deploys) - -## Introduction -Most of the styles for this theme come from [taniarascia.com](https://github.com/taniarascia/taniarascia.com) - -I like it's style, so I transplant it to Hugo. - -And is that why this theme called Tania. - -Thank Tania Rascia again. - -Here is some features: - -- Dark mode(It can switch automatically or manually) -- Footnotes(Float on the right side) - -## Usage - -### Installation - -In your site's root dir - -```bash -git submodule add https://github.com/WingLim/hugo-tania themes/hugo-tania -``` - -Edit your site config following `site/config.yaml`. - -### Params - -`titleEmoji` will show before the blog title on site navbar. - -```yaml -titleEmoji: '😎' -``` - -`socialOptions` will show on index bio with `_index.md` content. -Account with icon can set as below: -```yaml -socialOptions: - dev-to: - facebook: - github: - instagram: - linkedin: - medium: - stack-overflow: - telegram: - twitter: - twitch: - whatsapp: -``` - -### Layout - -`articles` layout is for showing all articles you write. - -Add `articles.md` to site `content` dir, and write as below: - -```markdown ---- -title: Articles -subtitle: Posts, tutorials, snippets, musings, and everything else. -date: 2020-11-26 -type: section -layout: "archives" ---- -``` - -## Thanks to -- [你好黑暗,我的老朋友 —— 为网站添加用户友好的深色模式支持](https://blog.skk.moe/post/hello-darkmode-my-old-friend/) -- [Footnotes, citations, and sidenotes](https://prose.yihui.org/about/#footnotes-citations-and-sidenotes) - -## License - -[MIT](https://github.com/WingLim/hugo-tania/blob/main/LICENSE) diff --git a/docs/hugo-tania/assets/js/features.js b/docs/hugo-tania/assets/js/features.js deleted file mode 100644 index 4e55902..0000000 --- a/docs/hugo-tania/assets/js/features.js +++ /dev/null @@ -1,171 +0,0 @@ -renderFootnotes = function () { - const removeEl = (el) => { - if (!el) return; - el.remove ? el.remove() : el.parentNode.removeChild(el); - }; - - const insertAfter = (target, sib) => { - target.after ? target.after(sib) : ( - target.parentNode.insertBefore(sib, target.nextSibling) - ); - }; - - const insideOut = (el) => { - var p = el.parentNode, x = el.innerHTML, - c = document.createElement('div'); // a tmp container - insertAfter(p, c); - c.appendChild(el); - el.innerHTML = ''; - el.appendChild(p); - p.innerHTML = x; // let the original parent have the content of its child - insertAfter(c, c.firstElementChild); - removeEl(c); - }; - - document.querySelectorAll('.footnotes > ol > li[id^="fn"], #refs > div[id^="ref-"]').forEach(function (fn) { - a = document.querySelectorAll('a[href="#' + fn.id + '"]'); - if (a.length === 0) return; - a.forEach(function (el) { el.removeAttribute('href') }); - a = a[0]; - side = document.createElement('div'); - side.className = 'side side-right'; - if (/^fn/.test(fn.id)) { - side.innerHTML = fn.innerHTML; - var number = a.innerText; // footnote number - side.firstElementChild.innerHTML = '' + number + - ' ' + side.firstElementChild.innerHTML; - removeEl(side.querySelector('a[href^="#fnref"]')); // remove backreference - a.parentNode.tagName === 'SUP' && insideOut(a); - } else { - side.innerHTML = fn.outerHTML; - a = a.parentNode; - } - insertAfter(a, side); - a.classList.add('note-ref'); - removeEl(fn); - }) - document.querySelectorAll('.footnotes, #refs').forEach(function (fn) { - var items = fn.children; - if (fn.id === 'refs') return items.length === 0 && removeEl(fn); - // there must be a
and an
    left - if (items.length !== 2 || items[0].tagName !== 'HR' || items[1].tagName !== 'OL') return; - items[1].childElementCount === 0 && removeEl(fn); - }); -}(); - -renderAnchor = function () { - for (let num = 1; num <= 6; num++) { - // search h1-h6 - const headers = document.querySelectorAll('.article-post>h' + num); - for (let i = 0; i < headers.length; i++) { - const header = headers[i]; - // add anchor before h1-h6 - header.innerHTML = `${header.innerHTML}`; - } - } -}(); - -switchDarkMode = function () { - const rootElement = document.documentElement; // - const darkModeStorageKey = 'user-color-scheme'; // use as localStorage's key - const rootElementDarkModeAttributeName = 'data-user-color-scheme'; - const darkModeTogglebuttonElement = document.getElementById('dark-mode-button'); - - const setLS = (k, v) => { - try { - localStorage.setItem(k, v); - } catch (e) { } - } - - const removeLS = (k) => { - try { - localStorage.removeItem(k); - } catch (e) { } - } - - const getLS = (k) => { - try { - return localStorage.getItem(k); - } catch (e) { - return null // the same as localStorage.getItem() get nothing - } - } - - const getModeFromCSSMediaQuery = () => { - // use matchMedia API - return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light' - } - - const resetRootDarkModeAttributeAndLS = () => { - rootElement.removeAttribute(rootElementDarkModeAttributeName); - removeLS(darkModeStorageKey); - } - - const validColorModeKeys = { - 'dark': true, - 'light': true - } - - const modeIcons = { - 'dark': '☀️', - 'light': '🌙' - } - - const setModeButtonIcon = (mode) => { - darkModeTogglebuttonElement.innerHTML = modeIcons[mode] - } - - const applyCustomDarkModeSettings = (mode) => { - // receive user's operation or get previous mode from localStorage - const currentSetting = mode || getLS(darkModeStorageKey); - - if (currentSetting === getModeFromCSSMediaQuery()) { - // When the user selected mode equal prefers-color-scheme - // reset and restored to automatic mode - nowMode = getModeFromCSSMediaQuery() - resetRootDarkModeAttributeAndLS(); - } else if (validColorModeKeys[currentSetting]) { - nowMode = currentSetting - rootElement.setAttribute(rootElementDarkModeAttributeName, currentSetting); - } else { - // 首次访问或从未使用过开关、localStorage 中没有存储的值,currentSetting 是 null - // 或者 localStorage 被篡改,currentSetting 不是合法值 - nowMode = getModeFromCSSMediaQuery() - resetRootDarkModeAttributeAndLS(); - } - setModeButtonIcon(nowMode) - } - - const invertDarkModeObj = { - 'dark': 'light', - 'light': 'dark' - } - - const toggleCustomDarkMode = () => { - let currentSetting = getLS(darkModeStorageKey); - - if (validColorModeKeys[currentSetting]) { - // get mode from localStorage and set the opposite - currentSetting = invertDarkModeObj[currentSetting]; - } else if (currentSetting === null) { - // if get null from localStorage - // get mode from prefers-color-scheme and set the opposite - currentSetting = invertDarkModeObj[getModeFromCSSMediaQuery()]; - } else { - // get anything error, return - return; - } - // set opposite mode into localStorage - setLS(darkModeStorageKey, currentSetting); - - return currentSetting; - } - - // when page loaded set page mode - applyCustomDarkModeSettings(); - - darkModeTogglebuttonElement.addEventListener('click', () => { - // handle user click switch dark mode button - applyCustomDarkModeSettings(toggleCustomDarkMode()); - }) -}(); \ No newline at end of file diff --git a/docs/hugo-tania/assets/sass/base/_dark.scss b/docs/hugo-tania/assets/sass/base/_dark.scss deleted file mode 100644 index 40264d3..0000000 --- a/docs/hugo-tania/assets/sass/base/_dark.scss +++ /dev/null @@ -1,51 +0,0 @@ -@media (prefers-color-scheme: dark) { - :root { - --color-mode: dark; - } - - :root:not([data-user-color-scheme]) { - --h1-color: white; - --font-color: #b3b9c5; - --heading-color: #ffd479; - --dark-font-color: #ced4da; - --background: #1f2022; - --medium-font-color: #dee2e6; - --light-font-color: #868e96; - --light-background: #2D2D31; - --light-background-hover: #3b3b3e; - --code-background-color: #2e2e30; - --border: #404040; - --link-color: #6ab0f3; - --link-color-darker: #4a72a5; - --link-hover-color: #e1a6f2; - --navbar-color: #1d1d1d; - --blockquote: #2b2b2b; - --blockquote-left: #191919; - --transparent-text: rgba(255, 255, 255, 0.7); - --transparent-bg: rgba(0, 0, 0, 0.2); - --light-transparent-bg: rgba(255, 255, 255, 0.05); - } -} - -[data-user-color-scheme='dark'] { - --h1-color: white; - --font-color: #b3b9c5; - --heading-color: #ffd479; - --dark-font-color: #ced4da; - --background: #1f2022; - --medium-font-color: #dee2e6; - --light-font-color: #868e96; - --light-background: #2D2D31; - --light-background-hover: #3b3b3e; - --code-background-color: #2e2e30; - --border: #404040; - --link-color: #6ab0f3; - --link-color-darker: #4a72a5; - --link-hover-color: #e1a6f2; - --navbar-color: #1d1d1d; - --blockquote: #2b2b2b; - --blockquote-left: #191919; - --transparent-text: rgba(255, 255, 255, 0.7); - --transparent-bg: rgba(0, 0, 0, 0.2); - --light-transparent-bg: rgba(255, 255, 255, 0.05); -} \ No newline at end of file diff --git a/docs/hugo-tania/assets/sass/base/_grid.scss b/docs/hugo-tania/assets/sass/base/_grid.scss deleted file mode 100644 index 5c62eec..0000000 --- a/docs/hugo-tania/assets/sass/base/_grid.scss +++ /dev/null @@ -1,29 +0,0 @@ -/* Grid and flex */ - -.flex { - display: flex; - align-items: center; -} - -.flex-row { - display: flex; - flex-direction: column; -} - -@media screen and (min-width: 800px) { - .flex-row { - flex-direction: row; - } -} - -.flex-col { - flex: 1; -} - -.flex-two-thirds { - flex: 2; -} - -.justify-center { - justify-content: center; -} \ No newline at end of file diff --git a/docs/hugo-tania/assets/sass/base/_headings.scss b/docs/hugo-tania/assets/sass/base/_headings.scss deleted file mode 100644 index b9c3d15..0000000 --- a/docs/hugo-tania/assets/sass/base/_headings.scss +++ /dev/null @@ -1,171 +0,0 @@ -/* Headings */ - -h1 { - color: var(--h1-color); -} - -h3, -h4 { - color: var(--medium-font-color); -} - -h2, -h5 { - color: var(--heading-color); -} - -h1, -h2, -h3, -h4, -h5 { - margin: 0 0 1.5rem 0; - font-weight: 700; - line-height: 1.2; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -h1:not(:first-child), -h2:not(:first-child), -h3:not(:first-child), -h4:not(:first-child) { - margin-top: 3rem; -} - -h1 { - font-size: 2.5rem; - line-height: 1.1; -} - -h2 { - font-size: 1.75rem; - padding-bottom: 0.5rem; - border-bottom: 4px solid var(--light-background); - - code { - font-size: 1.75rem !important; - } -} - -h3 { - font-size: 1.5rem; - color: var(--font-color); - font-weight: 600; - margin-bottom: 1rem; - - code { - font-size: 1.4rem !important; - } -} - -h4 { - font-size: 1.3rem; - color: var(--font-color); - font-weight: 500; - margin-bottom: 1rem; - border-bottom: 2px solid var(--light-background); - padding-bottom: 0.25rem; -} - -h5 { - font-size: 1.2rem; - margin-bottom: 1rem; -} - -@media screen and (min-width: 800px) { - h1 { - font-size: 3rem; - } - - h2 { - font-size: 1.9rem; - - code { - font-size: 1.9rem !important; - } - } - - h3 { - font-size: 1.7rem; - color: var(--font-color); - font-weight: 600; - - code { - font-size: 1.6rem !important; - } - } - - h4 { - font-weight: 400; - font-size: 1.4rem; - } -} - -a { - &.link { - display: block; - padding: 0.25rem 0; - margin: 0.25rem 0; - border-radius: 0.35rem; - font-weight: 600; - color: var(--dark-font-color); - - &:hover { - color: var(--link-color); - } - } - - &.button { - display: inline-block; - border: 2px solid var(--link-color); - padding: 0.3rem 0.6rem; - margin-right: 0.75rem; - font-weight: 500; - background: var(--link-color); - color: white; - border-radius: 0.35rem; - font-size: 0.9rem; - - &.large { - padding: 0.8rem 1rem; - font-size: 1.05rem; - } - - &.secondary { - border: 2px solid #edf2ff; - background: #edf2ff; - color: #3b5bdb; - } - - &:hover, &.secondary:hover { - border: 2px solid var(--link-color-darker); - background: var(--link-color-darker); - color: white; - } - } -} - -@media screen and (min-width: 800px) { - a.button { - font-size: 0.9rem; - - &.large { - padding: 1rem 1.5rem; - font-size: 1.1rem; - } - } -} - -p.subtitle { - color: var(--medium-font-color); - font-size: 1.3rem; - font-weight: 300; - margin-bottom: 0; -} - -@media screen and (min-width: 800px) { - p.subtitle { - font-size: 1.5rem; - } -} \ No newline at end of file diff --git a/docs/hugo-tania/assets/sass/base/_links.scss b/docs/hugo-tania/assets/sass/base/_links.scss deleted file mode 100644 index b5b51a3..0000000 --- a/docs/hugo-tania/assets/sass/base/_links.scss +++ /dev/null @@ -1,19 +0,0 @@ -/* Links */ - -a { - color: inherit; - text-decoration: none; - - &.image-link { - border-width: 0; - } - - code[class*='language-'] { - color: var(--link-color) !important; - - &:hover { - background: var(--link-color) !important; - color: white !important; - } - } -} diff --git a/docs/hugo-tania/assets/sass/base/_normalize.scss b/docs/hugo-tania/assets/sass/base/_normalize.scss deleted file mode 100644 index 3591806..0000000 --- a/docs/hugo-tania/assets/sass/base/_normalize.scss +++ /dev/null @@ -1,379 +0,0 @@ -/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ - -/* Document - ========================================================================== */ - -/** - * 1. Correct the line height in all browsers. - * 2. Prevent adjustments of font size after orientation changes in iOS. - */ - -html { - line-height: 1.15; - /* 1 */ - -webkit-text-size-adjust: 100%; - /* 2 */ -} - -/* Sections - ========================================================================== */ - -/** - * Remove the margin in all browsers. - */ - -body { - margin: 0; -} - -/** - * Render the `main` element consistently in IE. - */ - -main { - display: block; -} - -/** - * Correct the font size and margin on `h1` elements within `section` and - * `article` contexts in Chrome, Firefox, and Safari. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/* Grouping content - ========================================================================== */ - -/** - * 1. Add the correct box sizing in Firefox. - * 2. Show the overflow in Edge and IE. - */ - -hr { - box-sizing: content-box; - /* 1 */ - height: 0; - /* 1 */ - overflow: visible; - /* 2 */ -} - -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ - -pre { - font-family: monospace, monospace; - /* 1 */ - font-size: 1em; - /* 2 */ -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Remove the gray background on active links in IE 10. - */ - -a { - background-color: transparent; -} - -/** - * 1. Remove the bottom border in Chrome 57- - * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. - */ - -abbr[title] { - border-bottom: none; - /* 1 */ - text-decoration: underline; - /* 2 */ - text-decoration: underline dotted; - /* 2 */ -} - -/** - * Add the correct font weight in Chrome, Edge, and Safari. - */ - -b, -strong { - font-weight: bolder; -} - -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ - -code, -kbd, -samp { - font-family: monospace, monospace; - /* 1 */ - font-size: 1em; - /* 2 */ -} - -/** - * Add the correct font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` elements from affecting the line height in - * all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove the border on images inside links in IE 10. - */ - -img { - border-style: none; -} - -/* Forms - ========================================================================== */ - -/** - * 1. Change the font styles in all browsers. - * 2. Remove the margin in Firefox and Safari. - */ - -button, -input, -optgroup, -select, -textarea { - font-family: inherit; - /* 1 */ - font-size: 100%; - /* 1 */ - line-height: 1.15; - /* 1 */ - margin: 0; - /* 2 */ -} - -/** - * Show the overflow in IE. - * 1. Show the overflow in Edge. - */ - -button, -input { - /* 1 */ - overflow: visible; -} - -/** - * Remove the inheritance of text transform in Edge, Firefox, and IE. - * 1. Remove the inheritance of text transform in Firefox. - */ - -button, -select { - /* 1 */ - text-transform: none; -} - -/** - * Correct the inability to style clickable types in iOS and Safari. - */ - -button, -[type="button"], -[type="reset"], -[type="submit"] { - -webkit-appearance: button; -} - -/** - * Remove the inner border and padding in Firefox. - */ - -button::-moz-focus-inner, -[type="button"]::-moz-focus-inner, -[type="reset"]::-moz-focus-inner, -[type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; -} - -/** - * Restore the focus styles unset by the previous rule. - */ - -button:-moz-focusring, -[type="button"]:-moz-focusring, -[type="reset"]:-moz-focusring, -[type="submit"]:-moz-focusring { - outline: 1px dotted ButtonText; -} - -/** - * Correct the padding in Firefox. - */ - -fieldset { - padding: 0.35em 0.75em 0.625em; -} - -/** - * 1. Correct the text wrapping in Edge and IE. - * 2. Correct the color inheritance from `fieldset` elements in IE. - * 3. Remove the padding so developers are not caught out when they zero out - * `fieldset` elements in all browsers. - */ - -legend { - box-sizing: border-box; - /* 1 */ - color: inherit; - /* 2 */ - display: table; - /* 1 */ - max-width: 100%; - /* 1 */ - padding: 0; - /* 3 */ - white-space: normal; - /* 1 */ -} - -/** - * Add the correct vertical alignment in Chrome, Firefox, and Opera. - */ - -progress { - vertical-align: baseline; -} - -/** - * Remove the default vertical scrollbar in IE 10+. - */ - -textarea { - overflow: auto; -} - -/** - * 1. Add the correct box sizing in IE 10. - * 2. Remove the padding in IE 10. - */ - -[type="checkbox"], -[type="radio"] { - box-sizing: border-box; - /* 1 */ - padding: 0; - /* 2 */ -} - -/** - * Correct the cursor style of increment and decrement buttons in Chrome. - */ - -[type="number"]::-webkit-inner-spin-button, -[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Correct the odd appearance in Chrome and Safari. - * 2. Correct the outline style in Safari. - */ - -[type="search"] { - -webkit-appearance: textfield; - /* 1 */ - outline-offset: -2px; - /* 2 */ -} - -/** - * Remove the inner padding in Chrome and Safari on macOS. - */ - -[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * 1. Correct the inability to style clickable types in iOS and Safari. - * 2. Change font properties to `inherit` in Safari. - */ - -::-webkit-file-upload-button { - -webkit-appearance: button; - /* 1 */ - font: inherit; - /* 2 */ -} - -/* Interactive - ========================================================================== */ - -/* - * Add the correct display in Edge, IE 10+, and Firefox. - */ - -details { - display: block; -} - -/* - * Add the correct display in all browsers. - */ - -summary { - display: list-item; -} - -/* Misc - ========================================================================== */ - -/** - * Add the correct display in IE 10+. - */ - -template { - display: none; -} - -/** - * Add the correct display in IE 10. - */ - -[hidden] { - display: none; -} \ No newline at end of file diff --git a/docs/hugo-tania/assets/sass/base/_reset.scss b/docs/hugo-tania/assets/sass/base/_reset.scss deleted file mode 100644 index 62f0ef4..0000000 --- a/docs/hugo-tania/assets/sass/base/_reset.scss +++ /dev/null @@ -1,5 +0,0 @@ -*, -*::before, -*::after { - box-sizing: border-box; -} \ No newline at end of file diff --git a/docs/hugo-tania/assets/sass/base/_scaffolding.scss b/docs/hugo-tania/assets/sass/base/_scaffolding.scss deleted file mode 100644 index 13e83d2..0000000 --- a/docs/hugo-tania/assets/sass/base/_scaffolding.scss +++ /dev/null @@ -1,179 +0,0 @@ -/* Scaffolding */ - -html { - font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Roboto', - Roboto, Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI', - 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; - color: var(--font-color); - font-weight: 400; - font-size: 1rem; - line-height: 1.75; -} - -body { - background: var(--background); - margin: 0; - padding: 0; -} - -section { - margin: 2rem 0; - - &:first-of-type { - margin-top: 0; - } - - >h2 { - display: flex; - align-items: center; - font-size: 1.6rem; - margin-top: 0; - margin-bottom: 0.5rem; - } -} - -@media screen and (min-width: 800px) { - section>h2 { - margin-bottom: 2rem; - } -} - -.index h2, -section>h2 { - border-bottom-width: 0; -} - -@media screen and (min-width: 800px) { - - .index h2, - section>h2 { - border-bottom-width: 4px; - } -} - -a.section-button { - font-weight: 500; - background: var(--light-background); - color: var(--dark-font-color); - padding: 0.4rem 0.6rem; - font-size: 0.8rem; - border-radius: 0.3rem; - border-width: 0 !important; - white-space: nowrap; - line-height: 1; - margin-left: 2rem; - margin-top: 0.5rem; - - &:hover { - background: var(--light-background-hover); - color: var(--heading-color); - } -} - -@media screen and (min-width: 800px) { - section { - margin: 3.5rem 0; - - >h2 { - font-size: 2rem; - margin: 0 0 1rem; - } - } -} - -.container { - max-width: 1025px; - padding: 0 1.5rem; - margin-left: auto; - margin-right: auto; - - &.page p { - max-width: 600px; - } -} - -@media screen and (min-width: 800px) { - .container { - padding: 0 2rem; - } -} - -img { - display: inline-block; - max-width: 100%; - height: auto; -} - -p, -ol, -ul, -dl, -table, -blockquote { - font-size: 1.05rem; - margin: 0 0 1.5rem 0; -} - -ul { - padding: 0 1rem; -} - -@media screen and (min-width: 800px) { - - p, - ol, - ul, - dl, - table, - blockquote { - font-size: 1.125rem; - } - - ul { - padding: 0 2rem; - } -} - -ul li p { - margin: 0; -} - -ul li ul { - padding-left: 1rem; - margin: 0; -} - -ul li ul li { - margin: 0; -} - -ol li ol { - margin-bottom: 0; -} - -.task-list-item [type='checkbox'] { - margin-right: 0.5rem; -} - -blockquote { - margin: 2rem 0; - padding: 1rem; - background: var(--blockquote); - font-weight: 400; - border-left: 5px solid var(--blockquote-left); -} - -blockquote :not(pre)>code[class*='language-'] { - background: rgba(0, 0, 0, 0.1) !important; -} - -@media screen and (min-width: 800px) { - blockquote { - padding: 2rem 0 2rem 2rem; - } -} - -::selection { - background: #3b5bdb; - color: white; -} diff --git a/docs/hugo-tania/assets/sass/base/_variables.scss b/docs/hugo-tania/assets/sass/base/_variables.scss deleted file mode 100644 index d2a2c85..0000000 --- a/docs/hugo-tania/assets/sass/base/_variables.scss +++ /dev/null @@ -1,21 +0,0 @@ -:root { - --color-mode: light; - --h1-color: #343a40; - --font-color: #495057; - --heading-color: #343a40; - --background: white; - --dark-font-color: #1b1d25; - --medium-font-color: #60656c; - --light-font-color: #858b93; - --light-background: #f1f4f8; - --light-background-hover: #e1e6ed; - --border: #d6d9de; - --link-color: #5183f5; - --link-color-darker: #364fc7; - --navbar-color: #1b1d25; - --blockquote: #f9f9f9; - --blockquote-left: #e3e6eb; - --transparent-text: rgba(0, 0, 0, 0.7); - --transparent-bg: rgba(0, 0, 0, 0.05); - --light-transparent-bg: rgba(255, 255, 255, 0.1); -} diff --git a/docs/hugo-tania/assets/sass/components/_bio.scss b/docs/hugo-tania/assets/sass/components/_bio.scss deleted file mode 100644 index f8122a2..0000000 --- a/docs/hugo-tania/assets/sass/components/_bio.scss +++ /dev/null @@ -1,11 +0,0 @@ -.my { - padding-top: 2rem; - a { - border: none; - margin-right: 1rem; - - &:hover { - border: none; - } - } -} diff --git a/docs/hugo-tania/assets/sass/components/_footer.scss b/docs/hugo-tania/assets/sass/components/_footer.scss deleted file mode 100644 index 422426f..0000000 --- a/docs/hugo-tania/assets/sass/components/_footer.scss +++ /dev/null @@ -1,77 +0,0 @@ -/* Footer */ - -.footer { - padding: 2rem 0; - - >.flex { - flex-direction: column; - align-items: center; - justify-content: center; - } - - img { - height: 30px; - width: 30px; - } - - a { - border-radius: 0.35rem; - margin: 0 0.05rem; - font-weight: 400; - font-size: 1rem; - border: 1px solid transparent; - padding: 0.5rem; - margin: 0 0.5rem; - color: var(--light-font-color); - - &:hover { - color: var(--heading-color); - background: var(--light-background); - } - - &.img { - display: flex; - align-items: center; - padding: 0; - margin: 0 0.75rem; - background: none; - } - } -} - -.footer-links { - display: flex; - align-items: center; - justify-content: center; - flex-wrap: wrap; -} - -.flex nav { - padding: 1rem 0; -} - -@media screen and (min-width: 800px) { - .footer { - >.flex { - align-items: flex-start; - margin-left: -1.5rem; - margin-right: -1.5rem; - } - - a { - padding: 0.75rem; - - &.img { - padding: 0 0.5rem; - margin: 0 1rem; - } - } - } - -} - -@media print { - .footer { - display: none; - } -} \ No newline at end of file diff --git a/docs/hugo-tania/assets/sass/components/_helpers.scss b/docs/hugo-tania/assets/sass/components/_helpers.scss deleted file mode 100644 index 5370374..0000000 --- a/docs/hugo-tania/assets/sass/components/_helpers.scss +++ /dev/null @@ -1,18 +0,0 @@ -/* Helpers */ - -.small { - max-width: 600px; -} - -time, -.meta { - color: var(--light-font-color); - font-size: 0.85rem; - white-space: nowrap; - font-weight: 400; -} - -.meta { - color: var(--medium-font-color); - font-size: 1rem; -} \ No newline at end of file diff --git a/docs/hugo-tania/assets/sass/components/_highlight.scss b/docs/hugo-tania/assets/sass/components/_highlight.scss deleted file mode 100644 index 50f7743..0000000 --- a/docs/hugo-tania/assets/sass/components/_highlight.scss +++ /dev/null @@ -1,165 +0,0 @@ -$code-font-size: 0.9rem !default; -$code-color: #f8f8f2 !default; -$code-background: #373b41 !default; -$gray: #cacaca !default; -$code-font-family: Consolas, Monaco, Menlo, "DejaVu Sans Mono", - "Bitstream Vera Sans Mono", "Courier New", monospace !default; - -code, pre { - font-size: $code-font-size; - font-family: $code-font-family; - background: $code-background; -} - -:not(pre) > code { - color: var(--dark-font-color); - background: var(--light-background); -} - -code { - padding: 3px 5px; - border-radius: 4px; - color: $code-color; -} - -pre > code { - display: block; -} - -.highlight > .chroma { - margin: 0; - - border-radius: 5px; - overflow-x: auto; - box-shadow: 1px 1px 2px rgba(0,0,0,0.125); - position: relative; - background: $code-background; - - code { - padding: 30px 10px 10px; - } - - code[data-lang]::before { - position: absolute; - top: 0; - right: 0; - left: 0; - padding: 2px 10px; - width: 100%; - height: 30px; - font-size: $code-font-size; - line-height: 1.9; - font-weight: bold; - color: #b1b1b1; - background: darken($code-background, 3%); - content: attr(data-lang); - } - - table { - position: relative; - border: none; - - code { - padding: 0; - } - } - - - - .lntd { - &:first-child { - width: 10px; - - pre { - margin: 0; - padding: 30px 7px 10px; - } - } - - &:last-child { - vertical-align: top; - - pre { - margin: 0; - padding: 30px 10px 10px; - } - } - } - - table, tr, td { - margin: 0; - padding: 0; - width: 100%; - border-collapse: collapse; - border: none; - } - - /* LineHighlight */ .hl { display: block; width: 100%;background-color: black } - /* LineNumbersTable */ .lnt { color: #7f7f7f } - /* LineNumbers */ .ln { padding: 0 0.4em 0 0.4em;color: #7f7f7f } - - .err { color: #960050 } /* Error */ - .c { color: #999999 } /* Comment */ - .err { color: #f2777a } /* Error */ - .k { color: #cc99cc } /* Keyword */ - .l { color: #f99157 } /* Literal */ - .n { color: #cccccc } /* Name */ - .o { color: #66cccc } /* Operator */ - .p { color: #cccccc } /* Punctuation */ - .cm { color: #999999 } /* Comment.Multiline */ - .cp { color: #999999 } /* Comment.Preproc */ - .c1 { color: #999999 } /* Comment.Single */ - .cs { color: #999999 } /* Comment.Special */ - .gd { color: #f2777a } /* Generic.Deleted */ - .ge { font-style: italic } /* Generic.Emph */ - .gh { color: #cccccc; font-weight: bold } /* Generic.Heading */ - .gi { color: #99cc99 } /* Generic.Inserted */ - .gp { color: #999999; font-weight: bold } /* Generic.Prompt */ - .gs { font-weight: bold } /* Generic.Strong */ - .gu { color: #66cccc; font-weight: bold } /* Generic.Subheading */ - .kc { color: #cc99cc } /* Keyword.Constant */ - .kd { color: #cc99cc } /* Keyword.Declaration */ - .kn { color: #66cccc } /* Keyword.Namespace */ - .kp { color: #cc99cc } /* Keyword.Pseudo */ - .kr { color: #cc99cc } /* Keyword.Reserved */ - .kt { color: #ffcc66 } /* Keyword.Type */ - .ld { color: #99cc99 } /* Literal.Date */ - .m { color: #f99157 } /* Literal.Number */ - .s { color: #99cc99 } /* Literal.String */ - .na { color: #6699cc } /* Name.Attribute */ - .nb { color: #cccccc } /* Name.Builtin */ - .nc { color: #ffcc66 } /* Name.Class */ - .no { color: #f2777a } /* Name.Constant */ - .nd { color: #66cccc } /* Name.Decorator */ - .ni { color: #cccccc } /* Name.Entity */ - .ne { color: #f2777a } /* Name.Exception */ - .nf { color: #6699cc } /* Name.Function */ - .nl { color: #cccccc } /* Name.Label */ - .nn { color: #ffcc66 } /* Name.Namespace */ - .nx { color: #6699cc } /* Name.Other */ - .py { color: #cccccc } /* Name.Property */ - .nt { color: #66cccc } /* Name.Tag */ - .nv { color: #f2777a } /* Name.Variable */ - .ow { color: #66cccc } /* Operator.Word */ - .w { color: #cccccc } /* Text.Whitespace */ - .mf { color: #f99157 } /* Literal.Number.Float */ - .mh { color: #f99157 } /* Literal.Number.Hex */ - .mi { color: #f99157 } /* Literal.Number.Integer */ - .mo { color: #f99157 } /* Literal.Number.Oct */ - .sb { color: #99cc99 } /* Literal.String.Backtick */ - .sc { color: #cccccc } /* Literal.String.Char */ - .sd { color: #999999 } /* Literal.String.Doc */ - .s2 { color: #99cc99 } /* Literal.String.Double */ - .se { color: #f99157 } /* Literal.String.Escape */ - .sh { color: #99cc99 } /* Literal.String.Heredoc */ - .si { color: #f99157 } /* Literal.String.Interpol */ - .sx { color: #99cc99 } /* Literal.String.Other */ - .sr { color: #99cc99 } /* Literal.String.Regex */ - .s1 { color: #99cc99 } /* Literal.String.Single */ - .ss { color: #99cc99 } /* Literal.String.Symbol */ - .bp { color: #cccccc } /* Name.Builtin.Pseudo */ - .vc { color: #f2777a } /* Name.Variable.Class */ - .vg { color: #f2777a } /* Name.Variable.Global */ - .vi { color: #f2777a } /* Name.Variable.Instance */ - .il { color: #f99157 } /* Literal.Number.Integer.Long */ -} diff --git a/docs/hugo-tania/assets/sass/components/_navbar.scss b/docs/hugo-tania/assets/sass/components/_navbar.scss deleted file mode 100644 index 0c115dd..0000000 --- a/docs/hugo-tania/assets/sass/components/_navbar.scss +++ /dev/null @@ -1,166 +0,0 @@ -/* Navbar */ - -main { - margin-top: 50px; -} - -@media screen and (min-width: 800px) { - main { - margin-top: 0; - } -} - -.emoji { - margin: 0 0.4rem 0 0.1rem; -} - -.navbar { - width: 100%; - position: fixed; - top: 0; - left: 0; - background: var(--navbar-color); - box-shadow: 0 3px 13px rgba(100, 110, 140, 0.1), - 0 2px 4px rgba(100, 110, 140, 0.15); - z-index: 2; - padding: 0.5rem; - - .flex { - justify-content: space-between; - } - - a { - border-radius: 0.35rem; - margin: 0 0.05rem; - color: rgba(255, 255, 255, 0.65); - font-weight: 400; - font-size: 0.85rem; - border: 1px solid transparent; - padding: 0 0.3rem; - background: transparent; - - &:first-of-type { - margin-left: -1rem; - } - - .emoji { - display: none; - } - - &.brand { - font-weight: 500; - color: white; - white-space: nowrap; - border: none; - display: flex; - align-items: center; - line-height: 1; - background: transparent; - - .emoji { - display: inline-block !important; - } - - img { - height: 22px; - width: 22px; - } - } - } - - button { - font-size: 1rem; - margin-right: -1rem; - } -} - -@media screen and (min-width: 500px) { - .navbar a { - font-size: 0.95rem; - padding: 0.5rem; - } -} - -@media screen and (min-width: 800px) { - .emoji { - margin: 0 0.5rem 0 0.1rem; - } - - .navbar { - position: static; - padding: 1.5rem 0; - background: transparent; - box-shadow: none; - - .flex { - justify-content: space-between; - } - - a { - padding: 0.75rem 1.25rem; - margin: 0 0.25rem; - font-size: 1.2rem; - font-weight: 400; - color: var(--font-color); - - &:first-of-type { - margin-left: -1.5rem; - } - - &:hover, &[aria-current='page'] { - background: var(--light-background); - color: var(--dark-font-color); - } - - &.brand { - font-size: 1.3rem; - margin-right: 3rem; - border: none; - background: transparent !important; - color: var(--dark-font-color); - - &:hover { - background: var(--light-background) !important; - } - - img { - height: 26px; - width: 26px; - margin-right: 0.25rem; - } - } - } - } - - #dark-mode-button:hover { - background: var(--light-background); - } -} - -@media print { - .navbar { - display: none; - } -} - -#dark-mode-button { - display: flex; - border: none; - padding: 0.2rem 0.7rem 0.2rem 0.5rem; - border-radius: 0.35rem; - box-sizing: content-box; - cursor: pointer; - font-size: 1.1rem; - background: transparent; - - &:focus { - outline: none; - } -} - -@media screen and (min-width: 800px) { - #dark-mode-button { - padding: 0.95rem 0.75rem; - font-size: 1.2rem; - } -} \ No newline at end of file diff --git a/docs/hugo-tania/assets/sass/components/_post.scss b/docs/hugo-tania/assets/sass/components/_post.scss deleted file mode 100644 index 55eff00..0000000 --- a/docs/hugo-tania/assets/sass/components/_post.scss +++ /dev/null @@ -1,173 +0,0 @@ -/* Post */ - -header { - padding: 1.5rem 0; - - h1 { - font-size: 2rem; - display: inline-block; - font-weight: 600; - margin-top: 1rem; - } - - u { - display: inline-block; - text-decoration: none; - padding: 0.4rem 0; - } -} - -.article-header { - padding-top: 2rem; - margin-bottom: 0.5rem; - - .container { - padding-left: 0; - padding-right: 0; - } - - .thumb { - display: flex; - flex-direction: column; - } - - h1 { - font-weight: 700; - font-size: 1.8rem; - margin: 0; - } - - .description { - font-size: 1.2rem; - color: var(--light-font-color); - font-weight: 300; - margin-top: 2rem; - margin-bottom: 0; - } -} - -.post-meta { - margin-top: 1rem; - padding: 0; - color: var(--light-font-color); - font-size: 0.9rem; - - a { - color: var(--font-color); - border-width: 0; - } - - time { - margin-top: 0.2rem; - font-size: 0.9rem; - } - - .tags { - margin-top: 0.5rem; - - a { - text-decoration: none; - } - } -} - -.article-post { - margin-bottom: 2rem; - - a { - box-shadow: 0px -2px 0px rgba(189, 195, 199, 0.5) inset; - transition: all .3s ease; - - &:hover { - box-shadow: 0px -10px 0px rgba(189, 195, 199, 0.7) inset; - } - } - - @for $i from 1 through 6 { - h#{$i} { - .anchor { - stroke: var(--link-color); - stroke-width: 1px; - fill: var(--link-color); - font-weight: 700; - left: -0.25rem; - border-width: 0; - float: left; - line-height: 1; - margin-left: -20px; - padding-right: 4px; - box-shadow: none; - transition: none; - - .icon { - visibility: hidden; - } - } - - &:hover { - .anchor { - box-shadow: none; - .icon { - visibility: visible; - } - } - } - } - } -} - -@media screen and (min-width: 800px) { - .article-post { - margin-bottom: 3rem; - } - - .article-post h1, - .article-post h2, - .article-post h3, - .article-post h4, - .article-post h5 { - padding-top: 1rem; - } - - .post-meta { - margin-top: 1.5rem; - padding: 1rem 0; - } - - header h1 { - font-size: 3rem; - margin-top: 2rem; - } - - header u { - background: linear-gradient(transparent 85%, #bac8ff 0); - } - - .article-header { - padding-top: 3rem; - - h1 { - padding-top: 0; - font-size: 2.5rem; - } - - .thumb { - flex-direction: row; - } - - .description { - font-size: 1.8rem; - line-height: 1.5; - } - } -} - -@media screen and (min-width: 1100px) { - .article-header h1 { - font-size: 2.5rem; - } -} - -.post-thumbnail { - display: block !important; -} diff --git a/docs/hugo-tania/assets/sass/components/_post_tag.scss b/docs/hugo-tania/assets/sass/components/_post_tag.scss deleted file mode 100644 index 7ee6af6..0000000 --- a/docs/hugo-tania/assets/sass/components/_post_tag.scss +++ /dev/null @@ -1,26 +0,0 @@ -.new-post, -.popular-post { - display: inline-block; - color: #111; - padding: 0.3rem 0.4rem; - border-radius: 0.3rem; - font-size: 0.85rem; - margin-left: 1rem; -} - -.new-post { - background: #d3f9d8; -} - -.popular-post { - background: #dce6fd; - color: var(--heading-color); -} - -@media screen and (min-width: 800px) { - - .new-post, - .popular-post { - margin-bottom: 0; - } -} \ No newline at end of file diff --git a/docs/hugo-tania/assets/sass/components/_posts.scss b/docs/hugo-tania/assets/sass/components/_posts.scss deleted file mode 100644 index e2456af..0000000 --- a/docs/hugo-tania/assets/sass/components/_posts.scss +++ /dev/null @@ -1,68 +0,0 @@ -/* Posts */ - -.post-row { - display: flex; - align-items: center; - width: 100%; - - time { - display: block; - flex: 0 0 65px; - } - - h3 { - flex: 1; - } -} - -.posts .post:last-of-type a { - border-bottom-width: 0; -} - -.post { - a { - display: flex; - align-items: center; - justify-content: stretch; - padding: 1rem 0; - border-bottom: 2px solid var(--light-background); - - &:hover { - border-radius: 0.3rem; - } - } - - h3 { - margin-top: 0.1rem; - margin-bottom: 0; - font-size: 1.1rem; - font-weight: 600; - } -} - - -@media screen and (min-width: 800px) { - .posts { - margin-left: -1rem; - margin-right: -1rem; - } - - .post { - a { - padding: 0.75rem 1rem; - border-bottom-color: transparent; - - &:hover { - background: var(--light-background); - } - } - - h3 { - font-size: 1.3rem; - } - } - - .post-row time { - flex: 0 0 80px; - } -} \ No newline at end of file diff --git a/docs/hugo-tania/assets/sass/components/_projects.scss b/docs/hugo-tania/assets/sass/components/_projects.scss deleted file mode 100644 index 5e8358a..0000000 --- a/docs/hugo-tania/assets/sass/components/_projects.scss +++ /dev/null @@ -1,58 +0,0 @@ -/* Projects */ - -.projects .project:last-of-type { - border-bottom-width: 0; -} - -.project { - display: flex; - align-items: center; - justify-content: space-between; - padding: 0.75rem 0; - border-bottom: 2px solid var(--light-background); - - .icon { - font-size: 1.5rem; - width: 40px; - } - - a { - display: flex; - align-items: center; - margin-bottom: 0.25rem; - border-width: 0; - - &:hover h3 { - text-decoration: underline; - } - - &.button { - margin-left: 1.5rem; - border-width: 2px; - } - } - - h3 { - font-size: 1.2rem; - margin: 0; - } - - .description { - font-size: 1.1rem; - color: var(--light-font-color); - } -} - -@media screen and (min-width: 800px) { - .project { - border-bottom-width: 0; - - h3 { - font-size: 1.3rem; - } - - .description { - font-size: 1rem; - } - } -} \ No newline at end of file diff --git a/docs/hugo-tania/assets/sass/components/_side.scss b/docs/hugo-tania/assets/sass/components/_side.scss deleted file mode 100644 index f668854..0000000 --- a/docs/hugo-tania/assets/sass/components/_side.scss +++ /dev/null @@ -1,57 +0,0 @@ -.side { - width: 200px; - margin: 0 auto; -} - -.side-right { - float: right; - clear: right; - margin-right: calc(-200px - 2em); - - p { - font-size: .9rem; - } -} - -.note-ref { - cursor: pointer; - border: none; - - &:hover { - border: none; - } -} - -.bg-number { - background: var(--light-background); - font-size: .9rem; - color: var(--font-color); - text-decoration: none; - padding: 1px 5px; - border-radius: 5px; -} - -@media (max-width: 1280px) { - .side { - width: 100%; - padding: 0 2em; - } - - .side-right { - float: none; - clear: both; - margin: 1em auto; - background: none; - } -} - -@media (min-width: 1280px) { - - .note-ref:hover ~ .side { - display: inline-block; - position: absolute; - margin-left: 1rem; - padding: .5rem; - box-sizing: content-box; - } -} diff --git a/docs/hugo-tania/assets/sass/components/_suggested.scss b/docs/hugo-tania/assets/sass/components/_suggested.scss deleted file mode 100644 index 631de29..0000000 --- a/docs/hugo-tania/assets/sass/components/_suggested.scss +++ /dev/null @@ -1,46 +0,0 @@ -/* Suggested */ - -.suggested { - flex-direction: column; - align-items: stretch; - margin-left: -1rem; - margin-right: -1rem; - padding: 0; - - span { - font-weight: 400; - display: block; - font-size: 0.9rem; - color: var(--transparent-text); - } - - a { - background: none; - margin: 0.5rem 1rem; - border-bottom: none; - transition: all 0.2s ease; - padding: 1.5rem; - border-radius: 0.35rem; - color: var(--heading-color); - border: 1px solid #eeeeee; - - &:hover { - transform: translate3D(0, -1px, 0); - background: var(--light-background-hover); - } - } -} - -@media screen and (min-width: 800px) { - .suggested { - flex-direction: row; - - a { - flex: 0 0 calc(50% - 2rem); - - &:first-of-type { - text-align: right; - } - } - } -} diff --git a/docs/hugo-tania/assets/sass/components/_table.scss b/docs/hugo-tania/assets/sass/components/_table.scss deleted file mode 100644 index b173a62..0000000 --- a/docs/hugo-tania/assets/sass/components/_table.scss +++ /dev/null @@ -1,49 +0,0 @@ -/* Tables */ - -table { - border-collapse: separate; - border-spacing: 0; - width: 100%; - max-width: 100%; - overflow-x: auto; -} - -thead, -tbody { - white-space: nowrap; -} - -th { - border-bottom: 2px solid var(--border); -} - -tfoot th { - border-top: 1px solid var(--border); -} - -td { - border-bottom: 1px solid var(--border); -} - -th, -td { - text-align: left; - padding: 0.75rem; - hyphens: auto; -} - -tbody tr:nth-child(even) { - background-color: var(--light-background); -} - -@media screen and (min-width: 800px) { - table { - display: table; - border: 1px solid var(--border); - } - - thead, - tbody { - white-space: normal; - } -} \ No newline at end of file diff --git a/docs/hugo-tania/assets/sass/components/_tags.scss b/docs/hugo-tania/assets/sass/components/_tags.scss deleted file mode 100644 index 2f011e9..0000000 --- a/docs/hugo-tania/assets/sass/components/_tags.scss +++ /dev/null @@ -1,74 +0,0 @@ -/* Tags */ - -.count { - font-weight: 700; - color: var(--link-color); -} - -.tags { - display: flex !important; - flex-wrap: wrap; - align-items: center; - margin-left: -0.5rem; - margin-right: -0.5rem; - - >a { - display: block; - font-weight: 500; - background: var(--light-background); - color: var(--font-color); - margin: 0.2rem; - padding: 0.5rem 0.6rem; - font-size: 0.8rem; - border-radius: 0.3rem; - border-bottom: 0; - white-space: nowrap; - line-height: 1; - - &:hover { - background: var(--light-background-hover); - color: var(--heading-color); - } - } -} - -mark { - background: #ffec99; -} - -.utterances { - margin-left: -4px; - margin-right: -4px; -} - -kbd { - background-color: #f7f7f7; - border: 2px solid rgba(0, 0, 0, 0.3); - border-radius: 3px; - box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 0 0 2px #fff; - color: #333; - display: inline-block; - font-family: Helvetica Neue, Inter, -apple-system, BlinkMacSystemFont, - Helvetica, Arial, sans-serif; - line-height: 1.4; - margin: 0 0.1em; - padding: 0.1em 0.6em; - text-shadow: 0 1px 0 #fff; - font-size: 14px; -} - -#comments { - margin-top: 3rem; -} - -#comments h2 { - margin: 0; -} - -@media print { - - .comments, - #comments { - display: none; - } -} \ No newline at end of file diff --git a/docs/hugo-tania/assets/sass/components/_terms.scss b/docs/hugo-tania/assets/sass/components/_terms.scss deleted file mode 100644 index 0f3b374..0000000 --- a/docs/hugo-tania/assets/sass/components/_terms.scss +++ /dev/null @@ -1,15 +0,0 @@ -.terms { - a { - padding: .75rem 1.25rem; - margin: 0 .25rem; - font-size: 1.2rem; - font-weight: 400; - color: var(--font-color); - border-radius: .35rem; - - &:hover { - background: var(--light-background); - color: var(--dark-font-color); - } - } -} \ No newline at end of file diff --git a/docs/hugo-tania/assets/sass/main.scss b/docs/hugo-tania/assets/sass/main.scss deleted file mode 100644 index 474b7f4..0000000 --- a/docs/hugo-tania/assets/sass/main.scss +++ /dev/null @@ -1,26 +0,0 @@ -@import "base/normalize"; -@import "base/reset"; -@import "base/variables"; -@import "base/grid"; -@import "base/scaffolding"; -@import "base/headings"; -@import "base/links"; - - -@import "components/navbar"; -@import "components/bio"; -@import "components/posts"; -@import "components/post_tag"; -@import "components/footer"; -@import "components/helpers"; -@import "components/table"; -@import "components/tags"; - -@import "components/post"; -@import "components/highlight"; -@import "components/side"; -@import "components/suggested"; -@import "components/projects"; -@import "components/terms"; - -@import "base/dark"; \ No newline at end of file diff --git a/docs/hugo-tania/images/screenshot.png b/docs/hugo-tania/images/screenshot.png deleted file mode 100644 index ee96f4a..0000000 Binary files a/docs/hugo-tania/images/screenshot.png and /dev/null differ diff --git a/docs/hugo-tania/images/tn.png b/docs/hugo-tania/images/tn.png deleted file mode 100644 index 92e0035..0000000 Binary files a/docs/hugo-tania/images/tn.png and /dev/null differ diff --git a/docs/hugo-tania/layouts/404.html b/docs/hugo-tania/layouts/404.html deleted file mode 100644 index c7d0697..0000000 --- a/docs/hugo-tania/layouts/404.html +++ /dev/null @@ -1,9 +0,0 @@ -{{ partial "header.html" . }} - -
    -
    -

    404 NOT FOUND

    -
    -
    - -{{ partial "footer.html" . }} diff --git a/docs/hugo-tania/layouts/_default/archives.html b/docs/hugo-tania/layouts/_default/archives.html deleted file mode 100644 index 574e329..0000000 --- a/docs/hugo-tania/layouts/_default/archives.html +++ /dev/null @@ -1,41 +0,0 @@ -{{ define "main" }} - -
    -
    -

    {{ .Title }}

    -

    {{ .Params.subtitle }}

    -
    -
    - -{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} - -
    -
    -
    - {{ range $pages.GroupByDate "2006" }} -
    -
    - {{ range.Pages }} -
    - -
    -

    - {{ .Title }} -

    - -
    - -
    -
    - {{ .Summary }} -
    -
    - {{ end }} -
    -
    - {{ end }} -
    -
    -
    - -{{ end }} diff --git a/docs/hugo-tania/layouts/_default/baseof.html b/docs/hugo-tania/layouts/_default/baseof.html deleted file mode 100644 index 4bfc30b..0000000 --- a/docs/hugo-tania/layouts/_default/baseof.html +++ /dev/null @@ -1,12 +0,0 @@ - - - {{ partial "head.html" . }} - - - {{ partial "header.html" . }} -
    - {{ block "main" . }}{{ end }} -
    - {{ partial "footer.html" . }} - - \ No newline at end of file diff --git a/docs/hugo-tania/layouts/_default/index.html b/docs/hugo-tania/layouts/_default/index.html deleted file mode 100644 index dfdaa92..0000000 --- a/docs/hugo-tania/layouts/_default/index.html +++ /dev/null @@ -1,94 +0,0 @@ -{{ define "main" }} - -
    -
    -
    - {{ with.Content }} - {{ . }} - {{ end }} -
    - {{ range $name, $path := $.Param "socialOptions" }} - {{ if (and $path (ne $name "email")) }} - - {{ partial (print "svgs/social/" $name ".svg") (dict "width" 25 "height" 25) }} - - {{ end }} - {{ end }} -
    -
    -
    -
    - -{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} -{{ $projects := where .Site.RegularPages "Section" "projects" }} - -
    -
    -
    - {{ $pages = .Site.Taxonomies.labels.readme }} - {{ range $i,$e := $pages }} - - {{if modBool $i 2}} - - {{ end }} - - {{ end }} - - -
    -
    - {{ if gt (len $projects) 0}} -
    -

    Projects

    -
    - {{ range $projects.ByWeight }} -
    -
    - -
    {{ .Params.icon }}
    -

    {{ .Title }}

    -
    -
    {{ .Params.description }}
    -
    -
    - Source -
    -
    - {{ end }} -
    -
    - {{ end }} -
    - -{{ end }} diff --git a/docs/hugo-tania/layouts/_default/list.html b/docs/hugo-tania/layouts/_default/list.html deleted file mode 100644 index c1bf98d..0000000 --- a/docs/hugo-tania/layouts/_default/list.html +++ /dev/null @@ -1,37 +0,0 @@ -{{ define "main" }} - -{{ $pages := .Pages }} -{{ $pages = (.Paginate $pages).Pages }} - -
    -
    -

    {{ .Title }}

    -

    - {{ len $pages }} posts found. -

    -
    -
    - -
    -
    -
    -
    -
    - {{ range $pages }} -
    - -
    - -

    {{ .Title }}

    -
    - -
    -
    - {{ end }} -
    -
    -
    -
    -
    - -{{ end }} diff --git a/docs/hugo-tania/layouts/_default/single.html b/docs/hugo-tania/layouts/_default/single.html deleted file mode 100644 index b7d9e91..0000000 --- a/docs/hugo-tania/layouts/_default/single.html +++ /dev/null @@ -1,39 +0,0 @@ -{{ define "main" }} - -
    - - -
    - {{ .Content }} -
    -
    - -{{ end }} diff --git a/docs/hugo-tania/layouts/_default/terms.html b/docs/hugo-tania/layouts/_default/terms.html deleted file mode 100644 index 1054cb0..0000000 --- a/docs/hugo-tania/layouts/_default/terms.html +++ /dev/null @@ -1,22 +0,0 @@ -{{ define "main" }} - -{{ $pages := .Pages }} -{{ $pages = (.Paginate $pages).Pages }} - -
    -
    -

    {{ .Title }}

    -
    -
    - -
    -
    -
    - {{ range (index .Site.Taxonomies (.Title | lower)) }} - {{ .Page.Title }} {{ .Count }} - {{ end }} -
    -
    -
    - -{{ end }} diff --git a/docs/hugo-tania/layouts/partials/footer.html b/docs/hugo-tania/layouts/partials/footer.html deleted file mode 100644 index ab04728..0000000 --- a/docs/hugo-tania/layouts/partials/footer.html +++ /dev/null @@ -1,21 +0,0 @@ - \ No newline at end of file diff --git a/docs/hugo-tania/layouts/partials/head.html b/docs/hugo-tania/layouts/partials/head.html deleted file mode 100644 index 214005b..0000000 --- a/docs/hugo-tania/layouts/partials/head.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - {{ with .Title }} {{ . }} | {{ end }}{{ .Site.Title }} - - - {{ $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint }} - - \ No newline at end of file diff --git a/docs/hugo-tania/layouts/partials/header.html b/docs/hugo-tania/layouts/partials/header.html deleted file mode 100644 index 51cb88f..0000000 --- a/docs/hugo-tania/layouts/partials/header.html +++ /dev/null @@ -1,22 +0,0 @@ - \ No newline at end of file diff --git a/docs/hugo-tania/layouts/partials/svgs/social/dev-to.svg b/docs/hugo-tania/layouts/partials/svgs/social/dev-to.svg deleted file mode 100644 index b3c5a58..0000000 --- a/docs/hugo-tania/layouts/partials/svgs/social/dev-to.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/hugo-tania/layouts/partials/svgs/social/email.svg b/docs/hugo-tania/layouts/partials/svgs/social/email.svg deleted file mode 100644 index ae33aad..0000000 --- a/docs/hugo-tania/layouts/partials/svgs/social/email.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/hugo-tania/layouts/partials/svgs/social/facebook.svg b/docs/hugo-tania/layouts/partials/svgs/social/facebook.svg deleted file mode 100644 index 8481d2d..0000000 --- a/docs/hugo-tania/layouts/partials/svgs/social/facebook.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/hugo-tania/layouts/partials/svgs/social/github.svg b/docs/hugo-tania/layouts/partials/svgs/social/github.svg deleted file mode 100644 index 5fd37b4..0000000 --- a/docs/hugo-tania/layouts/partials/svgs/social/github.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/hugo-tania/layouts/partials/svgs/social/instagram.svg b/docs/hugo-tania/layouts/partials/svgs/social/instagram.svg deleted file mode 100644 index f3a53d9..0000000 --- a/docs/hugo-tania/layouts/partials/svgs/social/instagram.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/hugo-tania/layouts/partials/svgs/social/linkedin.svg b/docs/hugo-tania/layouts/partials/svgs/social/linkedin.svg deleted file mode 100644 index 02ff296..0000000 --- a/docs/hugo-tania/layouts/partials/svgs/social/linkedin.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/docs/hugo-tania/layouts/partials/svgs/social/medium.svg b/docs/hugo-tania/layouts/partials/svgs/social/medium.svg deleted file mode 100644 index e991b01..0000000 --- a/docs/hugo-tania/layouts/partials/svgs/social/medium.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/docs/hugo-tania/layouts/partials/svgs/social/stack-overflow.svg b/docs/hugo-tania/layouts/partials/svgs/social/stack-overflow.svg deleted file mode 100644 index 015cbac..0000000 --- a/docs/hugo-tania/layouts/partials/svgs/social/stack-overflow.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/hugo-tania/layouts/partials/svgs/social/steam.svg b/docs/hugo-tania/layouts/partials/svgs/social/steam.svg deleted file mode 100644 index 068dc97..0000000 --- a/docs/hugo-tania/layouts/partials/svgs/social/steam.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/hugo-tania/layouts/partials/svgs/social/telegram.svg b/docs/hugo-tania/layouts/partials/svgs/social/telegram.svg deleted file mode 100644 index 6830505..0000000 --- a/docs/hugo-tania/layouts/partials/svgs/social/telegram.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/hugo-tania/layouts/partials/svgs/social/twitch.svg b/docs/hugo-tania/layouts/partials/svgs/social/twitch.svg deleted file mode 100644 index c750505..0000000 --- a/docs/hugo-tania/layouts/partials/svgs/social/twitch.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/hugo-tania/layouts/partials/svgs/social/twitter.svg b/docs/hugo-tania/layouts/partials/svgs/social/twitter.svg deleted file mode 100644 index 224e8d8..0000000 --- a/docs/hugo-tania/layouts/partials/svgs/social/twitter.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/hugo-tania/layouts/partials/svgs/social/whatsapp.svg b/docs/hugo-tania/layouts/partials/svgs/social/whatsapp.svg deleted file mode 100644 index e0e3da4..0000000 --- a/docs/hugo-tania/layouts/partials/svgs/social/whatsapp.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/hugo-tania/layouts/rss.xml b/docs/hugo-tania/layouts/rss.xml deleted file mode 100644 index ac5be26..0000000 --- a/docs/hugo-tania/layouts/rss.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} - {{ .Permalink }} - Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} - Hugo -- gohugo.io{{ with .Site.LanguageCode }} - {{.}}{{end}}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} - {{.}}{{end}}{{ if not .Date.IsZero }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} - - - {{ range first 30 .Data.Pages }} - - {{ .Title }} - {{ .Permalink }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ with .Params.author }}{{.}}{{end}} - {{ .Permalink }} - - {{ (replace .Content " " "") | html }} - - - {{ end }} - - diff --git a/docs/hugo-tania/netlify.toml b/docs/hugo-tania/netlify.toml deleted file mode 100644 index b1ef5ae..0000000 --- a/docs/hugo-tania/netlify.toml +++ /dev/null @@ -1,17 +0,0 @@ -[build] - publish = "site/public" - -[build.environment] - HUGO_VERSION = "0.74.3" - HUGO_THEME = "repo" - -[context.production] - command = "cd site && hugo --gc --themesDir ../.. -b ${URL}" - [context.production.environment] - HUGO_ENV = "production" - -[context.branch-deploy] - command = "cd site && hugo --gc --themesDir ../.. -b ${DEPLOY_PRIME_URL}" - -[context.deploy-preview] - command = "cd site && hugo --gc --themesDir ../.. -b ${DEPLOY_PRIME_URL}" diff --git a/docs/hugo-tania/resources/_gen/assets/scss/sass/main.scss_48b060fe05b0a273d182ef83c0605941.content b/docs/hugo-tania/resources/_gen/assets/scss/sass/main.scss_48b060fe05b0a273d182ef83c0605941.content deleted file mode 100644 index e6d9093..0000000 --- a/docs/hugo-tania/resources/_gen/assets/scss/sass/main.scss_48b060fe05b0a273d182ef83c0605941.content +++ /dev/null @@ -1 +0,0 @@ -/*!normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css*/html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}*,*::before,*::after{box-sizing:border-box}:root{--color-mode: light;--h1-color: #343a40;--font-color: #495057;--heading-color: #343a40;--background: white;--dark-font-color: #1b1d25;--medium-font-color: #60656c;--light-font-color: #858b93;--light-background: #f1f4f8;--light-background-hover: #e1e6ed;--border: #d6d9de;--link-color: #5183f5;--link-color-darker: #364fc7;--navbar-color: #1b1d25;--blockquote: #f9f9f9;--blockquote-left: #e3e6eb;--transparent-text: rgba(0, 0, 0, 0.7);--transparent-bg: rgba(0, 0, 0, 0.05);--light-transparent-bg: rgba(255, 255, 255, 0.1)}.flex{display:flex;align-items:center}.flex-row{display:flex;flex-direction:column}@media screen and (min-width:800px){.flex-row{flex-direction:row}}.flex-col{flex:1}.flex-two-thirds{flex:2}.justify-center{justify-content:center}html{font-family:-apple-system,BlinkMacSystemFont,helvetica neue,roboto,Roboto,Arial,noto sans,sans-serif,apple color emoji,segoe ui,segoe ui emoji,segoe ui symbol,noto color emoji;color:var(--font-color);font-weight:400;font-size:1rem;line-height:1.75}body{background:var(--background);margin:0;padding:0}section{margin:2rem 0}section:first-of-type{margin-top:0}section>h2{display:flex;align-items:center;font-size:1.6rem;margin-top:0;margin-bottom:.5rem}@media screen and (min-width:800px){section>h2{margin-bottom:2rem}}.index h2,section>h2{border-bottom-width:0}@media screen and (min-width:800px){.index h2,section>h2{border-bottom-width:4px}}a.section-button{font-weight:500;background:var(--light-background);color:var(--dark-font-color);padding:.4rem .6rem;font-size:.8rem;border-radius:.3rem;border-width:0!important;white-space:nowrap;line-height:1;margin-left:2rem;margin-top:.5rem}a.section-button:hover{background:var(--light-background-hover);color:var(--heading-color)}@media screen and (min-width:800px){section{margin:3.5rem 0}section>h2{font-size:2rem;margin:0 0 1rem}}.container{max-width:825px;padding:0 1.5rem;margin-left:auto;margin-right:auto}.container.page p{max-width:600px}@media screen and (min-width:800px){.container{padding:0 2rem}}img{display:inline-block;max-width:100%;height:auto}p,ol,ul,dl,table,blockquote{font-size:1.05rem;margin:0 0 1.5rem}ul{padding:0 1rem}@media screen and (min-width:800px){p,ol,ul,dl,table,blockquote{font-size:1.125rem}ul{padding:0 2rem}}ul li p{margin:0}ul li ul{padding-left:1rem;margin:0}ul li ul li{margin:0}ol li ol{margin-bottom:0}.task-list-item [type=checkbox]{margin-right:.5rem}blockquote{margin:2rem 0;padding:1rem;background:var(--blockquote);font-weight:400;border-left:5px solid var(--blockquote-left)}blockquote :not(pre)>code[class*=language-]{background:rgba(0,0,0,.1)!important}@media screen and (min-width:800px){blockquote{padding:2rem 0 2rem 2rem}}::selection{background:#3b5bdb;color:#fff}h1{color:var(--h1-color)}h3,h4{color:var(--medium-font-color)}h2,h5{color:var(--heading-color)}h1,h2,h3,h4,h5{margin:0 0 1.5rem;font-weight:700;line-height:1.2;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}h1:not(:first-child),h2:not(:first-child),h3:not(:first-child),h4:not(:first-child){margin-top:3rem}h1{font-size:2.5rem;line-height:1.1}h2{font-size:1.75rem;padding-bottom:.5rem;border-bottom:4px solid var(--light-background)}h2 code{font-size:1.75rem!important}h3{font-size:1.5rem;color:var(--font-color);font-weight:600;margin-bottom:1rem}h3 code{font-size:1.4rem!important}h4{font-size:1.3rem;color:var(--font-color);font-weight:500;margin-bottom:1rem;border-bottom:2px solid var(--light-background);padding-bottom:.25rem}h5{font-size:1.2rem;margin-bottom:1rem}@media screen and (min-width:800px){h1{font-size:3rem}h2{font-size:1.9rem}h2 code{font-size:1.9rem!important}h3{font-size:1.7rem;color:var(--font-color);font-weight:600}h3 code{font-size:1.6rem!important}h4{font-weight:400;font-size:1.4rem}}a.link{display:block;padding:.25rem 0;margin:.25rem 0;border-radius:.35rem;font-weight:600;color:var(--dark-font-color)}a.link:hover{color:var(--link-color)}a.button{display:inline-block;border:2px solid var(--link-color);padding:.3rem .6rem;margin-right:.75rem;font-weight:500;background:var(--link-color);color:#fff;border-radius:.35rem;font-size:.9rem}a.button.large{padding:.8rem 1rem;font-size:1.05rem}a.button.secondary{border:2px solid #edf2ff;background:#edf2ff;color:#3b5bdb}a.button:hover,a.button.secondary:hover{border:2px solid var(--link-color-darker);background:var(--link-color-darker);color:#fff}@media screen and (min-width:800px){a.button{font-size:.9rem}a.button.large{padding:1rem 1.5rem;font-size:1.1rem}}p.subtitle{color:var(--medium-font-color);font-size:1.3rem;font-weight:300;margin-bottom:0}@media screen and (min-width:800px){p.subtitle{font-size:1.5rem}}a{color:inherit;text-decoration:none}a.image-link{border-width:0}a code[class*=language-]{color:var(--link-color)!important}a code[class*=language-]:hover{background:var(--link-color)!important;color:#fff!important}main{margin-top:50px}@media screen and (min-width:800px){main{margin-top:0}}.emoji{margin:0 .4rem 0 .1rem}.navbar{width:100%;position:fixed;top:0;left:0;background:var(--navbar-color);box-shadow:0 3px 13px rgba(100,110,140,.1),0 2px 4px rgba(100,110,140,.15);z-index:2;padding:.5rem}.navbar .flex{justify-content:space-between}.navbar a{border-radius:.35rem;margin:0 .05rem;color:rgba(255,255,255,.65);font-weight:400;font-size:.85rem;border:1px solid transparent;padding:0 .3rem;background:0 0}.navbar a:first-of-type{margin-left:-1rem}.navbar a .emoji{display:none}.navbar a.brand{font-weight:500;color:#fff;white-space:nowrap;border:none;display:flex;align-items:center;line-height:1;background:0 0}.navbar a.brand .emoji{display:inline-block!important}.navbar a.brand img{height:22px;width:22px}.navbar button{font-size:1rem;margin-right:-1rem}@media screen and (min-width:500px){.navbar a{font-size:.95rem;padding:.5rem}}@media screen and (min-width:800px){.emoji{margin:0 .5rem 0 .1rem}.navbar{position:static;padding:1.5rem 0;background:0 0;box-shadow:none}.navbar .flex{justify-content:space-between}.navbar a{padding:.75rem 1.25rem;margin:0 .25rem;font-size:1.2rem;font-weight:400;color:var(--font-color)}.navbar a:first-of-type{margin-left:-1.5rem}.navbar a:hover,.navbar a[aria-current=page]{background:var(--light-background);color:var(--dark-font-color)}.navbar a.brand{font-size:1.3rem;margin-right:3rem;border:none;background:0 0!important;color:var(--dark-font-color)}.navbar a.brand:hover{background:var(--light-background)!important}.navbar a.brand img{height:26px;width:26px;margin-right:.25rem}#dark-mode-button:hover{background:var(--light-background)}}@media print{.navbar{display:none}}#dark-mode-button{display:flex;border:none;padding:.2rem .7rem .2rem .5rem;border-radius:.35rem;box-sizing:content-box;cursor:pointer;font-size:1.1rem;background:0 0}#dark-mode-button:focus{outline:none}@media screen and (min-width:800px){#dark-mode-button{padding:.95rem .75rem;font-size:1.2rem}}.my{padding-top:2rem}.my a{border:none;margin-right:1rem}.my a:hover{border:none}.post-row{display:flex;align-items:center;width:100%}.post-row time{display:block;flex:0 0 65px}.post-row h3{flex:1}.posts .post:last-of-type a{border-bottom-width:0}.post a{display:flex;align-items:center;justify-content:stretch;padding:1rem 0;border-bottom:2px solid var(--light-background)}.post a:hover{border-radius:.3rem}.post h3{margin-top:.1rem;margin-bottom:0;font-size:1.1rem;font-weight:600}@media screen and (min-width:800px){.posts{margin-left:-1rem;margin-right:-1rem}.post a{padding:.75rem 1rem;border-bottom-color:transparent}.post a:hover{background:var(--light-background)}.post h3{font-size:1.3rem}.post-row time{flex:0 0 80px}}.new-post,.popular-post{display:inline-block;color:#111;padding:.3rem .4rem;border-radius:.3rem;font-size:.85rem;margin-left:1rem}.new-post{background:#d3f9d8}.popular-post{background:#dce6fd;color:var(--heading-color)}@media screen and (min-width:800px){.new-post,.popular-post{margin-bottom:0}}.footer{padding:2rem 0}.footer>.flex{flex-direction:column;align-items:center;justify-content:center}.footer img{height:30px;width:30px}.footer a{border-radius:.35rem;margin:0 .05rem;font-weight:400;font-size:1rem;border:1px solid transparent;padding:.5rem;margin:0 .5rem;color:var(--light-font-color)}.footer a:hover{color:var(--heading-color);background:var(--light-background)}.footer a.img{display:flex;align-items:center;padding:0;margin:0 .75rem;background:0 0}.footer-links{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.flex nav{padding:1rem 0}@media screen and (min-width:800px){.footer>.flex{align-items:flex-start;margin-left:-1.5rem;margin-right:-1.5rem}.footer a{padding:.75rem}.footer a.img{padding:0 .5rem;margin:0 1rem}}@media print{.footer{display:none}}.small{max-width:600px}time,.meta{color:var(--light-font-color);font-size:.85rem;white-space:nowrap;font-weight:400}.meta{color:var(--medium-font-color);font-size:1rem}table{border-collapse:separate;border-spacing:0;width:100%;max-width:100%;overflow-x:auto}thead,tbody{white-space:nowrap}th{border-bottom:2px solid var(--border)}tfoot th{border-top:1px solid var(--border)}td{border-bottom:1px solid var(--border)}th,td{text-align:left;padding:.75rem;hyphens:auto}tbody tr:nth-child(even){background-color:var(--light-background)}@media screen and (min-width:800px){table{display:table;border:1px solid var(--border)}thead,tbody{white-space:normal}}.count{font-weight:700;color:var(--link-color)}.tags{display:flex!important;flex-wrap:wrap;align-items:center;margin-left:-.5rem;margin-right:-.5rem}.tags>a{display:block;font-weight:500;background:var(--light-background);color:var(--font-color);margin:.2rem;padding:.5rem .6rem;font-size:.8rem;border-radius:.3rem;border-bottom:0;white-space:nowrap;line-height:1}.tags>a:hover{background:var(--light-background-hover);color:var(--heading-color)}mark{background:#ffec99}.utterances{margin-left:-4px;margin-right:-4px}kbd{background-color:#f7f7f7;border:2px solid rgba(0,0,0,.3);border-radius:3px;box-shadow:0 1px 0 rgba(0,0,0,.2),inset 0 0 0 2px #fff;color:#333;display:inline-block;font-family:Helvetica Neue,Inter,-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;line-height:1.4;margin:0 .1em;padding:.1em .6em;text-shadow:0 1px 0 #fff;font-size:14px}#comments{margin-top:3rem}#comments h2{margin:0}@media print{.comments,#comments{display:none}}header{padding:1.5rem 0}header h1{font-size:2rem;display:inline-block;font-weight:600;margin-top:1rem}header u{display:inline-block;text-decoration:none;padding:.4rem 0}.article-header{padding-top:2rem;margin-bottom:.5rem}.article-header .container{padding-left:0;padding-right:0}.article-header .thumb{display:flex;flex-direction:column}.article-header h1{font-weight:700;font-size:1.8rem;margin:0}.article-header .description{font-size:1.2rem;color:var(--light-font-color);font-weight:300;margin-top:2rem;margin-bottom:0}.post-meta{margin-top:1rem;padding:0;color:var(--light-font-color);font-size:.9rem}.post-meta a{color:var(--font-color);border-width:0}.post-meta time{margin-top:.2rem;font-size:.9rem}.post-meta .tags{margin-top:.5rem}.post-meta .tags a{text-decoration:none}.article-post{margin-bottom:2rem}.article-post a{box-shadow:0 -2px 0 rgba(189,195,199,.5)inset;transition:all .3s ease}.article-post a:hover{box-shadow:0 -10px 0 rgba(189,195,199,.7)inset}.article-post h1 .anchor{stroke:var(--link-color);stroke-width:1px;fill:var(--link-color);font-weight:700;left:-.25rem;border-width:0;float:left;line-height:1;margin-left:-20px;padding-right:4px;box-shadow:none;transition:none}.article-post h1 .anchor .icon{visibility:hidden}.article-post h1:hover .anchor{box-shadow:none}.article-post h1:hover .anchor .icon{visibility:visible}.article-post h2 .anchor{stroke:var(--link-color);stroke-width:1px;fill:var(--link-color);font-weight:700;left:-.25rem;border-width:0;float:left;line-height:1;margin-left:-20px;padding-right:4px;box-shadow:none;transition:none}.article-post h2 .anchor .icon{visibility:hidden}.article-post h2:hover .anchor{box-shadow:none}.article-post h2:hover .anchor .icon{visibility:visible}.article-post h3 .anchor{stroke:var(--link-color);stroke-width:1px;fill:var(--link-color);font-weight:700;left:-.25rem;border-width:0;float:left;line-height:1;margin-left:-20px;padding-right:4px;box-shadow:none;transition:none}.article-post h3 .anchor .icon{visibility:hidden}.article-post h3:hover .anchor{box-shadow:none}.article-post h3:hover .anchor .icon{visibility:visible}.article-post h4 .anchor{stroke:var(--link-color);stroke-width:1px;fill:var(--link-color);font-weight:700;left:-.25rem;border-width:0;float:left;line-height:1;margin-left:-20px;padding-right:4px;box-shadow:none;transition:none}.article-post h4 .anchor .icon{visibility:hidden}.article-post h4:hover .anchor{box-shadow:none}.article-post h4:hover .anchor .icon{visibility:visible}.article-post h5 .anchor{stroke:var(--link-color);stroke-width:1px;fill:var(--link-color);font-weight:700;left:-.25rem;border-width:0;float:left;line-height:1;margin-left:-20px;padding-right:4px;box-shadow:none;transition:none}.article-post h5 .anchor .icon{visibility:hidden}.article-post h5:hover .anchor{box-shadow:none}.article-post h5:hover .anchor .icon{visibility:visible}.article-post h6 .anchor{stroke:var(--link-color);stroke-width:1px;fill:var(--link-color);font-weight:700;left:-.25rem;border-width:0;float:left;line-height:1;margin-left:-20px;padding-right:4px;box-shadow:none;transition:none}.article-post h6 .anchor .icon{visibility:hidden}.article-post h6:hover .anchor{box-shadow:none}.article-post h6:hover .anchor .icon{visibility:visible}@media screen and (min-width:800px){.article-post{margin-bottom:3rem}.article-post h1,.article-post h2,.article-post h3,.article-post h4,.article-post h5{padding-top:1rem}.post-meta{margin-top:1.5rem;padding:1rem 0}header h1{font-size:3rem;margin-top:2rem}header u{background:linear-gradient(transparent 85%,#bac8ff 0)}.article-header{padding-top:3rem}.article-header h1{padding-top:0;font-size:2.5rem}.article-header .thumb{flex-direction:row}.article-header .description{font-size:1.8rem;line-height:1.5}}@media screen and (min-width:1100px){.article-header h1{font-size:2.5rem}}.post-thumbnail{display:block!important}code,pre{font-size:.9rem;font-family:Consolas,Monaco,Menlo,dejavu sans mono,bitstream vera sans mono,courier new,monospace;background:#373b41}:not(pre)>code{color:var(--dark-font-color);background:var(--light-background)}code{padding:3px 5px;border-radius:4px;color:#f8f8f2}pre>code{display:block}.highlight>.chroma{margin:0;border-radius:5px;overflow-x:auto;box-shadow:1px 1px 2px rgba(0,0,0,.125);position:relative;background:#373b41}.highlight>.chroma code{padding:30px 10px 10px}.highlight>.chroma code[data-lang]::before{position:absolute;top:0;right:0;left:0;padding:2px 10px;width:100%;height:30px;font-size:.9rem;line-height:1.9;font-weight:700;color:#b1b1b1;background:#303339;content:attr(data-lang)}.highlight>.chroma table{position:relative;border:none}.highlight>.chroma table code{padding:0}.highlight>.chroma .lntd:first-child{width:10px}.highlight>.chroma .lntd:first-child pre{margin:0;padding:30px 7px 10px}.highlight>.chroma .lntd:last-child{vertical-align:top}.highlight>.chroma .lntd:last-child pre{margin:0;padding:30px 10px 10px}.highlight>.chroma table,.highlight>.chroma tr,.highlight>.chroma td{margin:0;padding:0;width:100%;border-collapse:collapse;border:none}.highlight>.chroma .hl{display:block;width:100%;background-color:#000}.highlight>.chroma .lnt{color:#7f7f7f}.highlight>.chroma .ln{padding:0 .4em;color:#7f7f7f}.highlight>.chroma .err{color:#960050}.highlight>.chroma .c{color:#999}.highlight>.chroma .err{color:#f2777a}.highlight>.chroma .k{color:#c9c}.highlight>.chroma .l{color:#f99157}.highlight>.chroma .n{color:#ccc}.highlight>.chroma .o{color:#6cc}.highlight>.chroma .p{color:#ccc}.highlight>.chroma .cm{color:#999}.highlight>.chroma .cp{color:#999}.highlight>.chroma .c1{color:#999}.highlight>.chroma .cs{color:#999}.highlight>.chroma .gd{color:#f2777a}.highlight>.chroma .ge{font-style:italic}.highlight>.chroma .gh{color:#ccc;font-weight:700}.highlight>.chroma .gi{color:#9c9}.highlight>.chroma .gp{color:#999;font-weight:700}.highlight>.chroma .gs{font-weight:700}.highlight>.chroma .gu{color:#6cc;font-weight:700}.highlight>.chroma .kc{color:#c9c}.highlight>.chroma .kd{color:#c9c}.highlight>.chroma .kn{color:#6cc}.highlight>.chroma .kp{color:#c9c}.highlight>.chroma .kr{color:#c9c}.highlight>.chroma .kt{color:#fc6}.highlight>.chroma .ld{color:#9c9}.highlight>.chroma .m{color:#f99157}.highlight>.chroma .s{color:#9c9}.highlight>.chroma .na{color:#69c}.highlight>.chroma .nb{color:#ccc}.highlight>.chroma .nc{color:#fc6}.highlight>.chroma .no{color:#f2777a}.highlight>.chroma .nd{color:#6cc}.highlight>.chroma .ni{color:#ccc}.highlight>.chroma .ne{color:#f2777a}.highlight>.chroma .nf{color:#69c}.highlight>.chroma .nl{color:#ccc}.highlight>.chroma .nn{color:#fc6}.highlight>.chroma .nx{color:#69c}.highlight>.chroma .py{color:#ccc}.highlight>.chroma .nt{color:#6cc}.highlight>.chroma .nv{color:#f2777a}.highlight>.chroma .ow{color:#6cc}.highlight>.chroma .w{color:#ccc}.highlight>.chroma .mf{color:#f99157}.highlight>.chroma .mh{color:#f99157}.highlight>.chroma .mi{color:#f99157}.highlight>.chroma .mo{color:#f99157}.highlight>.chroma .sb{color:#9c9}.highlight>.chroma .sc{color:#ccc}.highlight>.chroma .sd{color:#999}.highlight>.chroma .s2{color:#9c9}.highlight>.chroma .se{color:#f99157}.highlight>.chroma .sh{color:#9c9}.highlight>.chroma .si{color:#f99157}.highlight>.chroma .sx{color:#9c9}.highlight>.chroma .sr{color:#9c9}.highlight>.chroma .s1{color:#9c9}.highlight>.chroma .ss{color:#9c9}.highlight>.chroma .bp{color:#ccc}.highlight>.chroma .vc{color:#f2777a}.highlight>.chroma .vg{color:#f2777a}.highlight>.chroma .vi{color:#f2777a}.highlight>.chroma .il{color:#f99157}.side{width:200px;margin:0 auto}.side-right{float:right;clear:right;margin-right:calc(-200px - 2em)}.side-right p{font-size:.9rem}.note-ref{cursor:pointer;border:none}.note-ref:hover{border:none}.bg-number{background:var(--light-background);font-size:.9rem;color:var(--font-color);text-decoration:none;padding:1px 5px;border-radius:5px}@media(max-width:1280px){.side{width:100%;padding:0 2em}.side-right{float:none;clear:both;margin:1em auto;background:0 0}}@media(min-width:1280px){.note-ref:hover~.side{display:inline-block;position:absolute;margin-left:1rem;padding:.5rem;box-sizing:content-box}}.suggested{flex-direction:column;align-items:stretch;margin-left:-1rem;margin-right:-1rem;padding:0}.suggested span{font-weight:400;display:block;font-size:.9rem;color:var(--transparent-text)}.suggested a{background:0 0;margin:.5rem 1rem;border-bottom:none;transition:all .2s ease;padding:1.5rem;border-radius:.35rem;background:var(--light-background);color:var(--heading-color)}.suggested a:hover{transform:translate3D(0,-1px,0);background:var(--light-background-hover)}@media screen and (min-width:800px){.suggested{flex-direction:row}.suggested a{flex:0 0 calc(50% - 2rem)}.suggested a:first-of-type{text-align:right}}.projects .project:last-of-type{border-bottom-width:0}.project{display:flex;align-items:center;justify-content:space-between;padding:.75rem 0;border-bottom:2px solid var(--light-background)}.project .icon{font-size:1.5rem;width:40px}.project a{display:flex;align-items:center;margin-bottom:.25rem;border-width:0}.project a:hover h3{text-decoration:underline}.project a.button{margin-left:1.5rem;border-width:2px}.project h3{font-size:1.2rem;margin:0}.project .description{font-size:1.1rem;color:var(--light-font-color)}@media screen and (min-width:800px){.project{border-bottom-width:0}.project h3{font-size:1.3rem}.project .description{font-size:1rem}}.terms a{padding:.75rem 1.25rem;margin:0 .25rem;font-size:1.2rem;font-weight:400;color:var(--font-color);border-radius:.35rem}.terms a:hover{background:var(--light-background);color:var(--dark-font-color)}@media(prefers-color-scheme:dark){:root{--color-mode: dark}:root:not([data-user-color-scheme]){--h1-color: white;--font-color: #b3b9c5;--heading-color: #ffd479;--dark-font-color: #ced4da;--background: #1f2022;--medium-font-color: #dee2e6;--light-font-color: #868e96;--light-background: #2D2D31;--light-background-hover: #3b3b3e;--code-background-color: #2e2e30;--border: #404040;--link-color: #6ab0f3;--link-color-darker: #4a72a5;--link-hover-color: #e1a6f2;--navbar-color: #1d1d1d;--blockquote: #2b2b2b;--blockquote-left: #191919;--transparent-text: rgba(255, 255, 255, 0.7);--transparent-bg: rgba(0, 0, 0, 0.2);--light-transparent-bg: rgba(255, 255, 255, 0.05)}}[data-user-color-scheme=dark]{--h1-color: white;--font-color: #b3b9c5;--heading-color: #ffd479;--dark-font-color: #ced4da;--background: #1f2022;--medium-font-color: #dee2e6;--light-font-color: #868e96;--light-background: #2D2D31;--light-background-hover: #3b3b3e;--code-background-color: #2e2e30;--border: #404040;--link-color: #6ab0f3;--link-color-darker: #4a72a5;--link-hover-color: #e1a6f2;--navbar-color: #1d1d1d;--blockquote: #2b2b2b;--blockquote-left: #191919;--transparent-text: rgba(255, 255, 255, 0.7);--transparent-bg: rgba(0, 0, 0, 0.2);--light-transparent-bg: rgba(255, 255, 255, 0.05)} \ No newline at end of file diff --git a/docs/hugo-tania/resources/_gen/assets/scss/sass/main.scss_48b060fe05b0a273d182ef83c0605941.json b/docs/hugo-tania/resources/_gen/assets/scss/sass/main.scss_48b060fe05b0a273d182ef83c0605941.json deleted file mode 100644 index 464a0d6..0000000 --- a/docs/hugo-tania/resources/_gen/assets/scss/sass/main.scss_48b060fe05b0a273d182ef83c0605941.json +++ /dev/null @@ -1 +0,0 @@ -{"Target":"sass/main.min.96090b4177a3194fa2de0860f2c55524d6582b68a41222fe4030905ef033075a.css","MediaType":"text/css","Data":{"Integrity":"sha256-lgkLQXejGU+i3ghg8sVVJNZYK2ikEiL+QDCQXvAzB1o="}} \ No newline at end of file diff --git a/docs/hugo-tania/site/config.yaml b/docs/hugo-tania/site/config.yaml deleted file mode 100644 index 7c62508..0000000 --- a/docs/hugo-tania/site/config.yaml +++ /dev/null @@ -1,35 +0,0 @@ -baseurl: 'https://services.m3o.com' -languageCode: 'en-us' -title: 'Micro Services' -themesDir: '../..' -theme: 'hugo-tania' -summaryLength: 10 - -params: - source: "https://github.com/micro/services" - titleEmoji: '' - socialOptions: - github: - twitter: - -menu: - header: - - name: Explore - url: '/explore/' - footer: - - name: '© 2020 Micro Services, Inc.' - url: 'https://m3o.com' - -markup: - highlight: - noClasses: false - lineNos: true - goldmark: - renderer: - unsafe: true - -permalinks: - post: /:filename - -taxonomies: - tag: "labels" \ No newline at end of file diff --git a/docs/hugo-tania/site/content/_index.md b/docs/hugo-tania/site/content/_index.md deleted file mode 100644 index f531b6e..0000000 --- a/docs/hugo-tania/site/content/_index.md +++ /dev/null @@ -1 +0,0 @@ -Explore, discover and use Micro Services. diff --git a/docs/hugo-tania/site/content/explore.md b/docs/hugo-tania/site/content/explore.md deleted file mode 100644 index 44977b8..0000000 --- a/docs/hugo-tania/site/content/explore.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Services -subtitle: Explore Micro services API documentation, usage and specs -date: 2020-11-26 -type: section -layout: 'archives' ---- diff --git a/docs/hugo-tania/theme.toml b/docs/hugo-tania/theme.toml deleted file mode 100644 index c3f4670..0000000 --- a/docs/hugo-tania/theme.toml +++ /dev/null @@ -1,25 +0,0 @@ -# theme.toml template for a Hugo theme -# See https://github.com/gohugoio/hugoThemes#themetoml for an example - -name = "Tania" -license = "MIT" -licenselink = "https://github.com/WingLim/hugo-tania/blob/master/LICENSE" -description = "A simple theme for bloggers" -homepage = "https://hugo-tanhia.netlify.app" -tags = [ - "blog", - "responsive", - "light", - "dark" - ] -features = ["darkmode"] -min_version = "0.74.0" - -[author] - name = "WingLim" - homepage = "https://limxw.com" - -[original] - author = "Tania Rascia" - homepage = "https://www.taniarascia.com/" - repo = "https://github.com/taniarascia/taniarascia.com" diff --git a/docs/skip b/docs/skip deleted file mode 100644 index e69de29..0000000 diff --git a/feeds/.gitignore b/feeds/.gitignore deleted file mode 100644 index 3e08573..0000000 --- a/feeds/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ - -feeds diff --git a/feeds/Dockerfile b/feeds/Dockerfile deleted file mode 100644 index 00100bf..0000000 --- a/feeds/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM alpine -ADD feeds /feeds -ENTRYPOINT [ "/feeds" ] diff --git a/feeds/Makefile b/feeds/Makefile deleted file mode 100644 index 01a345f..0000000 --- a/feeds/Makefile +++ /dev/null @@ -1,27 +0,0 @@ - -GOPATH:=$(shell go env GOPATH) -.PHONY: init -init: - go get -u github.com/golang/protobuf/proto - go get -u github.com/golang/protobuf/protoc-gen-go - go get github.com/micro/micro/v3/cmd/protoc-gen-micro -.PHONY: proto -proto: - protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=:. proto/feeds.proto - -.PHONY: docs -docs: - protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=:. proto/feeds.proto - @redoc-cli bundle api-feeds.json - -.PHONY: build -build: - go build -o feeds *.go - -.PHONY: test -test: - go test -v ./... -cover - -.PHONY: docker -docker: - docker build . -t feeds:latest diff --git a/feeds/README.md b/feeds/README.md deleted file mode 100644 index 4389316..0000000 --- a/feeds/README.md +++ /dev/null @@ -1,6 +0,0 @@ -A single uniform API for crawling and indexing RSS feeds - -# Feeds Service - -Designed to populate the posts service with RSS feeds from other blogs. Useful for migration or just to get outside content into the posts service. - diff --git a/feeds/SKIP b/feeds/SKIP deleted file mode 100644 index e69de29..0000000 diff --git a/feeds/generate.go b/feeds/generate.go deleted file mode 100644 index 7d9db91..0000000 --- a/feeds/generate.go +++ /dev/null @@ -1,3 +0,0 @@ -package main - -//go:generate make proto diff --git a/feeds/handler/crawl.go b/feeds/handler/crawl.go deleted file mode 100644 index 7a1b990..0000000 --- a/feeds/handler/crawl.go +++ /dev/null @@ -1,133 +0,0 @@ -package handler - -import ( - "context" - "crypto/md5" - "fmt" - "net/url" - "sync" - "time" - - "github.com/SlyMarbo/rss" - log "github.com/micro/micro/v3/service/logger" - "github.com/micro/services/feeds/parser" - feeds "github.com/micro/services/feeds/proto" - posts "github.com/micro/services/posts/proto" -) - -var ( - rssSync sync.RWMutex - rssFeeds = map[string]*rss.Feed{} -) - -func (e *Feeds) fetchAll() { - fs := []*feeds.Feed{} - err := e.feeds.Read(e.feedsNameIndex.ToQuery(nil), &fs) - if err != nil { - log.Errorf("Error listing feeds: %v", err) - return - } - if len(fs) == 0 { - log.Infof("No feeds to fetch") - return - } - for _, feed := range fs { - err = e.fetch(feed) - if err != nil { - log.Errorf("Error saving post: %v", err) - } - } -} - -func (e *Feeds) fetch(f *feeds.Feed) error { - url := f.Url - log.Infof("Fetching address %v", url) - - // see if there's an existing rss feed - rssSync.RLock() - fd, ok := rssFeeds[f.Name] - rssSync.RUnlock() - - if !ok { - // create a new one if it doesn't exist - var err error - fd, err = rss.Fetch(f.Url) - if err != nil { - return fmt.Errorf("Error fetching address %v: %v", url, err) - } - // save the feed - rssSync.Lock() - rssFeeds[f.Name] = fd - rssSync.Unlock() - } else { - // otherwise update the existing feed - fd.Items = []*rss.Item{} - fd.Unread = 0 - if err := fd.Update(); err != nil { - return fmt.Errorf("Error updating address %v: %v", url, err) - } - } - - // set the refresh time - fd.Refresh = time.Now() - domain := getDomain(url) - - // range over the feed and save the items - for _, item := range fd.Items { - id := fmt.Sprintf("%x", md5.Sum([]byte(item.ID))) - - err := e.entries.Create(feeds.Entry{ - Id: id, - Url: item.Link, - Title: item.Title, - Domain: domain, - Content: item.Summary, - Date: item.Date.Unix(), - Category: f.Category, - }) - if err != nil { - return fmt.Errorf("Error saving item: %v", err) - } - - var tags []string - if len(f.Category) > 0 { - tags = append(tags, f.Category) - } - - // check if content exists - content := item.Content - if len(content) == 0 && len(item.Summary) > 0 { - content = item.Summary - } - - // if we have a parser which returns content use it - // e.g cnbc - c, err := parser.Parse(item.Link) - if err == nil && len(c) > 0 { - content = c - } - - // @todo make this optional - _, err = e.postsService.Save(context.TODO(), &posts.SaveRequest{ - Id: id, - Title: item.Title, - Content: content, - Timestamp: item.Date.Unix(), - Metadata: map[string]string{ - "domain": domain, - "link": item.Link, - }, - Tags: tags, - }) - if err != nil { - return err - } - } - - return nil -} - -func getDomain(address string) string { - uri, _ := url.Parse(address) - return uri.Host -} diff --git a/feeds/handler/feeds.go b/feeds/handler/feeds.go deleted file mode 100644 index ada148d..0000000 --- a/feeds/handler/feeds.go +++ /dev/null @@ -1,128 +0,0 @@ -package handler - -import ( - "context" - "time" - - "github.com/micro/micro/v3/service/errors" - log "github.com/micro/micro/v3/service/logger" - "github.com/micro/micro/v3/service/model" - - feeds "github.com/micro/services/feeds/proto" - posts "github.com/micro/services/posts/proto" -) - -type Feeds struct { - feeds model.Model - entries model.Model - postsService posts.PostsService - feedsIdIndex model.Index - feedsNameIndex model.Index - entriesDateIndex model.Index - entriesURLIndex model.Index -} - -func NewFeeds(postsService posts.PostsService) *Feeds { - idIndex := model.ByEquality("url") - idIndex.Order.Type = model.OrderTypeUnordered - - nameIndex := model.ByEquality("name") - nameIndex.Unique = true - nameIndex.Order.Type = model.OrderTypeUnordered - - dateIndex := model.ByEquality("date") - dateIndex.Order.Type = model.OrderTypeDesc - - entriesURLIndex := model.ByEquality("url") - entriesURLIndex.Order.Type = model.OrderTypeDesc - entriesURLIndex.Order.FieldName = "date" - - f := &Feeds{ - feeds: model.NewModel( - model.WithKey("Name"), - model.WithNamespace("feeds"), - model.WithIndexes(nameIndex), - ), - entries: model.NewModel( - model.WithNamespace("entries"), - model.WithIndexes(dateIndex, entriesURLIndex), - ), - postsService: postsService, - feedsIdIndex: idIndex, - feedsNameIndex: nameIndex, - entriesDateIndex: dateIndex, - entriesURLIndex: entriesURLIndex, - } - - // register model instances - f.feeds.Register(new(feeds.Feed)) - f.entries.Register(new(feeds.Entry)) - - go f.crawl() - return f -} - -func (e *Feeds) crawl() { - e.fetchAll() - tick := time.NewTicker(1 * time.Minute) - for _ = range tick.C { - e.fetchAll() - } -} - -func (e *Feeds) Add(ctx context.Context, req *feeds.AddRequest, rsp *feeds.AddResponse) error { - log.Info("Received Feeds.Add request") - - if len(req.Name) == 0 { - return errors.BadRequest("feeds.add", "require name") - } - - rssSync.RLock() - defer rssSync.RUnlock() - - // check if the feed already exists - if _, ok := rssFeeds[req.Name]; ok { - return errors.BadRequest("feeds.add", "%s already exists", req.Name) - } - - f := feeds.Feed{ - Name: req.Name, - Url: req.Url, - Category: req.Category, - } - - // create the feed - e.feeds.Create(f) - - // schedule immediate fetch - go e.fetch(&f) - - return nil -} - -func (e *Feeds) Entries(ctx context.Context, req *feeds.EntriesRequest, rsp *feeds.EntriesResponse) error { - log.Info("Received Feeds.Entries request") - return e.entries.Read(e.entriesURLIndex.ToQuery(req.Url), &rsp.Entries) -} - -func (e *Feeds) List(ctx context.Context, req *feeds.ListRequest, rsp *feeds.ListResponse) error { - var feeds []*feeds.Feed - q := model.QueryAll() - q.Index.FieldName = "Name" - err := e.feeds.Read(q, &feeds) - if err != nil { - return errors.InternalServerError("feeds.list", "failed to read list of feeds: %v", err) - } - - rsp.Feeds = feeds - return nil -} - -func (e *Feeds) Remove(ctx context.Context, req *feeds.RemoveRequest, rsp *feeds.RemoveResponse) error { - if len(req.Name) == 0 { - return errors.BadRequest("feeds.remove", "blank name provided") - } - - e.feeds.Delete(model.QueryEquals("name", req.Name)) - return nil -} diff --git a/feeds/main.go b/feeds/main.go deleted file mode 100644 index bd7b58e..0000000 --- a/feeds/main.go +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - pb "github.com/micro/services/feeds/proto" - posts "github.com/micro/services/posts/proto" - - "github.com/micro/services/feeds/handler" - - "github.com/micro/micro/v3/service" - "github.com/micro/micro/v3/service/logger" -) - -func main() { - // Create service - srv := service.New( - service.Name("feeds"), - service.Version("latest"), - ) - - // Register handler - pb.RegisterFeedsHandler(srv.Server(), handler.NewFeeds(posts.NewPostsService("posts", srv.Client()))) - - // Run service - if err := srv.Run(); err != nil { - logger.Fatal(err) - } -} diff --git a/feeds/micro.mu b/feeds/micro.mu deleted file mode 100644 index da83cb0..0000000 --- a/feeds/micro.mu +++ /dev/null @@ -1 +0,0 @@ -service feeds diff --git a/feeds/parser/parser.go b/feeds/parser/parser.go deleted file mode 100644 index 4842467..0000000 --- a/feeds/parser/parser.go +++ /dev/null @@ -1,63 +0,0 @@ -package parser - -import ( - "errors" - "net/http" - "net/url" - - "github.com/PuerkitoBio/goquery" -) - -var ( - parsers = map[string]Parser{ - "a16z.com": a16zParser, - "cnbc.com": cnbcParser, - "www.cnbc.com": cnbcParser, - } -) - -type Parser func(string) (string, error) - -func Parse(uri string) (string, error) { - u, err := url.Parse(uri) - if err != nil { - return "", err - } - - if v, ok := parsers[u.Host]; ok { - return v(uri) - } - return "", errors.New("no parser for url") -} - -func classParser(class string) Parser { - return func(url string) (string, error) { - // Request the HTML page. - res, err := http.Get(url) - if err != nil { - return "", err - } - - defer res.Body.Close() - - if res.StatusCode != 200 { - return "", errors.New("bad status code") - } - - // Load the HTML document - doc, err := goquery.NewDocumentFromReader(res.Body) - if err != nil { - return "", err - } - - return doc.Find(class).Html() - } -} - -func a16zParser(url string) (string, error) { - return classParser(".blog-content")(url) -} - -func cnbcParser(url string) (string, error) { - return classParser(".PageBuilder-col-9")(url) -} diff --git a/feeds/proto/feeds.pb.go b/feeds/proto/feeds.pb.go deleted file mode 100644 index 1b68036..0000000 --- a/feeds/proto/feeds.pb.go +++ /dev/null @@ -1,810 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.15.5 -// source: proto/feeds.proto - -package feeds - -import ( - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type Feed struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // rss feed name - // eg. a16z - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // rss feed url - // eg. http://a16z.com/feed/ - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - // category of the feed - Category string `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"` -} - -func (x *Feed) Reset() { - *x = Feed{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_feeds_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Feed) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Feed) ProtoMessage() {} - -func (x *Feed) ProtoReflect() protoreflect.Message { - mi := &file_proto_feeds_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Feed.ProtoReflect.Descriptor instead. -func (*Feed) Descriptor() ([]byte, []int) { - return file_proto_feeds_proto_rawDescGZIP(), []int{0} -} - -func (x *Feed) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Feed) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *Feed) GetCategory() string { - if x != nil { - return x.Category - } - return "" -} - -type Entry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` - Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` - Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` - Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` - Date int64 `protobuf:"varint,6,opt,name=date,proto3" json:"date,omitempty"` - Category string `protobuf:"bytes,7,opt,name=category,proto3" json:"category,omitempty"` -} - -func (x *Entry) Reset() { - *x = Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_feeds_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Entry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Entry) ProtoMessage() {} - -func (x *Entry) ProtoReflect() protoreflect.Message { - mi := &file_proto_feeds_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Entry.ProtoReflect.Descriptor instead. -func (*Entry) Descriptor() ([]byte, []int) { - return file_proto_feeds_proto_rawDescGZIP(), []int{1} -} - -func (x *Entry) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Entry) GetDomain() string { - if x != nil { - return x.Domain - } - return "" -} - -func (x *Entry) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *Entry) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *Entry) GetContent() string { - if x != nil { - return x.Content - } - return "" -} - -func (x *Entry) GetDate() int64 { - if x != nil { - return x.Date - } - return 0 -} - -func (x *Entry) GetCategory() string { - if x != nil { - return x.Category - } - return "" -} - -type AddRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // rss feed name - // eg. a16z - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // rss feed url - // eg. http://a16z.com/feed/ - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - // category to add - Category string `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"` -} - -func (x *AddRequest) Reset() { - *x = AddRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_feeds_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddRequest) ProtoMessage() {} - -func (x *AddRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_feeds_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddRequest.ProtoReflect.Descriptor instead. -func (*AddRequest) Descriptor() ([]byte, []int) { - return file_proto_feeds_proto_rawDescGZIP(), []int{2} -} - -func (x *AddRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *AddRequest) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *AddRequest) GetCategory() string { - if x != nil { - return x.Category - } - return "" -} - -type AddResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *AddResponse) Reset() { - *x = AddResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_feeds_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddResponse) ProtoMessage() {} - -func (x *AddResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_feeds_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddResponse.ProtoReflect.Descriptor instead. -func (*AddResponse) Descriptor() ([]byte, []int) { - return file_proto_feeds_proto_rawDescGZIP(), []int{3} -} - -type EntriesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // rss feed url - // eg. http://a16z.com/feed/ - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *EntriesRequest) Reset() { - *x = EntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_feeds_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EntriesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EntriesRequest) ProtoMessage() {} - -func (x *EntriesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_feeds_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EntriesRequest.ProtoReflect.Descriptor instead. -func (*EntriesRequest) Descriptor() ([]byte, []int) { - return file_proto_feeds_proto_rawDescGZIP(), []int{4} -} - -func (x *EntriesRequest) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -type EntriesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Entries []*Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` -} - -func (x *EntriesResponse) Reset() { - *x = EntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_feeds_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EntriesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EntriesResponse) ProtoMessage() {} - -func (x *EntriesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_feeds_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EntriesResponse.ProtoReflect.Descriptor instead. -func (*EntriesResponse) Descriptor() ([]byte, []int) { - return file_proto_feeds_proto_rawDescGZIP(), []int{5} -} - -func (x *EntriesResponse) GetEntries() []*Entry { - if x != nil { - return x.Entries - } - return nil -} - -type ListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ListRequest) Reset() { - *x = ListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_feeds_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListRequest) ProtoMessage() {} - -func (x *ListRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_feeds_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. -func (*ListRequest) Descriptor() ([]byte, []int) { - return file_proto_feeds_proto_rawDescGZIP(), []int{6} -} - -type ListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Feeds []*Feed `protobuf:"bytes,1,rep,name=feeds,proto3" json:"feeds,omitempty"` -} - -func (x *ListResponse) Reset() { - *x = ListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_feeds_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListResponse) ProtoMessage() {} - -func (x *ListResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_feeds_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListResponse.ProtoReflect.Descriptor instead. -func (*ListResponse) Descriptor() ([]byte, []int) { - return file_proto_feeds_proto_rawDescGZIP(), []int{7} -} - -func (x *ListResponse) GetFeeds() []*Feed { - if x != nil { - return x.Feeds - } - return nil -} - -type RemoveRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // rss feed name - // eg. a16z - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *RemoveRequest) Reset() { - *x = RemoveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_feeds_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveRequest) ProtoMessage() {} - -func (x *RemoveRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_feeds_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveRequest.ProtoReflect.Descriptor instead. -func (*RemoveRequest) Descriptor() ([]byte, []int) { - return file_proto_feeds_proto_rawDescGZIP(), []int{8} -} - -func (x *RemoveRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type RemoveResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RemoveResponse) Reset() { - *x = RemoveResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_feeds_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveResponse) ProtoMessage() {} - -func (x *RemoveResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_feeds_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveResponse.ProtoReflect.Descriptor instead. -func (*RemoveResponse) Descriptor() ([]byte, []int) { - return file_proto_feeds_proto_rawDescGZIP(), []int{9} -} - -var File_proto_feeds_proto protoreflect.FileDescriptor - -var file_proto_feeds_proto_rawDesc = []byte{ - 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x66, 0x65, 0x65, 0x64, 0x73, 0x22, 0x48, 0x0a, 0x04, 0x46, 0x65, - 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, - 0x67, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, - 0x67, 0x6f, 0x72, 0x79, 0x22, 0xa1, 0x01, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, - 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x4e, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, - 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x0d, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x0a, 0x0e, 0x45, 0x6e, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x39, 0x0a, 0x0f, 0x45, - 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, - 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0c, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, - 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x0d, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x31, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x66, 0x65, 0x65, 0x64, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x46, 0x65, 0x65, - 0x64, 0x52, 0x05, 0x66, 0x65, 0x65, 0x64, 0x73, 0x22, 0x23, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x10, 0x0a, - 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, - 0xdf, 0x01, 0x0a, 0x05, 0x46, 0x65, 0x65, 0x64, 0x73, 0x12, 0x2e, 0x0a, 0x03, 0x41, 0x64, 0x64, - 0x12, 0x11, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x06, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x66, 0x65, 0x65, 0x64, - 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x07, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x15, 0x2e, - 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x45, 0x6e, 0x74, - 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x31, - 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x66, 0x65, 0x65, - 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x42, 0x0d, 0x5a, 0x0b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x66, 0x65, 0x65, 0x64, 0x73, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_feeds_proto_rawDescOnce sync.Once - file_proto_feeds_proto_rawDescData = file_proto_feeds_proto_rawDesc -) - -func file_proto_feeds_proto_rawDescGZIP() []byte { - file_proto_feeds_proto_rawDescOnce.Do(func() { - file_proto_feeds_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_feeds_proto_rawDescData) - }) - return file_proto_feeds_proto_rawDescData -} - -var file_proto_feeds_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_proto_feeds_proto_goTypes = []interface{}{ - (*Feed)(nil), // 0: feeds.Feed - (*Entry)(nil), // 1: feeds.Entry - (*AddRequest)(nil), // 2: feeds.AddRequest - (*AddResponse)(nil), // 3: feeds.AddResponse - (*EntriesRequest)(nil), // 4: feeds.EntriesRequest - (*EntriesResponse)(nil), // 5: feeds.EntriesResponse - (*ListRequest)(nil), // 6: feeds.ListRequest - (*ListResponse)(nil), // 7: feeds.ListResponse - (*RemoveRequest)(nil), // 8: feeds.RemoveRequest - (*RemoveResponse)(nil), // 9: feeds.RemoveResponse -} -var file_proto_feeds_proto_depIdxs = []int32{ - 1, // 0: feeds.EntriesResponse.entries:type_name -> feeds.Entry - 0, // 1: feeds.ListResponse.feeds:type_name -> feeds.Feed - 2, // 2: feeds.Feeds.Add:input_type -> feeds.AddRequest - 8, // 3: feeds.Feeds.Remove:input_type -> feeds.RemoveRequest - 4, // 4: feeds.Feeds.Entries:input_type -> feeds.EntriesRequest - 6, // 5: feeds.Feeds.List:input_type -> feeds.ListRequest - 3, // 6: feeds.Feeds.Add:output_type -> feeds.AddResponse - 9, // 7: feeds.Feeds.Remove:output_type -> feeds.RemoveResponse - 5, // 8: feeds.Feeds.Entries:output_type -> feeds.EntriesResponse - 7, // 9: feeds.Feeds.List:output_type -> feeds.ListResponse - 6, // [6:10] is the sub-list for method output_type - 2, // [2:6] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_proto_feeds_proto_init() } -func file_proto_feeds_proto_init() { - if File_proto_feeds_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_feeds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Feed); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_feeds_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_feeds_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_feeds_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_feeds_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_feeds_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_feeds_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_feeds_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_feeds_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_feeds_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_feeds_proto_rawDesc, - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_feeds_proto_goTypes, - DependencyIndexes: file_proto_feeds_proto_depIdxs, - MessageInfos: file_proto_feeds_proto_msgTypes, - }.Build() - File_proto_feeds_proto = out.File - file_proto_feeds_proto_rawDesc = nil - file_proto_feeds_proto_goTypes = nil - file_proto_feeds_proto_depIdxs = nil -} diff --git a/feeds/proto/feeds.pb.micro.go b/feeds/proto/feeds.pb.micro.go deleted file mode 100644 index abcc326..0000000 --- a/feeds/proto/feeds.pb.micro.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by protoc-gen-micro. DO NOT EDIT. -// source: proto/feeds.proto - -package feeds - -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" -) - -import ( - context "context" - api "github.com/micro/micro/v3/service/api" - client "github.com/micro/micro/v3/service/client" - server "github.com/micro/micro/v3/service/server" -) - -// 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 - -// Reference imports to suppress errors if they are not otherwise used. -var _ api.Endpoint -var _ context.Context -var _ client.Option -var _ server.Option - -// Api Endpoints for Feeds service - -func NewFeedsEndpoints() []*api.Endpoint { - return []*api.Endpoint{} -} - -// Client API for Feeds service - -type FeedsService interface { - Add(ctx context.Context, in *AddRequest, opts ...client.CallOption) (*AddResponse, error) - Remove(ctx context.Context, in *RemoveRequest, opts ...client.CallOption) (*RemoveResponse, error) - Entries(ctx context.Context, in *EntriesRequest, opts ...client.CallOption) (*EntriesResponse, error) - List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (*ListResponse, error) -} - -type feedsService struct { - c client.Client - name string -} - -func NewFeedsService(name string, c client.Client) FeedsService { - return &feedsService{ - c: c, - name: name, - } -} - -func (c *feedsService) Add(ctx context.Context, in *AddRequest, opts ...client.CallOption) (*AddResponse, error) { - req := c.c.NewRequest(c.name, "Feeds.Add", in) - out := new(AddResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *feedsService) Remove(ctx context.Context, in *RemoveRequest, opts ...client.CallOption) (*RemoveResponse, error) { - req := c.c.NewRequest(c.name, "Feeds.Remove", in) - out := new(RemoveResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *feedsService) Entries(ctx context.Context, in *EntriesRequest, opts ...client.CallOption) (*EntriesResponse, error) { - req := c.c.NewRequest(c.name, "Feeds.Entries", in) - out := new(EntriesResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *feedsService) List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (*ListResponse, error) { - req := c.c.NewRequest(c.name, "Feeds.List", in) - out := new(ListResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for Feeds service - -type FeedsHandler interface { - Add(context.Context, *AddRequest, *AddResponse) error - Remove(context.Context, *RemoveRequest, *RemoveResponse) error - Entries(context.Context, *EntriesRequest, *EntriesResponse) error - List(context.Context, *ListRequest, *ListResponse) error -} - -func RegisterFeedsHandler(s server.Server, hdlr FeedsHandler, opts ...server.HandlerOption) error { - type feeds interface { - Add(ctx context.Context, in *AddRequest, out *AddResponse) error - Remove(ctx context.Context, in *RemoveRequest, out *RemoveResponse) error - Entries(ctx context.Context, in *EntriesRequest, out *EntriesResponse) error - List(ctx context.Context, in *ListRequest, out *ListResponse) error - } - type Feeds struct { - feeds - } - h := &feedsHandler{hdlr} - return s.Handle(s.NewHandler(&Feeds{h}, opts...)) -} - -type feedsHandler struct { - FeedsHandler -} - -func (h *feedsHandler) Add(ctx context.Context, in *AddRequest, out *AddResponse) error { - return h.FeedsHandler.Add(ctx, in, out) -} - -func (h *feedsHandler) Remove(ctx context.Context, in *RemoveRequest, out *RemoveResponse) error { - return h.FeedsHandler.Remove(ctx, in, out) -} - -func (h *feedsHandler) Entries(ctx context.Context, in *EntriesRequest, out *EntriesResponse) error { - return h.FeedsHandler.Entries(ctx, in, out) -} - -func (h *feedsHandler) List(ctx context.Context, in *ListRequest, out *ListResponse) error { - return h.FeedsHandler.List(ctx, in, out) -} diff --git a/feeds/proto/feeds.proto b/feeds/proto/feeds.proto deleted file mode 100644 index bc42780..0000000 --- a/feeds/proto/feeds.proto +++ /dev/null @@ -1,73 +0,0 @@ -syntax = "proto3"; - -package feeds; - -option go_package = "./proto;feeds"; - -service Feeds { - rpc Add(AddRequest) returns (AddResponse) {} - rpc Remove(RemoveRequest) returns (RemoveResponse) {} - rpc Entries(EntriesRequest) returns (EntriesResponse) {} - rpc List(ListRequest) returns (ListResponse) {} -} - -message Feed { - // rss feed name - // eg. a16z - string name = 1; - // rss feed url - // eg. http://a16z.com/feed/ - string url = 2; - // category of the feed - string category = 3; -} - -message Entry { - string id = 1; - string domain = 2; - string url = 3; - string title = 4; - string content = 5; - int64 date = 6; - string category = 7; -} - -message AddRequest { - // rss feed name - // eg. a16z - string name = 1; - // rss feed url - // eg. http://a16z.com/feed/ - string url = 2; - // category to add - string category = 3; -} - -message AddResponse { -} - -message EntriesRequest { - // rss feed url - // eg. http://a16z.com/feed/ - string url = 1; -} - -message EntriesResponse { - repeated Entry entries = 1; -} - -message ListRequest {} - -message ListResponse { - repeated Feed feeds = 1; -} - -message RemoveRequest { - // rss feed name - // eg. a16z - string name = 1; -} - -message RemoveResponse { -} - diff --git a/feeds/usage.md b/feeds/usage.md deleted file mode 100644 index 70b4d43..0000000 --- a/feeds/usage.md +++ /dev/null @@ -1,65 +0,0 @@ -A single uniform API for crawling and indexing RSS feeds - -# Feeds Service - -Designed to populate the posts service with RSS feeds from other blogs. Useful for migration or just to get outside content into the posts service. - -## Creating a feed - -### cURL - -```bash -> curl 'https://api.m3o.com/feeds/New' \ - -H 'micro-namespace: $yourNamespace' \ - -H 'authorization: Bearer $yourToken' \ - -d '{"name":"a16z", "url": "http://a16z.com/feed/"}'; -{} -``` - -### CLI - -```shell -micro feeds add --name="a16z" --url=http://a16z.com/feed/ -``` - -## Querying feeded posts - -```shell -$ micro posts query -{ - "posts": [ - { - "id": "39cdfbd6e7534bcd868be9eebbf43f8f", - "title": "Anthony Albanese: From the NYSE to Crypto", - "slug": "anthony-albanese-from-the-nyse-to-crypto", - "created": "1605104742", - "updated": "1605105364", - "metadata": { - "domain": "a16z.com", - "link": "https://a16z.com/2020/10/28/anthony-albanese-from-the-nyse-to-crypto/" - } - }, - { - "id": "5e9285c01311704e204322ba564cd99e", - "title": "Journal Club: From Insect Eyes to Nanomaterials", - "slug": "journal-club-from-insect-eyes-to-nanomaterials", - "created": "1605104741", - "updated": "1605105363", - "metadata": { - "domain": "a16z.com", - "link": "https://a16z.com/2020/10/29/journal-club-insect-eyes-nanomaterials/" - } - }, - ] -} -``` - -``` -make proto -``` - -Run the service - -``` -micro run . -``` diff --git a/go.mod b/go.mod index 0b1917a..e773abd 100644 --- a/go.mod +++ b/go.mod @@ -4,14 +4,11 @@ go 1.14 require ( github.com/Masterminds/semver/v3 v3.1.1 - github.com/PuerkitoBio/goquery v1.6.1 - github.com/SlyMarbo/rss v1.0.1 github.com/disintegration/imaging v1.6.2 github.com/getkin/kin-openapi v0.26.0 github.com/gojuno/go.osrm v0.1.1-0.20200217151037-435fc3e1d3d4 github.com/golang/protobuf v1.5.1 github.com/google/uuid v1.1.2 - github.com/gosimple/slug v1.9.0 github.com/hailocab/go-geoindex v0.0.0-20160127134810-64631bfe9711 github.com/lib/pq v1.9.0 // indirect github.com/micro/dev v0.0.0-20201117163752-d3cfc9788dfa diff --git a/go.sum b/go.sum index 88d18e6..f43cd68 100644 --- a/go.sum +++ b/go.sum @@ -53,12 +53,8 @@ github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0 github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/hcsshim v0.8.7-0.20191101173118-65519b62243c/go.mod h1:7xhjOwRV2+0HXGmM0jxaEu+ZiXJFoVZOTfL/dmqbrD8= github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:iGLljf5n9GjT6kc0HBvyI1nOKnGQbNB66VzSNbK5iks= -github.com/PuerkitoBio/goquery v1.6.1 h1:FgjbQZKl5HTmcn4sKBgvx8vv63nhyhIpv7lJpFGCWpk= -github.com/PuerkitoBio/goquery v1.6.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/SlyMarbo/rss v1.0.1 h1:fiaIU5UhcXauVOniHOIocWG7uj8Ej6pHNarMGPJilzA= -github.com/SlyMarbo/rss v1.0.1/go.mod h1:JNF+T33oj4m5WLCQXpBTCgO+SxRbYVgdiiimHNgzcbA= github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.0/go.mod h1:zpDJeKyp9ScW4NNrbdr+Eyxvry3ilGPewKoXw3XGN1k= 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= @@ -66,14 +62,10 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190808125512-07798873deee/go.mod h1:myCDvQSzCW+wB1WAlocEru4wMGJxy+vlxHdhegi1CDQ= github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= -github.com/andybalholm/cascadia v1.1.0 h1:BuuO6sSfQNFRu1LppgbD25Hr2vLYW25JvxHs5zzsLTo= -github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 h1:EFSB7Zo9Eg91v7MJPVsifUysc/wPdN+NOnVe6bWbdBM= github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= github.com/aws/aws-sdk-go v1.23.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/axgle/mahonia v0.0.0-20180208002826-3358181d7394 h1:OYA+5W64v3OgClL+IrOD63t4i/RW7RqrAVl9LTZ9UqQ= -github.com/axgle/mahonia v0.0.0-20180208002826-3358181d7394/go.mod h1:Q8n74mJTIgjX4RBBcHnJ05h//6/k6foqmgE45jTQtxg= 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= @@ -744,7 +736,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= diff --git a/posts/.gitignore b/posts/.gitignore deleted file mode 100644 index ee118e2..0000000 --- a/posts/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ - -./posts diff --git a/posts/Dockerfile b/posts/Dockerfile deleted file mode 100644 index 6a746fe..0000000 --- a/posts/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM alpine -ADD post-service /post-service -ENTRYPOINT [ "/post-service" ] diff --git a/posts/Makefile b/posts/Makefile deleted file mode 100644 index 9f4c678..0000000 --- a/posts/Makefile +++ /dev/null @@ -1,27 +0,0 @@ - -GOPATH:=$(shell go env GOPATH) -MODIFY=Mgithub.com/micro/micro/proto/api/api.proto=github.com/micro/micro/v3/proto/api - -.PHONY: proto -proto: - - protoc --openapi_out=. --proto_path=. --micro_out=${MODIFY}:. --go_out=${MODIFY}:. proto/posts.proto - -.PHONY: docs -docs: - - protoc --openapi_out=. --proto_path=. --micro_out=${MODIFY}:. --go_out=${MODIFY}:. proto/posts.proto - @redoc-cli bundle api-posts.json - -.PHONY: build -build: proto - - go build -o post-service *.go - -.PHONY: test -test: - go test -v ./... -cover - -.PHONY: docker -docker: - docker build . -t post-service:latest diff --git a/posts/README.md b/posts/README.md deleted file mode 100644 index 6704a8c..0000000 --- a/posts/README.md +++ /dev/null @@ -1,6 +0,0 @@ -Build a blog or the foundations of a headless CMS with posts - -# Post Service - -Posts is the foundation of a headless CMS, storing blog posts with their metadata and enabling simple retrieval and querying. - diff --git a/posts/SKIP b/posts/SKIP deleted file mode 100644 index e69de29..0000000 diff --git a/posts/generate.go b/posts/generate.go deleted file mode 100644 index 7d9db91..0000000 --- a/posts/generate.go +++ /dev/null @@ -1,3 +0,0 @@ -package main - -//go:generate make proto diff --git a/posts/handler/posts.go b/posts/handler/posts.go deleted file mode 100644 index 4fd483f..0000000 --- a/posts/handler/posts.go +++ /dev/null @@ -1,262 +0,0 @@ -package handler - -import ( - "context" - "time" - - "github.com/micro/micro/v3/service" - "github.com/micro/micro/v3/service/errors" - "github.com/micro/micro/v3/service/logger" - "github.com/micro/micro/v3/service/model" - - "github.com/gosimple/slug" - proto "github.com/micro/services/posts/proto" - tags "github.com/micro/services/tags/proto" -) - -const ( - tagType = "post-tag" -) - -type Posts struct { - Tags tags.TagsService - db model.Model -} - -func NewPosts(tagsService tags.TagsService) *Posts { - createdIndex := model.ByEquality("created") - createdIndex.Order.Type = model.OrderTypeDesc - - // create a new model - db := model.NewModel( - model.WithIndexes(model.ByEquality("slug"), createdIndex), - ) - // register the post instance - db.Register(new(proto.Post)) - - return &Posts{ - Tags: tagsService, - db: db, - } -} - -func (p *Posts) Save(ctx context.Context, req *proto.SaveRequest, rsp *proto.SaveResponse) error { - if len(req.Id) == 0 { - return errors.BadRequest("proto.save.input-check", "Id is missing") - } - - // look for an existing post - posts := []*proto.Post{} - q := model.QueryEquals("id", req.Id) - q.Order.Type = model.OrderTypeUnordered - - if err := p.db.Read(q, &posts); err != nil { - return errors.InternalServerError("proto.save.store-id-read", "Failed to read post by id: %v", err.Error()) - } - postSlug := slug.Make(req.Title) - - // If no existing record is found, create a new one - if len(posts) == 0 { - post := &proto.Post{ - Id: req.Id, - Title: req.Title, - Content: req.Content, - Tags: req.Tags, - Slug: postSlug, - Created: req.Timestamp, - Metadata: req.Metadata, - Image: req.Image, - } - if post.Created == 0 { - post.Created = time.Now().Unix() - } - err := p.savePost(ctx, nil, post) - if err != nil { - return errors.InternalServerError("proto.save.post-save", "Failed to save new post: %v", err.Error()) - } - return nil - } - - // get the old post - oldPost := posts[0] - - post := &proto.Post{ - Id: req.Id, - Title: oldPost.Title, - Content: oldPost.Content, - Slug: oldPost.Slug, - Tags: oldPost.Tags, - Created: oldPost.Created, - Updated: req.Timestamp, - Metadata: oldPost.Metadata, - Image: oldPost.Image, - } - - // merge the metadata - for k, v := range req.Metadata { - post.Metadata[k] = v - } - - if post.Created == 0 { - post.Created = time.Now().Unix() - } - if len(req.Image) > 0 { - post.Image = req.Image - } - if len(req.Title) > 0 { - post.Title = req.Title - post.Slug = slug.Make(post.Title) - } - if len(req.Slug) > 0 { - post.Slug = req.Slug - } - if len(req.Content) > 0 { - post.Content = req.Content - } - if len(req.Tags) > 0 { - // Handle the special case of deletion - if len(req.Tags) == 0 && req.Tags[0] == "" { - post.Tags = []string{} - } else { - post.Tags = req.Tags - } - } - - postsWithThisSlug := []*proto.Post{} - if err := p.db.Read(model.QueryEquals("slug", postSlug), &postsWithThisSlug); err != nil { - return errors.InternalServerError("proto.save.store-read", "Failed to read post by slug: %v", err.Error()) - } - - if len(postsWithThisSlug) > 0 { - if oldPost.Id != postsWithThisSlug[0].Id { - return errors.BadRequest("proto.save.slug-check", "An other post with this slug already exists") - } - } - - return p.savePost(ctx, oldPost, post) -} - -func (p *Posts) savePost(ctx context.Context, oldPost, post *proto.Post) error { - if err := p.db.Create(post); err != nil { - return err - } - - if oldPost == nil { - // publish the post as an event - logger.Infof("Publishing post: '%v'", post.Title) - service.NewEvent("posts").Publish(ctx, post) - - for _, tagName := range post.Tags { - _, err := p.Tags.Add(ctx, &tags.AddRequest{ - ResourceID: post.Id, - Type: tagType, - Title: tagName, - }) - if err != nil { - return err - } - } - - return nil - } - - return p.diffTags(ctx, post.Id, oldPost.Tags, post.Tags) -} - -func (p *Posts) diffTags(ctx context.Context, parentID string, oldTagNames, newTagNames []string) error { - oldTags := map[string]struct{}{} - for _, v := range oldTagNames { - oldTags[v] = struct{}{} - } - newTags := map[string]struct{}{} - for _, v := range newTagNames { - newTags[v] = struct{}{} - } - for i := range oldTags { - _, stillThere := newTags[i] - if !stillThere { - _, err := p.Tags.Remove(ctx, &tags.RemoveRequest{ - ResourceID: parentID, - Type: tagType, - Title: i, - }) - if err != nil { - logger.Errorf("Error decreasing count for tag '%v' with type '%v' for parent '%v'", i, tagType, parentID) - } - } - } - for i := range newTags { - _, newlyAdded := oldTags[i] - if newlyAdded { - _, err := p.Tags.Add(ctx, &tags.AddRequest{ - ResourceID: parentID, - Type: tagType, - Title: i, - }) - if err != nil { - logger.Errorf("Error increasing count for tag '%v' with type '%v' for parent '%v': %v", i, tagType, parentID, err) - } - } - } - return nil -} - -func (p *Posts) Index(ctx context.Context, req *proto.IndexRequest, rsp *proto.IndexResponse) error { - // create a simple descending order query - q := model.QueryEquals("created", nil) - q.Order.Type = model.OrderTypeDesc - q.Offset = req.Offset - q.Limit = req.Limit - - var posts []*proto.Post - - // read all the records - if err := p.db.Read(q, &posts); err != nil { - return err - } - - // iterate and add - for _, post := range posts { - // strip the content - post.Content = "" - rsp.Posts = append(rsp.Posts, post) - } - - return nil -} - -func (p *Posts) Query(ctx context.Context, req *proto.QueryRequest, rsp *proto.QueryResponse) error { - var q model.Query - if len(req.Slug) > 0 { - logger.Infof("Reading post by slug: %v", req.Slug) - q = model.QueryEquals("slug", req.Slug) - } else if len(req.Id) > 0 { - logger.Infof("Reading post by id: %v", req.Id) - q = model.QueryEquals("id", req.Id) - q.Order.Type = model.OrderTypeUnordered - } else { - q = model.QueryEquals("created", nil) - q.Order.Type = model.OrderTypeDesc - var limit uint - limit = 20 - if req.Limit > 0 { - limit = uint(req.Limit) - } - q.Limit = int64(limit) - q.Offset = req.Offset - logger.Infof("Listing posts, offset: %v, limit: %v", req.Offset, limit) - } - - if err := p.db.Read(q, &rsp.Posts); err != nil { - return err - } - - return nil -} - -func (p *Posts) Delete(ctx context.Context, req *proto.DeleteRequest, rsp *proto.DeleteResponse) error { - logger.Info("Received Post.Delete request") - q := model.QueryEquals("id", req.Id) - q.Order.Type = model.OrderTypeUnordered - return p.db.Delete(q) -} diff --git a/posts/main.go b/posts/main.go deleted file mode 100644 index 39b3c8f..0000000 --- a/posts/main.go +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "github.com/micro/micro/v3/service" - "github.com/micro/micro/v3/service/logger" - "github.com/micro/services/posts/handler" - tags "github.com/micro/services/tags/proto" -) - -func main() { - // Create the service - srv := service.New( - service.Name("posts"), - ) - - // Register Handler - srv.Handle(handler.NewPosts( - tags.NewTagsService("tags", srv.Client()), - )) - - // Run service - if err := srv.Run(); err != nil { - logger.Fatal(err) - } -} diff --git a/posts/micro.mu b/posts/micro.mu deleted file mode 100644 index b33b31f..0000000 --- a/posts/micro.mu +++ /dev/null @@ -1 +0,0 @@ -service posts \ No newline at end of file diff --git a/posts/proto/posts.pb.go b/posts/proto/posts.pb.go deleted file mode 100644 index 6313a25..0000000 --- a/posts/proto/posts.pb.go +++ /dev/null @@ -1,876 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.15.5 -// source: proto/posts.proto - -package posts - -import ( - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type Post struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` - Slug string `protobuf:"bytes,3,opt,name=slug,proto3" json:"slug,omitempty"` - Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` - Created int64 `protobuf:"varint,5,opt,name=created,proto3" json:"created,omitempty"` - Updated int64 `protobuf:"varint,6,opt,name=updated,proto3" json:"updated,omitempty"` - Author string `protobuf:"bytes,7,opt,name=author,proto3" json:"author,omitempty"` - Tags []string `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags,omitempty"` - Metadata map[string]string `protobuf:"bytes,9,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Image string `protobuf:"bytes,19,opt,name=image,proto3" json:"image,omitempty"` -} - -func (x *Post) Reset() { - *x = Post{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Post) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Post) ProtoMessage() {} - -func (x *Post) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Post.ProtoReflect.Descriptor instead. -func (*Post) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{0} -} - -func (x *Post) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Post) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *Post) GetSlug() string { - if x != nil { - return x.Slug - } - return "" -} - -func (x *Post) GetContent() string { - if x != nil { - return x.Content - } - return "" -} - -func (x *Post) GetCreated() int64 { - if x != nil { - return x.Created - } - return 0 -} - -func (x *Post) GetUpdated() int64 { - if x != nil { - return x.Updated - } - return 0 -} - -func (x *Post) GetAuthor() string { - if x != nil { - return x.Author - } - return "" -} - -func (x *Post) GetTags() []string { - if x != nil { - return x.Tags - } - return nil -} - -func (x *Post) GetMetadata() map[string]string { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *Post) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -type IndexRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` - Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` -} - -func (x *IndexRequest) Reset() { - *x = IndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IndexRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IndexRequest) ProtoMessage() {} - -func (x *IndexRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IndexRequest.ProtoReflect.Descriptor instead. -func (*IndexRequest) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{1} -} - -func (x *IndexRequest) GetLimit() int64 { - if x != nil { - return x.Limit - } - return 0 -} - -func (x *IndexRequest) GetOffset() int64 { - if x != nil { - return x.Offset - } - return 0 -} - -type IndexResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` -} - -func (x *IndexResponse) Reset() { - *x = IndexResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IndexResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IndexResponse) ProtoMessage() {} - -func (x *IndexResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IndexResponse.ProtoReflect.Descriptor instead. -func (*IndexResponse) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{2} -} - -func (x *IndexResponse) GetPosts() []*Post { - if x != nil { - return x.Posts - } - return nil -} - -// Query posts. Acts as a listing when no id or slug provided. -// Gets a single post by id or slug if any of them provided. -type QueryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"` - Tag string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"` - Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"` - Limit int64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` -} - -func (x *QueryRequest) Reset() { - *x = QueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryRequest) ProtoMessage() {} - -func (x *QueryRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead. -func (*QueryRequest) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *QueryRequest) GetSlug() string { - if x != nil { - return x.Slug - } - return "" -} - -func (x *QueryRequest) GetTag() string { - if x != nil { - return x.Tag - } - return "" -} - -func (x *QueryRequest) GetOffset() int64 { - if x != nil { - return x.Offset - } - return 0 -} - -func (x *QueryRequest) GetLimit() int64 { - if x != nil { - return x.Limit - } - return 0 -} - -type QueryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` -} - -func (x *QueryResponse) Reset() { - *x = QueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryResponse) ProtoMessage() {} - -func (x *QueryResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead. -func (*QueryResponse) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryResponse) GetPosts() []*Post { - if x != nil { - return x.Posts - } - return nil -} - -type SaveRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` - Slug string `protobuf:"bytes,3,opt,name=slug,proto3" json:"slug,omitempty"` - Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` - Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - // When updating a post and wanting to delete all tags, - // send a list of tags with only one member being an empty string [""] - Tags []string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"` - Metadata map[string]string `protobuf:"bytes,7,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Image string `protobuf:"bytes,8,opt,name=image,proto3" json:"image,omitempty"` -} - -func (x *SaveRequest) Reset() { - *x = SaveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SaveRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SaveRequest) ProtoMessage() {} - -func (x *SaveRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SaveRequest.ProtoReflect.Descriptor instead. -func (*SaveRequest) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{5} -} - -func (x *SaveRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *SaveRequest) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *SaveRequest) GetSlug() string { - if x != nil { - return x.Slug - } - return "" -} - -func (x *SaveRequest) GetContent() string { - if x != nil { - return x.Content - } - return "" -} - -func (x *SaveRequest) GetTimestamp() int64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -func (x *SaveRequest) GetTags() []string { - if x != nil { - return x.Tags - } - return nil -} - -func (x *SaveRequest) GetMetadata() map[string]string { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *SaveRequest) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -type SaveResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *SaveResponse) Reset() { - *x = SaveResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SaveResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SaveResponse) ProtoMessage() {} - -func (x *SaveResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SaveResponse.ProtoReflect.Descriptor instead. -func (*SaveResponse) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{6} -} - -func (x *SaveResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type DeleteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteRequest) Reset() { - *x = DeleteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteRequest) ProtoMessage() {} - -func (x *DeleteRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. -func (*DeleteRequest) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{7} -} - -func (x *DeleteRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type DeleteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteResponse) Reset() { - *x = DeleteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteResponse) ProtoMessage() {} - -func (x *DeleteResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead. -func (*DeleteResponse) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{8} -} - -var File_proto_posts_proto protoreflect.FileDescriptor - -var file_proto_posts_proto_rawDesc = []byte{ - 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x22, 0xc4, 0x02, 0x0a, 0x04, 0x50, - 0x6f, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, - 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x12, 0x18, 0x0a, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x6f, 0x73, 0x74, - 0x73, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x3c, 0x0a, 0x0c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, - 0x32, 0x0a, 0x0d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x21, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0b, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x05, 0x70, 0x6f, - 0x73, 0x74, 0x73, 0x22, 0x72, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x32, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, - 0x50, 0x6f, 0x73, 0x74, 0x52, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x22, 0xa4, 0x02, 0x0a, 0x0b, - 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, - 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x73, 0x6c, 0x75, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, - 0x73, 0x12, 0x3c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x53, 0x61, 0x76, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x69, 0x6d, 0x61, 0x67, 0x65, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x1e, 0x0a, 0x0c, 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x1f, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xdf, 0x01, 0x0a, 0x05, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x12, - 0x34, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x13, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, - 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, - 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x13, - 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x04, 0x53, - 0x61, 0x76, 0x65, 0x12, 0x12, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x53, 0x61, 0x76, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, - 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, - 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x14, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, - 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_posts_proto_rawDescOnce sync.Once - file_proto_posts_proto_rawDescData = file_proto_posts_proto_rawDesc -) - -func file_proto_posts_proto_rawDescGZIP() []byte { - file_proto_posts_proto_rawDescOnce.Do(func() { - file_proto_posts_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_posts_proto_rawDescData) - }) - return file_proto_posts_proto_rawDescData -} - -var file_proto_posts_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_proto_posts_proto_goTypes = []interface{}{ - (*Post)(nil), // 0: posts.Post - (*IndexRequest)(nil), // 1: posts.IndexRequest - (*IndexResponse)(nil), // 2: posts.IndexResponse - (*QueryRequest)(nil), // 3: posts.QueryRequest - (*QueryResponse)(nil), // 4: posts.QueryResponse - (*SaveRequest)(nil), // 5: posts.SaveRequest - (*SaveResponse)(nil), // 6: posts.SaveResponse - (*DeleteRequest)(nil), // 7: posts.DeleteRequest - (*DeleteResponse)(nil), // 8: posts.DeleteResponse - nil, // 9: posts.Post.MetadataEntry - nil, // 10: posts.SaveRequest.MetadataEntry -} -var file_proto_posts_proto_depIdxs = []int32{ - 9, // 0: posts.Post.metadata:type_name -> posts.Post.MetadataEntry - 0, // 1: posts.IndexResponse.posts:type_name -> posts.Post - 0, // 2: posts.QueryResponse.posts:type_name -> posts.Post - 10, // 3: posts.SaveRequest.metadata:type_name -> posts.SaveRequest.MetadataEntry - 1, // 4: posts.Posts.Index:input_type -> posts.IndexRequest - 3, // 5: posts.Posts.Query:input_type -> posts.QueryRequest - 5, // 6: posts.Posts.Save:input_type -> posts.SaveRequest - 7, // 7: posts.Posts.Delete:input_type -> posts.DeleteRequest - 2, // 8: posts.Posts.Index:output_type -> posts.IndexResponse - 4, // 9: posts.Posts.Query:output_type -> posts.QueryResponse - 6, // 10: posts.Posts.Save:output_type -> posts.SaveResponse - 8, // 11: posts.Posts.Delete:output_type -> posts.DeleteResponse - 8, // [8:12] is the sub-list for method output_type - 4, // [4:8] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_proto_posts_proto_init() } -func file_proto_posts_proto_init() { - if File_proto_posts_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_posts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Post); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_posts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_posts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IndexResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_posts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_posts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_posts_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SaveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_posts_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SaveResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_posts_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_posts_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_posts_proto_rawDesc, - NumEnums: 0, - NumMessages: 11, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_posts_proto_goTypes, - DependencyIndexes: file_proto_posts_proto_depIdxs, - MessageInfos: file_proto_posts_proto_msgTypes, - }.Build() - File_proto_posts_proto = out.File - file_proto_posts_proto_rawDesc = nil - file_proto_posts_proto_goTypes = nil - file_proto_posts_proto_depIdxs = nil -} diff --git a/posts/proto/posts.pb.micro.go b/posts/proto/posts.pb.micro.go deleted file mode 100644 index 6439b7f..0000000 --- a/posts/proto/posts.pb.micro.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by protoc-gen-micro. DO NOT EDIT. -// source: proto/posts.proto - -package posts - -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" -) - -import ( - context "context" - api "github.com/micro/micro/v3/service/api" - client "github.com/micro/micro/v3/service/client" - server "github.com/micro/micro/v3/service/server" -) - -// 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 - -// Reference imports to suppress errors if they are not otherwise used. -var _ api.Endpoint -var _ context.Context -var _ client.Option -var _ server.Option - -// Api Endpoints for Posts service - -func NewPostsEndpoints() []*api.Endpoint { - return []*api.Endpoint{} -} - -// Client API for Posts service - -type PostsService interface { - // Index returns the posts index without content - Index(ctx context.Context, in *IndexRequest, opts ...client.CallOption) (*IndexResponse, error) - // Query currently only supports read by slug or timestamp, no listing. - Query(ctx context.Context, in *QueryRequest, opts ...client.CallOption) (*QueryResponse, error) - Save(ctx context.Context, in *SaveRequest, opts ...client.CallOption) (*SaveResponse, error) - Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error) -} - -type postsService struct { - c client.Client - name string -} - -func NewPostsService(name string, c client.Client) PostsService { - return &postsService{ - c: c, - name: name, - } -} - -func (c *postsService) Index(ctx context.Context, in *IndexRequest, opts ...client.CallOption) (*IndexResponse, error) { - req := c.c.NewRequest(c.name, "Posts.Index", in) - out := new(IndexResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *postsService) Query(ctx context.Context, in *QueryRequest, opts ...client.CallOption) (*QueryResponse, error) { - req := c.c.NewRequest(c.name, "Posts.Query", in) - out := new(QueryResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *postsService) Save(ctx context.Context, in *SaveRequest, opts ...client.CallOption) (*SaveResponse, error) { - req := c.c.NewRequest(c.name, "Posts.Save", in) - out := new(SaveResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *postsService) Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error) { - req := c.c.NewRequest(c.name, "Posts.Delete", in) - out := new(DeleteResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for Posts service - -type PostsHandler interface { - // Index returns the posts index without content - Index(context.Context, *IndexRequest, *IndexResponse) error - // Query currently only supports read by slug or timestamp, no listing. - Query(context.Context, *QueryRequest, *QueryResponse) error - Save(context.Context, *SaveRequest, *SaveResponse) error - Delete(context.Context, *DeleteRequest, *DeleteResponse) error -} - -func RegisterPostsHandler(s server.Server, hdlr PostsHandler, opts ...server.HandlerOption) error { - type posts interface { - Index(ctx context.Context, in *IndexRequest, out *IndexResponse) error - Query(ctx context.Context, in *QueryRequest, out *QueryResponse) error - Save(ctx context.Context, in *SaveRequest, out *SaveResponse) error - Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error - } - type Posts struct { - posts - } - h := &postsHandler{hdlr} - return s.Handle(s.NewHandler(&Posts{h}, opts...)) -} - -type postsHandler struct { - PostsHandler -} - -func (h *postsHandler) Index(ctx context.Context, in *IndexRequest, out *IndexResponse) error { - return h.PostsHandler.Index(ctx, in, out) -} - -func (h *postsHandler) Query(ctx context.Context, in *QueryRequest, out *QueryResponse) error { - return h.PostsHandler.Query(ctx, in, out) -} - -func (h *postsHandler) Save(ctx context.Context, in *SaveRequest, out *SaveResponse) error { - return h.PostsHandler.Save(ctx, in, out) -} - -func (h *postsHandler) Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error { - return h.PostsHandler.Delete(ctx, in, out) -} diff --git a/posts/proto/posts.proto b/posts/proto/posts.proto deleted file mode 100644 index fef56a1..0000000 --- a/posts/proto/posts.proto +++ /dev/null @@ -1,74 +0,0 @@ -syntax = "proto3"; - -package posts; - -option go_package = "./proto;posts"; - -service Posts { - // Index returns the posts index without content - rpc Index(IndexRequest) returns (IndexResponse) {} - // Query currently only supports read by slug or timestamp, no listing. - rpc Query(QueryRequest) returns (QueryResponse) {} - rpc Save(SaveRequest) returns (SaveResponse) {} - rpc Delete(DeleteRequest) returns (DeleteResponse) {} -} - -message Post { - string id = 1; - string title = 2; - string slug = 3; - string content = 4; - int64 created = 5; - int64 updated = 6; - string author = 7; - repeated string tags = 8; - map metadata = 9; - string image = 19; -} - -message IndexRequest { - int64 limit = 1; - int64 offset = 2; -} - -message IndexResponse { - repeated Post posts = 1; -} - -// Query posts. Acts as a listing when no id or slug provided. -// Gets a single post by id or slug if any of them provided. -message QueryRequest { - string id = 1; - string slug = 2; - string tag = 3; - int64 offset = 4; - int64 limit = 5; -} - -message QueryResponse { - repeated Post posts = 1; -} - -message SaveRequest { - string id = 1; - string title = 2; - string slug = 3; - string content = 4; - int64 timestamp = 5; - // When updating a post and wanting to delete all tags, - // send a list of tags with only one member being an empty string [""] - repeated string tags = 6; - map metadata = 7; - string image = 8; -} - -message SaveResponse { - string id = 1; -} - -message DeleteRequest { - string id = 1; -} - -message DeleteResponse {} - diff --git a/posts/usage.md b/posts/usage.md deleted file mode 100644 index 256cca4..0000000 --- a/posts/usage.md +++ /dev/null @@ -1,92 +0,0 @@ -Build a blog or the foundations of a headless CMS with posts - -# Post Service - -Posts is the foundation of a headless CMS, storing blog posts with their metadata and enabling simple retrieval and querying. - -## Create a post - -### cURL - -```shell -> curl 'https://api.m3o.com/posts/Save' \ - -H 'micro-namespace: $yourNamespace' \ - -H 'authorization: Bearer $yourToken' \ - -d '{"post":{"id":"1","title":"How to Micro","content":"Simply put, Micro is awesome."}}'; - -> curl 'https://api.m3o.com/chat/Save' \ - -H 'micro-namespace: $yourNamespace' \ - -H 'authorization: Bearer $yourToken' \ - -d '{"post":{"id":"2","title":"Fresh posts are fresh","content":"This post is fresher than the How to Micro one"}}'; -``` - -### CLI - -```shell -micro call posts Posts.Save '{"post":{"id":"1","title":"How to Micro","content":"Simply put, Micro is awesome."}}' - -micro call posts Posts.Save '{"post":{"id":"2","title":"Fresh posts are fresh","content":"This post is fresher than the How to Micro one"}}' -``` - -## Create a post with tags - - -### cURL - -```shell -> curl 'https://api.m3o.com/posts/Save' \ - -H 'micro-namespace: $yourNamespace' \ - -H 'authorization: Bearer $yourToken' \ - -d '{"post":{"id":"3","title":"How to do epic things with Micro","content":"Everything is awesome.","tagNames":["a","b"]}}'; -``` - -### CLI - -```shell -micro call posts Posts.Save '{"post":{"id":"3","title":"How to do epic things with Micro","content":"Everything is awesome.","tagNames":["a","b"]}}' -``` - -## Query posts - -### cURL - -```shell -# Query all -> curl 'https://api.m3o.com/posts/Query' \ - -H 'micro-namespace: $yourNamespace' \ - -H 'authorization: Bearer $yourToken' \ - -d '{}'; - -# Query by slug -> curl 'https://api.m3o.com/posts/Query' \ - -H 'micro-namespace: $yourNamespace' \ - -H 'authorization: Bearer $yourToken' \ - -d '{"slug":"how-to-micro"}'; - -# Limit and offset -> curl 'https://api.m3o.com/posts/Query' \ - -H 'micro-namespace: $yourNamespace' \ - -H 'authorization: Bearer $yourToken' \ - -d '{"offset": 10, "limit": 10}'; -``` - -### CLI - -```shell -micro call posts Posts.Query '{}' -micro call posts Posts.Query '{"slug":"how-to-micro"}' -micro call posts Posts.Query '{"offset": 10, "limit": 10}' -``` - -## Delete posts - -```shell -> curl 'https://api.m3o.com/posts/Delete' \ - -H 'micro-namespace: $yourNamespace' \ - -H 'authorization: Bearer $yourToken' \ - -d '{"id": "3c9ea66c"}'; -``` - -```shell -micro call posts Posts.Delete '{"id": "3c9ea66c"}' -``` diff --git a/sentiment/.gitignore b/sentiment/.gitignore deleted file mode 100644 index 162792c..0000000 --- a/sentiment/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ - -sentiment diff --git a/sentiment/Dockerfile b/sentiment/Dockerfile deleted file mode 100644 index ab04363..0000000 --- a/sentiment/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM alpine -ADD sentiment /sentiment -ENTRYPOINT [ "/sentiment" ] diff --git a/sentiment/Makefile b/sentiment/Makefile deleted file mode 100644 index 7b9f6e0..0000000 --- a/sentiment/Makefile +++ /dev/null @@ -1,27 +0,0 @@ - -GOPATH:=$(shell go env GOPATH) -.PHONY: init -init: - go get -u github.com/golang/protobuf/proto - go get -u github.com/golang/protobuf/protoc-gen-go - go get github.com/micro/micro/v3/cmd/protoc-gen-micro -.PHONY: proto -proto: - protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=:. proto/sentiment.proto - -.PHONY: docs -docs: - protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=:. proto/sentiment.proto - @redoc-cli bundle api-sentiment.json - -.PHONY: build -build: - go build -o sentiment *.go - -.PHONY: test -test: - go test -v ./... -cover - -.PHONY: docker -docker: - docker build . -t sentiment:latest diff --git a/sentiment/README.md b/sentiment/README.md deleted file mode 100644 index 7d3b374..0000000 --- a/sentiment/README.md +++ /dev/null @@ -1,6 +0,0 @@ -Real time sentiment analysis - -# Sentiment Service - -The sentiment service provides rudimentary sentiment analysis on text - diff --git a/sentiment/generate.go b/sentiment/generate.go deleted file mode 100644 index 7d9db91..0000000 --- a/sentiment/generate.go +++ /dev/null @@ -1,3 +0,0 @@ -package main - -//go:generate make proto diff --git a/sentiment/go.mod b/sentiment/go.mod deleted file mode 100644 index 7dbc744..0000000 --- a/sentiment/go.mod +++ /dev/null @@ -1,13 +0,0 @@ -module github.com/micro/services/sentiment - -go 1.15 - -require ( - github.com/cdipaolo/goml v0.0.0-20190412180403-e1f51f713598 // indirect - github.com/cdipaolo/sentiment v0.0.0-20200617002423-c697f64e7f10 - github.com/golang/protobuf v1.4.3 - github.com/micro/micro/v3 v3.1.1-0.20210301204023-e0e966d08c06 - github.com/micro/services v0.0.0-00010101000000-000000000000 -) - -replace github.com/micro/services => ../ diff --git a/sentiment/go.sum b/sentiment/go.sum deleted file mode 100644 index 9dc8c69..0000000 --- a/sentiment/go.sum +++ /dev/null @@ -1,817 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v32.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-autorest/autorest v0.1.0/go.mod h1:AKyIcETwSUFxIcs/Wnq/C+kwCtlEYGUVd7FPNb2slmg= -github.com/Azure/go-autorest/autorest v0.5.0/go.mod h1:9HLKlQjVBH6U3oDfsXOeVc56THsLPw1L03yban4xThw= -github.com/Azure/go-autorest/autorest/adal v0.1.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= -github.com/Azure/go-autorest/autorest/adal v0.2.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= -github.com/Azure/go-autorest/autorest/azure/auth v0.1.0/go.mod h1:Gf7/i2FUpyb/sGBLIFxTBzrNzBo7aPXXE3ZVeDRwdpM= -github.com/Azure/go-autorest/autorest/azure/cli v0.1.0/go.mod h1:Dk8CUAt/b/PzkfeRsWzVG9Yj3ps8mS8ECztu43rdU8U= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc= -github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:iGLljf5n9GjT6kc0HBvyI1nOKnGQbNB66VzSNbK5iks= -github.com/PuerkitoBio/goquery v1.6.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/SlyMarbo/rss v1.0.1/go.mod h1:JNF+T33oj4m5WLCQXpBTCgO+SxRbYVgdiiimHNgzcbA= -github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.0/go.mod h1:zpDJeKyp9ScW4NNrbdr+Eyxvry3ilGPewKoXw3XGN1k= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190808125512-07798873deee/go.mod h1:myCDvQSzCW+wB1WAlocEru4wMGJxy+vlxHdhegi1CDQ= -github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= -github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/aws/aws-sdk-go v1.23.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/axgle/mahonia v0.0.0-20180208002826-3358181d7394/go.mod h1:Q8n74mJTIgjX4RBBcHnJ05h//6/k6foqmgE45jTQtxg= -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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= -github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/caddyserver/certmagic v0.10.6/go.mod h1:Y8jcUBctgk/IhpAzlHKfimZNyXCkfGgRTC0orl8gROQ= -github.com/cdipaolo/goml v0.0.0-20190412180403-e1f51f713598 h1:j2XRGH5Y5uWtBYXGwmrjKeM/kfu/jh7ZcnrGvyN5Ttk= -github.com/cdipaolo/goml v0.0.0-20190412180403-e1f51f713598/go.mod h1:sduMkaHcXDIWurl/Bd/z0rNEUHw5tr6LUA9IO8E9o0o= -github.com/cdipaolo/sentiment v0.0.0-20200617002423-c697f64e7f10 h1:6dGQY3apkf7lG3a1UFhS6grlo009buPFVy79RvNVUF4= -github.com/cdipaolo/sentiment v0.0.0-20200617002423-c697f64e7f10/go.mod h1:JWoVf4GJxCxM3iCiZSVoXNMV+JFG49L+ou70KK3HTvQ= -github.com/cenkalti/backoff/v4 v4.0.0/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= -github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -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/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cloudflare-go v0.10.2/go.mod h1:qhVI5MKwBGhdNU89ZRz2plgYutcJ5PCekLxXn56w6SY= -github.com/cloudflare/cloudflare-go v0.10.9/go.mod h1:5TrsWH+3f4NV6WjtS5QFp+DifH81rph40gU374Sh0dQ= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/cpu/goacmedns v0.0.1/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMElOWxok= -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 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= -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/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -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/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= -github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -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/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= -github.com/dnaeon/go-vcr v0.0.0-20180814043457-aafff18a5cc2/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/dnsimple/dnsimple-go v0.30.0/go.mod h1:O5TJ0/U6r7AfT8niYNlmohpLbCSG+c71tQlGr9SeGrg= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -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/evanphx/json-patch/v5 v5.0.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= -github.com/exoscale/egoscale v0.18.1/go.mod h1:Z7OOdzzTOz1Q1PjQXumlz9Wn/CddH0zSYdCF3rnBKXE= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/getkin/kin-openapi v0.26.0/go.mod h1:WGRs2ZMM1Q8LR1QBEwUxC6RJEfaBcD0s+pcEVXFuAjw= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-acme/lego/v3 v3.4.0/go.mod h1:xYbLDuxq3Hy4bMUT1t9JIuz6GWIWb3m5X+TeTHYaT7M= -github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= -github.com/go-kit/kit v0.8.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-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.3/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -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.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -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.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -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/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -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.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-github/v30 v30.1.0 h1:VLDx+UolQICEOKu2m4uAoMti1SxuEBAl7RSEG16L+Oo= -github.com/google/go-github/v30 v30.1.0/go.mod h1:n8jBpHl45a/rlBUtRJMOG4GhNADUQFEufcolZ95JfU8= -github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -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/gosimple/slug v1.9.0/go.mod h1:AMZ+sOVe65uByN3kgEyf9WEBKBCSS+dJjMX9x4vDJbg= -github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= -github.com/hailocab/go-geoindex v0.0.0-20160127134810-64631bfe9711/go.mod h1:+v2qJ3UZe4q2GfgZO4od004F/cMgJbmPSs7dD/ZMUkY= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-retryablehttp v0.6.4/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= -github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhKWFeDesPjMj+wCHReeknARU3wqlyN4= -github.com/improbable-eng/grpc-web v0.13.0 h1:7XqtaBWaOCH0cVGKHyvhtcuo6fgW32Y10yRKrDHFHOc= -github.com/improbable-eng/grpc-web v0.13.0/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= -github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf h1:WfD7VjIE6z8dIvMsI4/s+1qr5EL+zoIGev1BQj1eoJ8= -github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf/go.mod h1:hyb9oH7vZsitZCiBt0ZvifOrB+qc8PS5IiilCIb87rg= -github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= -github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= -github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= -github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= -github.com/jackc/pgconn v1.4.0/go.mod h1:Y2O3ZDF0q4mMacyWV3AstPJpeHXWGEetiFttmq5lahk= -github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= -github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= -github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= -github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= -github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= -github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= -github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= -github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= -github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= -github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= -github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= -github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= -github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= -github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0= -github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkALtxZMCH411K+tKzNpwzCKU+AnPzBKZ+I+Po= -github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ= -github.com/jackc/pgtype v1.6.2/go.mod h1:JCULISAZBFGrHaOXIIFiyfzW5VY0GRitRr8NeJsrdig= -github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= -github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= -github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= -github.com/jackc/pgx/v4 v4.5.0/go.mod h1:EpAKPLdnTorwmPUUsqrPxy5fphV18j9q3wrfRXgo+kA= -github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6fOLDxqtlyhe9UWgfIi9R8+8v8GKV5TRA/o= -github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg= -github.com/jackc/pgx/v4 v4.10.1/go.mod h1:QlrWebbs3kqEZPHCTGyxecvzG6tvIsYu+A5b1raylkA= -github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -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.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b h1:FQ7+9fxhyp82ks9vAuyPzG0/vVbWwMwLJ+P6yJI5FN8= -github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b/go.mod h1:HMcgvsgd0Fjj4XXDkbjdmlbI505rUPBs6WBMYg2pXks= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4= -github.com/kolo/xmlrpc v0.0.0-20190717152603-07c4ee3fd181/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ= -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/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/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA= -github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/linode/linodego v0.10.0/go.mod h1:cziNP7pbvE3mXIPneHj0oRY8L1WtGEIKlZ8LANE4eXA= -github.com/liquidweb/liquidweb-go v1.6.0/go.mod h1:UDcVnAMDkZxpw4Y7NOHkqoeiGacVLEIG/i5J9cyixzQ= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.2/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.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -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.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/micro/dev v0.0.0-20201117163752-d3cfc9788dfa/go.mod h1:j/8E+ezN/ij7a9BXBHMKmLayFfUW1O4h/Owdv67B0X0= -github.com/micro/micro v1.18.0 h1:v+xiQOXbT9xxotLwu1nJM81t4FbruBxZSSyIdhUfujM= -github.com/micro/micro/v3 v3.0.0-beta.6.0.20201016094841-ca8ffd563b2b/go.mod h1:RPJTp9meQAppzW/9jgQtfJmPpRJAySVPbz9uur4B3Ko= -github.com/micro/micro/v3 v3.0.5-0.20210205114115-75aad3b94f08/go.mod h1:+WoC+lHuRy8FIgJlNuLkhpmsFbylYb0vYcEgMpKT4Z4= -github.com/micro/micro/v3 v3.1.0 h1:K1sVrB3xR/oZzbaXDSYgXbiD0f3QFNpvgOy0w013e8I= -github.com/micro/micro/v3 v3.1.0/go.mod h1:+cr/21X4agxmBxMuztg/LOFrNBk9xLVJNq4UofWNWic= -github.com/micro/micro/v3 v3.1.1-0.20210301204023-e0e966d08c06 h1:Kiegspe4Ea6hwyVWbDD6zf/DXpiVyyB2XgZuxAXGwtA= -github.com/micro/micro/v3 v3.1.1-0.20210301204023-e0e966d08c06/go.mod h1:+cr/21X4agxmBxMuztg/LOFrNBk9xLVJNq4UofWNWic= -github.com/micro/services v0.16.0 h1:mWiv68uBrV4Z/TiE6ImLcmHJmOLM4XHI4/E82SNj5mA= -github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.27 h1:aEH/kqUzUxGJ/UHcEKdJY+ugH6WEzsEBBSPa8zuy1aM= -github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.31 h1:sJFOl9BgwbYAWOGEwr61FU28pqsBNdpRBnhGXtO06Oo= -github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= -github.com/minio/minio-go/v7 v7.0.5/go.mod h1:TA0CQCjJZHM5SJj9IjqR0NmpmQJ6bCbXifAJ3mUU6Hw= -github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed/go.mod h1:3rdaFaCv4AyBgu5ALFM0+tSuHrBh6v692nyQe3ikrq0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -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/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/namedotcom/go v0.0.0-20180403034216-08470befbe04/go.mod h1:5sN+Lt1CaY4wsPvgQH/jsuJi4XO2ssZbdsIizr4CVC8= -github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nrdcg/auroradns v1.0.0/go.mod h1:6JPXKzIRzZzMqtTDgueIhTi6rFf1QvYE/HzqidhOhjw= -github.com/nrdcg/dnspod-go v0.4.0/go.mod h1:vZSoFSFeQVm2gWLMkyX61LZ8HI3BaqtHZWgPTGKr6KQ= -github.com/nrdcg/goinwx v0.6.1/go.mod h1:XPiut7enlbEdntAqalBIqcYcTEVhpv/dKWgDCX2SwKQ= -github.com/nrdcg/namesilo v0.2.1/go.mod h1:lwMvfQTyYq+BbjJd30ylEG4GPSS6PII0Tia4rRpRiyw= -github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.3/go.mod h1:YZeBtGzYYEsCHp2LST/u/0NDwGkRoBtmn1cIWCJiS6M= -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/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= -github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= -github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ= -github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= -github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= -github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= -github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/pierrec/lz4 v2.0.5+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 v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/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/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/rainycape/memcache v0.0.0-20150622160815-1031fa0ce2f2/go.mod h1:7tZKcyumwBO6qip7RNQ5r77yrssm9bfCowcLEBcU5IA= -github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be/go.mod h1:MIDFMn7db1kT65GmV94GzpX9Qdi7N/pQlwb+AN8wh+Q= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rhysd/go-github-selfupdate v1.2.2 h1:G+mNzkc1wEtpmM6sFS/Ghkeq+ad4Yp6EZEHyp//wGEo= -github.com/rhysd/go-github-selfupdate v1.2.2/go.mod h1:khesvSyKcXDUxeySCedFh621iawCks0dS/QnHPcpCws= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= -github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sacloud/libsacloud v1.26.1/go.mod h1:79ZwATmHLIFZIMd7sxA3LwzVy/B77uj3LDoToVTxDoQ= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= -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.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -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/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/tcnksm/go-gitconfig v0.1.2 h1:iiDhRitByXAEyjgBqsKi9QU4o2TNtv9kPP3RgPgXBPw= -github.com/tcnksm/go-gitconfig v0.1.2/go.mod h1:/8EhP4H7oJZdIPyT+/UIsG87kTzrzM4UsLGSItWYCpE= -github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0= -github.com/timewasted/linode v0.0.0-20160829202747-37e84520dcf7/go.mod h1:imsgLplxEC/etjIhdr3dNzV3JeT27LbVu5pYWm0JCBY= -github.com/transip/gotransip v0.0.0-20190812104329-6d8d9179b66f/go.mod h1:i0f4R4o2HM0m3DZYQWsj6/MEowD57VzoH0v3d7igeFY= -github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= -github.com/ulikunitz/xz v0.5.5 h1:pFrO0lVpTBXLpYw+pnLj6TbvHuyjXMfjGeCwSqCVwok= -github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= -github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ= -github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= -github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.2.0 h1:JTTnM6wKzdA0Jqodd966MVj4vWbbquZykeX1sKbe2C4= -github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/vultr/govultr v0.1.4/go.mod h1:9H008Uxr/C4vFNGLqKx232C206GL0PBHzOP0809bGNA= -github.com/xanzy/go-gitlab v0.35.1/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/ratelimit v0.0.0-20180316092928-c15da0234277/go.mod h1:2X8KaoNd1J0lZV+PxJk/5+DGbO/tpwLR1m++a7FnB/Y= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/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-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 h1:DZhuSZLsGlFL4CmhA8BcRA0mnthyA/nZ00AqCUo7vHg= -golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002094018-c90954cbb977 h1:yH6opeNE+0SY+7pXT4gclZUoKHogXeC2EvOSHGOMGPU= -golang.org/x/crypto v0.0.0-20201002094018-c90954cbb977/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/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-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/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-20181108082009-03003ca0c849/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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/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-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -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-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/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-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190930134127-c5a3c61f89f3/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191027093000-83d349e8ac1a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/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-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -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/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200930145003-4acb6c075d10 h1:YfxMZzv3PjGonQYNUaeU2+DhAdqOxerQ30JFB6WgAXo= -golang.org/x/net v0.0.0-20200930145003-4acb6c075d10/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 h1:ld7aEMNHoBnnDAX15v1T6z31v8HwR2A9FYOuAhWqkwc= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -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-20190227155943-e225da77a7e6/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/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180622082034-63fc586f45fe/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -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-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/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-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/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.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -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-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/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-20190114222345-bf090417da8b/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-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -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-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/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-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -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/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201001141541-efaab9d3c4f7 h1:MUqDMe4W4vbVh6qN/ZxuB1HRKX65h7FErlemt2ABsmM= -google.golang.org/genproto v0.0.0-20201001141541-efaab9d3c4f7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0 h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.32.0 h1:zWTV+LMdc3kaiJMSTOFz2UgSBgx8RNQoTGiZu3fR9S0= -google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -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= -googlemaps.github.io/maps v1.3.1/go.mod h1:cCq0JKYAnnCRSdiaBi7Ex9CW15uxIAk7oPi8V/xEh6s= -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/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -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/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= -gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= -gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.44.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ns1/ns1-go.v2 v2.0.0-20190730140822-b51389932cbc/go.mod h1:VV+3haRsgDiVLxyifmMBrBIuCWFBPYKbRssXB9z67Hw= -gopkg.in/resty.v1 v1.9.1/go.mod h1:vo52Hzryw9PnPHcJfPsBiFW62XhNx5OczbV9y+IMpgc= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -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.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/driver/postgres v1.0.6/go.mod h1:r0nvX27yHDNbVeXMM9Y+9i5xSePcT18RfH8clP6wpwI= -gorm.io/gorm v1.20.8/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= -gorm.io/gorm v1.20.9/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/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.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/sentiment/handler/sentiment.go b/sentiment/handler/sentiment.go deleted file mode 100644 index fbb2e9c..0000000 --- a/sentiment/handler/sentiment.go +++ /dev/null @@ -1,31 +0,0 @@ -package handler - -import ( - "context" - - "github.com/micro/micro/v3/service/errors" - "github.com/micro/services/sentiment/model" - pb "github.com/micro/services/sentiment/proto" -) - -type Sentiment struct{} - -func (e *Sentiment) Analyze(ctx context.Context, req *pb.Request, rsp *pb.Response) error { - if len(req.Text) == 0 { - return errors.BadRequest("sentiment.analyze", "text is blank") - } - - if len(req.Lang) == 0 { - req.Lang = "english" - } - - if req.Lang != "english" { - return errors.BadRequest("sentiment.analyze", "only support english") - } - - rsp.Score = model.Analyze(req.Text) - - // TODO: more complex word scoring - - return nil -} diff --git a/sentiment/main.go b/sentiment/main.go deleted file mode 100644 index 5cb9816..0000000 --- a/sentiment/main.go +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - posts "github.com/micro/services/posts/proto" - "github.com/micro/services/sentiment/handler" - pb "github.com/micro/services/sentiment/proto" - "github.com/micro/services/sentiment/subscriber" - - "github.com/micro/micro/v3/service" - "github.com/micro/micro/v3/service/logger" -) - -func main() { - // Create service - srv := service.New( - service.Name("sentiment"), - ) - - // Register handler - pb.RegisterSentimentHandler(srv.Server(), new(handler.Sentiment)) - - // Register subscriber - service.Subscribe("posts", subscriber.EnrichPost) - subscriber.PostsClient = posts.NewPostsService("posts", srv.Client()) - - // Run service - if err := srv.Run(); err != nil { - logger.Fatal(err) - } -} diff --git a/sentiment/micro.mu b/sentiment/micro.mu deleted file mode 100644 index b4fbab8..0000000 --- a/sentiment/micro.mu +++ /dev/null @@ -1 +0,0 @@ -service sentiment diff --git a/sentiment/model/model.go b/sentiment/model/model.go deleted file mode 100644 index ec774b6..0000000 --- a/sentiment/model/model.go +++ /dev/null @@ -1,38 +0,0 @@ -package model - -import ( - "github.com/cdipaolo/sentiment" - "github.com/micro/micro/v3/service/logger" -) - -var ( - model *sentiment.Models -) - -func init() { - // load sentiment analysis tool - md, err := sentiment.Restore() - if err != nil { - logger.Fatal(err) - } - model = &md -} - -func Analyze(text string) float64 { - an := model.SentimentAnalysis(text, sentiment.English) - - // no words, just return whats scored - if len(an.Words) == 0 { - return float64(an.Score) - } - - // take each word score then divide by num words - var total float64 - - for _, word := range an.Words { - total += float64(word.Score) - } - - // get the overall score - return total / float64(len(an.Words)) -} diff --git a/sentiment/proto/sentiment.pb.go b/sentiment/proto/sentiment.pb.go deleted file mode 100644 index fb33e2f..0000000 --- a/sentiment/proto/sentiment.pb.go +++ /dev/null @@ -1,225 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.15.5 -// source: proto/sentiment.proto - -package sentiment - -import ( - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` - Lang string `protobuf:"bytes,2,opt,name=lang,proto3" json:"lang,omitempty"` -} - -func (x *Request) Reset() { - *x = Request{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_sentiment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Request) ProtoMessage() {} - -func (x *Request) ProtoReflect() protoreflect.Message { - mi := &file_proto_sentiment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Request.ProtoReflect.Descriptor instead. -func (*Request) Descriptor() ([]byte, []int) { - return file_proto_sentiment_proto_rawDescGZIP(), []int{0} -} - -func (x *Request) GetText() string { - if x != nil { - return x.Text - } - return "" -} - -func (x *Request) GetLang() string { - if x != nil { - return x.Lang - } - return "" -} - -type Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Score float64 `protobuf:"fixed64,1,opt,name=score,proto3" json:"score,omitempty"` -} - -func (x *Response) Reset() { - *x = Response{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_sentiment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Response) ProtoMessage() {} - -func (x *Response) ProtoReflect() protoreflect.Message { - mi := &file_proto_sentiment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Response.ProtoReflect.Descriptor instead. -func (*Response) Descriptor() ([]byte, []int) { - return file_proto_sentiment_proto_rawDescGZIP(), []int{1} -} - -func (x *Response) GetScore() float64 { - if x != nil { - return x.Score - } - return 0 -} - -var File_proto_sentiment_proto protoreflect.FileDescriptor - -var file_proto_sentiment_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x6e, 0x74, 0x22, 0x31, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x22, 0x20, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x32, 0x41, 0x0a, 0x09, 0x53, 0x65, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x07, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x12, - 0x12, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x11, 0x5a, 0x0f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x3b, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_sentiment_proto_rawDescOnce sync.Once - file_proto_sentiment_proto_rawDescData = file_proto_sentiment_proto_rawDesc -) - -func file_proto_sentiment_proto_rawDescGZIP() []byte { - file_proto_sentiment_proto_rawDescOnce.Do(func() { - file_proto_sentiment_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_sentiment_proto_rawDescData) - }) - return file_proto_sentiment_proto_rawDescData -} - -var file_proto_sentiment_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_proto_sentiment_proto_goTypes = []interface{}{ - (*Request)(nil), // 0: sentiment.Request - (*Response)(nil), // 1: sentiment.Response -} -var file_proto_sentiment_proto_depIdxs = []int32{ - 0, // 0: sentiment.Sentiment.Analyze:input_type -> sentiment.Request - 1, // 1: sentiment.Sentiment.Analyze:output_type -> sentiment.Response - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_proto_sentiment_proto_init() } -func file_proto_sentiment_proto_init() { - if File_proto_sentiment_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_sentiment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_sentiment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_sentiment_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_sentiment_proto_goTypes, - DependencyIndexes: file_proto_sentiment_proto_depIdxs, - MessageInfos: file_proto_sentiment_proto_msgTypes, - }.Build() - File_proto_sentiment_proto = out.File - file_proto_sentiment_proto_rawDesc = nil - file_proto_sentiment_proto_goTypes = nil - file_proto_sentiment_proto_depIdxs = nil -} diff --git a/sentiment/proto/sentiment.pb.micro.go b/sentiment/proto/sentiment.pb.micro.go deleted file mode 100644 index 2e256a9..0000000 --- a/sentiment/proto/sentiment.pb.micro.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by protoc-gen-micro. DO NOT EDIT. -// source: proto/sentiment.proto - -package sentiment - -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" -) - -import ( - context "context" - api "github.com/micro/micro/v3/service/api" - client "github.com/micro/micro/v3/service/client" - server "github.com/micro/micro/v3/service/server" -) - -// 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 - -// Reference imports to suppress errors if they are not otherwise used. -var _ api.Endpoint -var _ context.Context -var _ client.Option -var _ server.Option - -// Api Endpoints for Sentiment service - -func NewSentimentEndpoints() []*api.Endpoint { - return []*api.Endpoint{} -} - -// Client API for Sentiment service - -type SentimentService interface { - Analyze(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error) -} - -type sentimentService struct { - c client.Client - name string -} - -func NewSentimentService(name string, c client.Client) SentimentService { - return &sentimentService{ - c: c, - name: name, - } -} - -func (c *sentimentService) Analyze(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error) { - req := c.c.NewRequest(c.name, "Sentiment.Analyze", in) - out := new(Response) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for Sentiment service - -type SentimentHandler interface { - Analyze(context.Context, *Request, *Response) error -} - -func RegisterSentimentHandler(s server.Server, hdlr SentimentHandler, opts ...server.HandlerOption) error { - type sentiment interface { - Analyze(ctx context.Context, in *Request, out *Response) error - } - type Sentiment struct { - sentiment - } - h := &sentimentHandler{hdlr} - return s.Handle(s.NewHandler(&Sentiment{h}, opts...)) -} - -type sentimentHandler struct { - SentimentHandler -} - -func (h *sentimentHandler) Analyze(ctx context.Context, in *Request, out *Response) error { - return h.SentimentHandler.Analyze(ctx, in, out) -} diff --git a/sentiment/proto/sentiment.proto b/sentiment/proto/sentiment.proto deleted file mode 100644 index 69b4c65..0000000 --- a/sentiment/proto/sentiment.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -package sentiment; - -option go_package = "./proto;sentiment"; - -service Sentiment { - rpc Analyze(Request) returns (Response) {}; -} - -message Request { - string text = 1; - string lang = 2; -} - -message Response { - double score = 1; -} - diff --git a/sentiment/subscriber/subscriber.go b/sentiment/subscriber/subscriber.go deleted file mode 100644 index 6d53162..0000000 --- a/sentiment/subscriber/subscriber.go +++ /dev/null @@ -1,47 +0,0 @@ -package subscriber - -import ( - "context" - "fmt" - "time" - - "github.com/micro/micro/v3/service/logger" - pb "github.com/micro/services/posts/proto" - "github.com/micro/services/sentiment/model" -) - -var ( - // assume this is initialised by main - PostsClient pb.PostsService -) - -// EnrichPost will enrich a post with the sentiment and save it -func EnrichPost(ctx context.Context, post *pb.Post) error { - if PostsClient == nil { - return nil - } - - // start by analysing the title - // later we will look at the content - score := model.Analyze(post.Title) - post.Metadata["sentiment"] = fmt.Sprintf("%.1f", score) - - logger.Infof("Setting score %.1f for post '%v'", score, post.Title) - - // now save the post - _, err := PostsClient.Save(ctx, &pb.SaveRequest{ - Id: post.Id, - Title: post.Title, - Content: post.Content, - Timestamp: time.Now().Unix(), - Metadata: post.Metadata, - Tags: post.Tags, - Image: post.Image, - Slug: post.Slug, - }) - if err != nil { - logger.Info("Error saving post: %v", err) - } - - return nil -} diff --git a/sentiment/usage.md b/sentiment/usage.md deleted file mode 100644 index 501f251..0000000 --- a/sentiment/usage.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sentiment Service - -The sentiment service provides rudimentary sentiment analysis on text - -## Usage - -``` -$ micro sentiment analyze --text "This is great" -{ - "score": 1 -} -``` diff --git a/tags/.gitignore b/tags/.gitignore deleted file mode 100644 index d0d288c..0000000 --- a/tags/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ - -./tags diff --git a/tags/Dockerfile b/tags/Dockerfile deleted file mode 100644 index 52735ba..0000000 --- a/tags/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM alpine -ADD tag-service /tag-service -ENTRYPOINT [ "/tag-service" ] diff --git a/tags/Makefile b/tags/Makefile deleted file mode 100644 index 1ba6219..0000000 --- a/tags/Makefile +++ /dev/null @@ -1,27 +0,0 @@ - -GOPATH:=$(shell go env GOPATH) -MODIFY=Mgithub.com/micro/micro/proto/api/api.proto=github.com/micro/micro/v3/proto/api - -.PHONY: proto -proto: - - protoc --openapi_out=. --proto_path=. --micro_out=${MODIFY}:. --go_out=${MODIFY}:. proto/tags.proto - -.PHONY: docs -docs: - - protoc --openapi_out=. --proto_path=. --micro_out=${MODIFY}:. --go_out=${MODIFY}:. proto/tags.proto - @redoc-cli bundle api-tags.json - -.PHONY: build -build: proto - - go build -o tag-service *.go - -.PHONY: test -test: - go test -v ./... -cover - -.PHONY: docker -docker: - docker build . -t tag-service:latest diff --git a/tags/README.md b/tags/README.md deleted file mode 100644 index ad0e108..0000000 --- a/tags/README.md +++ /dev/null @@ -1,5 +0,0 @@ -Generate tags and metadata for any resource - -# Tag Service - -The tags service enables creation of tags for any resource by saving a tag associated with their respective ID diff --git a/tags/generate.go b/tags/generate.go deleted file mode 100644 index 7d9db91..0000000 --- a/tags/generate.go +++ /dev/null @@ -1,3 +0,0 @@ -package main - -//go:generate make proto diff --git a/tags/handler/tags.go b/tags/handler/tags.go deleted file mode 100644 index 3edf1db..0000000 --- a/tags/handler/tags.go +++ /dev/null @@ -1,221 +0,0 @@ -package handler - -import ( - "context" - "encoding/json" - - "fmt" - - "github.com/gosimple/slug" - "github.com/micro/micro/v3/service/errors" - "github.com/micro/micro/v3/service/logger" - "github.com/micro/micro/v3/service/model" - "github.com/micro/micro/v3/service/store" - proto "github.com/micro/services/tags/proto" -) - -const ( - resourcePrefix = "byResource" - tagCountPrefix = "tagCount" - childrenByTag = "childrenByTag" -) - -type Tags struct { - db model.Model -} - -func NewTags() *Tags { - slugIndex := model.ByEquality("slug") - slugIndex.Order.Type = model.OrderTypeUnordered - tags := &Tags{ - db: model.NewModel( - model.WithKey("slug"), - model.WithIndexes(model.ByEquality("type"), slugIndex), - ), - } - - tags.db.Register(proto.Tag{}) - return tags -} - -func (t *Tags) Add(ctx context.Context, req *proto.AddRequest, rsp *proto.AddResponse) error { - if len(req.ResourceID) == 0 || len(req.Type) == 0 { - return errors.BadRequest("tags.increasecount.input-check", "resource id and type is required") - } - - tags := []*proto.Tag{} - tagSlug := slug.Make(req.GetTitle()) - q := model.QueryEquals("slug", tagSlug) - q.Order.Type = model.OrderTypeUnordered - err := t.db.Read(q, &tags) - if err != nil { - return err - } - - var tag *proto.Tag - // If no existing record is found, create a new one - if len(tags) == 0 { - tag = &proto.Tag{ - Title: req.GetTitle(), - Type: req.Type, - Slug: tagSlug, - } - } else { - tag = tags[0] - } - - // increase tag count - err = store.Write(&store.Record{ - Key: fmt.Sprintf("%v:%v:%v", tagCountPrefix, tag.Slug, req.GetResourceID()), - Value: nil, - }) - if err != nil { - return err - } - - oldTagCount := tag.Count - // get tag count - recs, err := store.List(store.ListPrefix(fmt.Sprintf("%v:%v", tagCountPrefix, tag.Slug)), store.ListLimit(1000)) - if err != nil { - return err - } - - tag.Count = int64(len(recs)) - if tag.Count == oldTagCount { - return fmt.Errorf("Tag count for tag %v is unchanged, was: %v, now: %v", tagSlug, oldTagCount, tag.Count) - } - tagJSON, err := json.Marshal(tag) - if err != nil { - return err - } - err = store.Write(&store.Record{ - Key: fmt.Sprintf("%v:%v:%v", resourcePrefix, req.GetResourceID(), tag.Slug), - Value: tagJSON, - }) - if err != nil { - return err - } - return t.saveTag(tag) -} - -func (t *Tags) saveTag(tag *proto.Tag) error { - tag.Slug = slug.Make(tag.Title) - return t.db.Create(tag) -} - -func (t *Tags) Remove(ctx context.Context, req *proto.RemoveRequest, rsp *proto.RemoveResponse) error { - if len(req.ResourceID) == 0 || len(req.Type) == 0 { - return errors.BadRequest("tags.decreaseecount.input-check", "resource id and type is required") - } - - tagSlug := slug.Make(req.GetTitle()) - resourceKey := fmt.Sprintf("%v:%v:%v", resourcePrefix, req.GetResourceID(), tagSlug) - - // read by resource ID + slug, the record is identical in boths places anyway - records, err := store.Read(resourceKey) - if err != nil && err != store.ErrNotFound { - return err - } - - // If no existing record is found, there is nothing to decrease - if len(records) == 0 { - // return error? - return nil - } - record := records[0] - tag := &proto.Tag{} - err = json.Unmarshal(record.Value, tag) - if err != nil { - return err - } - - // decrease tag count - err = store.Delete(fmt.Sprintf("%v:%v:%v", tagCountPrefix, tag.Slug, req.GetResourceID())) - if err != nil { - return err - } - - // get tag count - recs, err := store.List(store.ListPrefix(fmt.Sprintf("%v:%v", tagCountPrefix, tag.Slug)), store.ListLimit(1000)) - if err != nil { - return err - } - tag.Count = int64(len(recs)) - return t.saveTag(tag) -} - -func (t *Tags) List(ctx context.Context, req *proto.ListRequest, rsp *proto.ListResponse) error { - logger.Info("Received Tags.List request") - - // unfortunately there is a mixing of manual indexes - // and model here because model does not yet support - // many to many relations - key := "" - var q model.Query - if len(req.ResourceID) > 0 { - key = fmt.Sprintf("%v:%v", resourcePrefix, req.ResourceID) - } else if len(req.Type) > 0 { - q = model.QueryEquals("type", req.Type) - } else { - return errors.BadRequest("tags.list.input-check", "resource id or type is required") - } - - if q.Type != "" { - tags := []proto.Tag{} - err := t.db.Read(q, &tags) - if err != nil { - return err - } - rsp.Tags = make([]*proto.Tag, len(tags)) - for i, tag := range tags { - rsp.Tags[i] = &proto.Tag{ - Title: tag.Title, - Type: tag.Type, - Slug: tag.Slug, - Count: tag.Count, - } - } - return nil - } - records, err := store.Read(key, store.ReadPrefix()) - if err != nil { - return err - } - - rsp.Tags = make([]*proto.Tag, len(records)) - for i, record := range records { - tagRecord := &proto.Tag{} - err := json.Unmarshal(record.Value, tagRecord) - if err != nil { - return err - } - rsp.Tags[i] = &proto.Tag{ - Title: tagRecord.Title, - Type: tagRecord.Type, - Slug: tagRecord.Slug, - Count: tagRecord.Count, - } - } - - return nil -} - -func (t *Tags) Update(ctx context.Context, req *proto.UpdateRequest, rsp *proto.UpdateResponse) error { - if len(req.Title) == 0 || len(req.Type) == 0 { - return errors.BadRequest("tags.update.input-check", "title and type is required") - } - - tagSlug := slug.Make(req.GetTitle()) - tags := []proto.Tag{} - q := model.QueryEquals("slug", tagSlug) - q.Order.Type = model.OrderTypeUnordered - err := t.db.Read(q, &tags) - if err != nil { - return err - } - if len(tags) == 0 { - return errors.BadRequest("tags.update.input-check", "Tag not found") - } - tags[0].Title = req.Title - return t.saveTag(&tags[0]) -} diff --git a/tags/main.go b/tags/main.go deleted file mode 100644 index ce1ee91..0000000 --- a/tags/main.go +++ /dev/null @@ -1,22 +0,0 @@ -package main - -import ( - "github.com/micro/micro/v3/service" - "github.com/micro/micro/v3/service/logger" - "github.com/micro/services/tags/handler" -) - -func main() { - // Create service - srv := service.New( - service.Name("tags"), - ) - - // Register Handler - srv.Handle(handler.NewTags()) - - // Run service - if err := srv.Run(); err != nil { - logger.Fatal(err) - } -} diff --git a/tags/micro.mu b/tags/micro.mu deleted file mode 100644 index e5e9039..0000000 --- a/tags/micro.mu +++ /dev/null @@ -1 +0,0 @@ -service tags \ No newline at end of file diff --git a/tags/proto/tags.pb.go b/tags/proto/tags.pb.go deleted file mode 100644 index 637cde1..0000000 --- a/tags/proto/tags.pb.go +++ /dev/null @@ -1,777 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.15.5 -// source: proto/tags.proto - -package tags - -import ( - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type Tag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Type is useful for namespacing and listing across resources, - // ie. list tags for posts, customers etc. - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"` - Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - Count int64 `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"` -} - -func (x *Tag) Reset() { - *x = Tag{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_tags_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Tag) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Tag) ProtoMessage() {} - -func (x *Tag) ProtoReflect() protoreflect.Message { - mi := &file_proto_tags_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Tag.ProtoReflect.Descriptor instead. -func (*Tag) Descriptor() ([]byte, []int) { - return file_proto_tags_proto_rawDescGZIP(), []int{0} -} - -func (x *Tag) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *Tag) GetSlug() string { - if x != nil { - return x.Slug - } - return "" -} - -func (x *Tag) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *Tag) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Tag) GetCount() int64 { - if x != nil { - return x.Count - } - return 0 -} - -type AddRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ResourceID string `protobuf:"bytes,1,opt,name=resourceID,proto3" json:"resourceID,omitempty"` - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` - ResourceCreated int64 `protobuf:"varint,4,opt,name=resourceCreated,proto3" json:"resourceCreated,omitempty"` -} - -func (x *AddRequest) Reset() { - *x = AddRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_tags_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddRequest) ProtoMessage() {} - -func (x *AddRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_tags_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddRequest.ProtoReflect.Descriptor instead. -func (*AddRequest) Descriptor() ([]byte, []int) { - return file_proto_tags_proto_rawDescGZIP(), []int{1} -} - -func (x *AddRequest) GetResourceID() string { - if x != nil { - return x.ResourceID - } - return "" -} - -func (x *AddRequest) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *AddRequest) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *AddRequest) GetResourceCreated() int64 { - if x != nil { - return x.ResourceCreated - } - return 0 -} - -type AddResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *AddResponse) Reset() { - *x = AddResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_tags_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddResponse) ProtoMessage() {} - -func (x *AddResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_tags_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddResponse.ProtoReflect.Descriptor instead. -func (*AddResponse) Descriptor() ([]byte, []int) { - return file_proto_tags_proto_rawDescGZIP(), []int{2} -} - -type RemoveRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ResourceID string `protobuf:"bytes,1,opt,name=resourceID,proto3" json:"resourceID,omitempty"` - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` -} - -func (x *RemoveRequest) Reset() { - *x = RemoveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_tags_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveRequest) ProtoMessage() {} - -func (x *RemoveRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_tags_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveRequest.ProtoReflect.Descriptor instead. -func (*RemoveRequest) Descriptor() ([]byte, []int) { - return file_proto_tags_proto_rawDescGZIP(), []int{3} -} - -func (x *RemoveRequest) GetResourceID() string { - if x != nil { - return x.ResourceID - } - return "" -} - -func (x *RemoveRequest) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *RemoveRequest) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -type RemoveResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RemoveResponse) Reset() { - *x = RemoveResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_tags_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveResponse) ProtoMessage() {} - -func (x *RemoveResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_tags_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveResponse.ProtoReflect.Descriptor instead. -func (*RemoveResponse) Descriptor() ([]byte, []int) { - return file_proto_tags_proto_rawDescGZIP(), []int{4} -} - -type UpdateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` -} - -func (x *UpdateRequest) Reset() { - *x = UpdateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_tags_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateRequest) ProtoMessage() {} - -func (x *UpdateRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_tags_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead. -func (*UpdateRequest) Descriptor() ([]byte, []int) { - return file_proto_tags_proto_rawDescGZIP(), []int{5} -} - -func (x *UpdateRequest) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *UpdateRequest) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *UpdateRequest) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -type UpdateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpdateResponse) Reset() { - *x = UpdateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_tags_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateResponse) ProtoMessage() {} - -func (x *UpdateResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_tags_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead. -func (*UpdateResponse) Descriptor() ([]byte, []int) { - return file_proto_tags_proto_rawDescGZIP(), []int{6} -} - -// ListRequest: list either by resource id or type. -// Optionally filter by min or max count. -type ListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ResourceID string `protobuf:"bytes,1,opt,name=resourceID,proto3" json:"resourceID,omitempty"` - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - MinCount int64 `protobuf:"varint,3,opt,name=minCount,proto3" json:"minCount,omitempty"` - MaxCount int64 `protobuf:"varint,4,opt,name=maxCount,proto3" json:"maxCount,omitempty"` -} - -func (x *ListRequest) Reset() { - *x = ListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_tags_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListRequest) ProtoMessage() {} - -func (x *ListRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_tags_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. -func (*ListRequest) Descriptor() ([]byte, []int) { - return file_proto_tags_proto_rawDescGZIP(), []int{7} -} - -func (x *ListRequest) GetResourceID() string { - if x != nil { - return x.ResourceID - } - return "" -} - -func (x *ListRequest) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *ListRequest) GetMinCount() int64 { - if x != nil { - return x.MinCount - } - return 0 -} - -func (x *ListRequest) GetMaxCount() int64 { - if x != nil { - return x.MaxCount - } - return 0 -} - -type ListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Tags []*Tag `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` -} - -func (x *ListResponse) Reset() { - *x = ListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_tags_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListResponse) ProtoMessage() {} - -func (x *ListResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_tags_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListResponse.ProtoReflect.Descriptor instead. -func (*ListResponse) Descriptor() ([]byte, []int) { - return file_proto_tags_proto_rawDescGZIP(), []int{8} -} - -func (x *ListResponse) GetTags() []*Tag { - if x != nil { - return x.Tags - } - return nil -} - -var File_proto_tags_proto protoreflect.FileDescriptor - -var file_proto_tags_proto_rawDesc = []byte{ - 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0x7b, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, - 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x28, - 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x0d, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x59, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5b, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x10, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x79, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2d, - 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, - 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x74, - 0x61, 0x67, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x32, 0xd3, 0x01, - 0x0a, 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x2c, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x10, 0x2e, - 0x74, 0x61, 0x67, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x11, 0x2e, 0x74, 0x61, 0x67, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x13, - 0x2e, 0x74, 0x61, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x74, 0x61, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x04, 0x4c, - 0x69, 0x73, 0x74, 0x12, 0x11, 0x2e, 0x74, 0x61, 0x67, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x74, 0x61, 0x67, 0x73, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x06, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x13, 0x2e, 0x74, 0x61, 0x67, 0x73, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x74, 0x61, - 0x67, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x42, 0x0c, 0x5a, 0x0a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x74, 0x61, 0x67, - 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_tags_proto_rawDescOnce sync.Once - file_proto_tags_proto_rawDescData = file_proto_tags_proto_rawDesc -) - -func file_proto_tags_proto_rawDescGZIP() []byte { - file_proto_tags_proto_rawDescOnce.Do(func() { - file_proto_tags_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_tags_proto_rawDescData) - }) - return file_proto_tags_proto_rawDescData -} - -var file_proto_tags_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_proto_tags_proto_goTypes = []interface{}{ - (*Tag)(nil), // 0: tags.Tag - (*AddRequest)(nil), // 1: tags.AddRequest - (*AddResponse)(nil), // 2: tags.AddResponse - (*RemoveRequest)(nil), // 3: tags.RemoveRequest - (*RemoveResponse)(nil), // 4: tags.RemoveResponse - (*UpdateRequest)(nil), // 5: tags.UpdateRequest - (*UpdateResponse)(nil), // 6: tags.UpdateResponse - (*ListRequest)(nil), // 7: tags.ListRequest - (*ListResponse)(nil), // 8: tags.ListResponse -} -var file_proto_tags_proto_depIdxs = []int32{ - 0, // 0: tags.ListResponse.tags:type_name -> tags.Tag - 1, // 1: tags.Tags.Add:input_type -> tags.AddRequest - 3, // 2: tags.Tags.Remove:input_type -> tags.RemoveRequest - 7, // 3: tags.Tags.List:input_type -> tags.ListRequest - 5, // 4: tags.Tags.Update:input_type -> tags.UpdateRequest - 2, // 5: tags.Tags.Add:output_type -> tags.AddResponse - 4, // 6: tags.Tags.Remove:output_type -> tags.RemoveResponse - 8, // 7: tags.Tags.List:output_type -> tags.ListResponse - 6, // 8: tags.Tags.Update:output_type -> tags.UpdateResponse - 5, // [5:9] is the sub-list for method output_type - 1, // [1:5] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_proto_tags_proto_init() } -func file_proto_tags_proto_init() { - if File_proto_tags_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_tags_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_tags_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_tags_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_tags_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_tags_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_tags_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_tags_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_tags_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_tags_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_tags_proto_rawDesc, - NumEnums: 0, - NumMessages: 9, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_tags_proto_goTypes, - DependencyIndexes: file_proto_tags_proto_depIdxs, - MessageInfos: file_proto_tags_proto_msgTypes, - }.Build() - File_proto_tags_proto = out.File - file_proto_tags_proto_rawDesc = nil - file_proto_tags_proto_goTypes = nil - file_proto_tags_proto_depIdxs = nil -} diff --git a/tags/proto/tags.pb.micro.go b/tags/proto/tags.pb.micro.go deleted file mode 100644 index 029b1ec..0000000 --- a/tags/proto/tags.pb.micro.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by protoc-gen-micro. DO NOT EDIT. -// source: proto/tags.proto - -package tags - -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" -) - -import ( - context "context" - api "github.com/micro/micro/v3/service/api" - client "github.com/micro/micro/v3/service/client" - server "github.com/micro/micro/v3/service/server" -) - -// 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 - -// Reference imports to suppress errors if they are not otherwise used. -var _ api.Endpoint -var _ context.Context -var _ client.Option -var _ server.Option - -// Api Endpoints for Tags service - -func NewTagsEndpoints() []*api.Endpoint { - return []*api.Endpoint{} -} - -// Client API for Tags service - -type TagsService interface { - // Add a tag to a resource - Add(ctx context.Context, in *AddRequest, opts ...client.CallOption) (*AddResponse, error) - // Remove a tag from a resource - Remove(ctx context.Context, in *RemoveRequest, opts ...client.CallOption) (*RemoveResponse, error) - // List tags by - List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (*ListResponse, error) - // Change properties of a tag, currently only the title and description - Update(ctx context.Context, in *UpdateRequest, opts ...client.CallOption) (*UpdateResponse, error) -} - -type tagsService struct { - c client.Client - name string -} - -func NewTagsService(name string, c client.Client) TagsService { - return &tagsService{ - c: c, - name: name, - } -} - -func (c *tagsService) Add(ctx context.Context, in *AddRequest, opts ...client.CallOption) (*AddResponse, error) { - req := c.c.NewRequest(c.name, "Tags.Add", in) - out := new(AddResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagsService) Remove(ctx context.Context, in *RemoveRequest, opts ...client.CallOption) (*RemoveResponse, error) { - req := c.c.NewRequest(c.name, "Tags.Remove", in) - out := new(RemoveResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagsService) List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (*ListResponse, error) { - req := c.c.NewRequest(c.name, "Tags.List", in) - out := new(ListResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tagsService) Update(ctx context.Context, in *UpdateRequest, opts ...client.CallOption) (*UpdateResponse, error) { - req := c.c.NewRequest(c.name, "Tags.Update", in) - out := new(UpdateResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for Tags service - -type TagsHandler interface { - // Add a tag to a resource - Add(context.Context, *AddRequest, *AddResponse) error - // Remove a tag from a resource - Remove(context.Context, *RemoveRequest, *RemoveResponse) error - // List tags by - List(context.Context, *ListRequest, *ListResponse) error - // Change properties of a tag, currently only the title and description - Update(context.Context, *UpdateRequest, *UpdateResponse) error -} - -func RegisterTagsHandler(s server.Server, hdlr TagsHandler, opts ...server.HandlerOption) error { - type tags interface { - Add(ctx context.Context, in *AddRequest, out *AddResponse) error - Remove(ctx context.Context, in *RemoveRequest, out *RemoveResponse) error - List(ctx context.Context, in *ListRequest, out *ListResponse) error - Update(ctx context.Context, in *UpdateRequest, out *UpdateResponse) error - } - type Tags struct { - tags - } - h := &tagsHandler{hdlr} - return s.Handle(s.NewHandler(&Tags{h}, opts...)) -} - -type tagsHandler struct { - TagsHandler -} - -func (h *tagsHandler) Add(ctx context.Context, in *AddRequest, out *AddResponse) error { - return h.TagsHandler.Add(ctx, in, out) -} - -func (h *tagsHandler) Remove(ctx context.Context, in *RemoveRequest, out *RemoveResponse) error { - return h.TagsHandler.Remove(ctx, in, out) -} - -func (h *tagsHandler) List(ctx context.Context, in *ListRequest, out *ListResponse) error { - return h.TagsHandler.List(ctx, in, out) -} - -func (h *tagsHandler) Update(ctx context.Context, in *UpdateRequest, out *UpdateResponse) error { - return h.TagsHandler.Update(ctx, in, out) -} diff --git a/tags/proto/tags.proto b/tags/proto/tags.proto deleted file mode 100644 index f346045..0000000 --- a/tags/proto/tags.proto +++ /dev/null @@ -1,64 +0,0 @@ -syntax = "proto3"; - -package tags; -option go_package = "./proto;tags"; - -service Tags { - // Add a tag to a resource - rpc Add(AddRequest) returns (AddResponse) {} - // Remove a tag from a resource - rpc Remove(RemoveRequest) returns (RemoveResponse) {} - // List tags by - rpc List(ListRequest) returns (ListResponse) {} - // Change properties of a tag, currently only the title and description - rpc Update(UpdateRequest) returns (UpdateResponse){} -} - -message Tag { - // Type is useful for namespacing and listing across resources, - // ie. list tags for posts, customers etc. - string type = 1; - string slug = 2; - string title = 3; - string description = 4; - int64 count = 5; -} - -message AddRequest { - string resourceID = 1; - string type = 2; - string title = 3; - int64 resourceCreated = 4; -} - -message AddResponse{} - -message RemoveRequest { - string resourceID = 1; - string type = 2; - string title = 3; -} - -message RemoveResponse{} - -message UpdateRequest { - string type = 1; - string title = 2; - string description = 3; -} - -message UpdateResponse{} - -// ListRequest: list either by resource id or type. -// Optionally filter by min or max count. -message ListRequest{ - string resourceID = 1; - string type = 2; - int64 minCount = 3; - int64 maxCount = 4; -} - -message ListResponse{ - repeated Tag tags = 1; -} - diff --git a/test/integration/blog/blog_test.go b/test/integration/blog/blog_test.go deleted file mode 100644 index 9a7bcd3..0000000 --- a/test/integration/blog/blog_test.go +++ /dev/null @@ -1,289 +0,0 @@ -// +build integration - -package signup - -import ( - "encoding/json" - "errors" - "math/rand" - - "os" - "os/exec" - "strings" - "testing" - "time" - - "github.com/micro/micro/v3/test" - p "github.com/micro/services/posts/proto" -) - -const ( - retryCount = 1 - signupSuccessString = "Signup complete" -) - -var letterRunes = []rune("abcdefghijklmnopqrstuvwxyz") - -func randStringRunes(n int) string { - b := make([]rune, n) - for i := range b { - b[i] = letterRunes[rand.Intn(len(letterRunes))] - } - return string(b) -} - -func setupBlogTests(serv test.Server, t *test.T) { - envToConfigKey := map[string][]string{} - - if err := test.Try("Set up config values", t, func() ([]byte, error) { - for envKey, configKeys := range envToConfigKey { - val := os.Getenv(envKey) - if len(val) == 0 { - t.Fatalf("'%v' flag is missing", envKey) - } - for _, configKey := range configKeys { - outp, err := serv.Command().Exec("config", "set", configKey, val) - if err != nil { - return outp, err - } - } - } - return serv.Command().Exec("config", "set", "micro.billing.max_included_services", "3") - }, 10*time.Second); err != nil { - t.Fatal(err) - return - } - - services := []struct { - envVar string - deflt string - }{ - {envVar: "POSTS_SVC", deflt: "../../../posts"}, - {envVar: "TAGS_SVC", deflt: "../../../tags"}, - } - - for _, v := range services { - outp, err := serv.Command().Exec("run", v.deflt) - if err != nil { - t.Fatal(string(outp)) - return - } - } - - if err := test.Try("Find posts and tags", t, func() ([]byte, error) { - outp, err := serv.Command().Exec("services") - if err != nil { - return outp, err - } - list := []string{"posts", "tags"} - logOutp := []byte{} - fail := false - for _, s := range list { - if !strings.Contains(string(outp), s) { - o, _ := serv.Command().Exec("logs", s) - logOutp = append(logOutp, o...) - fail = true - } - } - if fail { - return append(outp, logOutp...), errors.New("Can't find required services in list") - } - return outp, err - }, 180*time.Second); err != nil { - return - } - - // setup rules - - // Adjust rules before we signup into a non admin account - outp, err := serv.Command().Exec("auth", "create", "rule", "--access=granted", "--scope=''", "--resource=\"service:posts:*\"", "posts") - if err != nil { - t.Fatalf("Error setting up rules: %v", outp) - return - } - - // copy the config with the admin logged in so we can use it for reading logs - // we dont want to have an open access rule for logs as it's not how it works in live - confPath := serv.Command().Config - outp, err = exec.Command("cp", "-rf", confPath, confPath+".admin").CombinedOutput() - if err != nil { - t.Fatalf("Error copying config: %v", outp) - return - } -} - -func TestPostsService(t *testing.T) { - test.TrySuite(t, testPosts, retryCount) -} - -// count is a string in responses... -type protoTag struct { - Title string `json:"title"` - Slug string `json:"slug"` - Type string `json:"type"` - Count string `json:"count"` -} - -func testPosts(t *test.T) { - t.Parallel() - - serv := test.NewServer(t, test.WithLogin()) - defer serv.Close() - if err := serv.Run(); err != nil { - return - } - - setupBlogTests(serv, t) - - cmd := serv.Command() - - if err := test.Try("Save post", t, func() ([]byte, error) { - // Attention! The content must be unquoted, don't add quotes. - outp, err := cmd.Exec("posts", "save", "--id=1", "--title=Hi", "--content=Hi there", "--tags=a,b") - if err != nil { - outp1, _ := cmd.Exec("logs", "posts") - return append(outp, outp1...), err - } - return outp, err - }, 15*time.Second); err != nil { - return - } - - outp, err := cmd.Exec("posts", "query") - if err != nil { - t.Fatal(string(outp)) - } - - expected := []p.Post{ - { - Id: "1", - Title: "Hi", - Content: "Hi there", - Tags: []string{"a", "b"}, - }, - } - type rsp struct { - Posts []p.Post `json:"posts"` - } - var actual rsp - json.Unmarshal(outp, &actual) - if len(actual.Posts) == 0 { - t.Fatal(string(outp)) - return - } - - if expected[0].Id != actual.Posts[0].Id || - expected[0].Title != actual.Posts[0].Title || - expected[0].Content != actual.Posts[0].Content || - len(expected[0].Tags) != len(actual.Posts[0].Tags) { - t.Fatal(expected[0], actual.Posts[0]) - } - - outp, err = cmd.Exec("tags", "list", "--type=post-tag") - type tagsRsp struct { - Tags []protoTag `json:"tags"` - } - var tagsActual tagsRsp - json.Unmarshal(outp, &tagsActual) - if len(tagsActual.Tags) == 0 { - outp1, _ := cmd.Exec("logs", "tags") - t.Fatal(string(append(outp, outp1...))) - return - } - if len(tagsActual.Tags) != 2 { - t.Fatal(tagsActual.Tags) - return - } - - if tagsActual.Tags[0].Count != "1" { - t.Fatal(tagsActual.Tags[0]) - return - } - if tagsActual.Tags[1].Count != "1" { - t.Fatal(tagsActual.Tags[1]) - return - } - - time.Sleep(5 * time.Second) - // Inserting an other post so tag counts increase - outp, err = cmd.Exec("posts", "save", "--id=2", "--title=Hi1", "--content=Hi there1", "--tags=a,b") - if err != nil { - t.Fatal(string(outp)) - return - } - - outp, err = cmd.Exec("tags", "list", "--type=post-tag") - json.Unmarshal(outp, &tagsActual) - if len(tagsActual.Tags) == 0 { - outp1, _ := cmd.Exec("logs", "tags") - t.Fatal(string(append(outp, outp1...))) - return - } - if len(tagsActual.Tags) != 2 { - t.Fatal(tagsActual.Tags) - return - } - - if tagsActual.Tags[0].Count != "2" { - outp1, _ := cmd.Exec("store", "list", "--table=tags") - outp2, _ := cmd.Exec("store", "list", "--table=posts") - t.Fatal(tagsActual.Tags[0], string(outp1), string(outp2)) - return - } - if tagsActual.Tags[1].Count != "2" { - outp1, _ := cmd.Exec("store", "list", "--table=tags") - outp2, _ := cmd.Exec("store", "list", "--table=posts") - t.Fatal(tagsActual.Tags[1], string(outp1), string(outp2)) - return - } - - // test updating fields fields and removing tags - outp, err = cmd.Exec("posts", "save", "--id=2", "--title=Hi2", "--tags=a") - if err != nil { - t.Fatal(string(outp)) - return - } - - outp, err = cmd.Exec("tags", "list", "--type=post-tag") - json.Unmarshal(outp, &tagsActual) - if len(tagsActual.Tags) == 0 { - outp1, _ := cmd.Exec("logs", "tags") - t.Fatal(string(append(outp, outp1...))) - return - } - if len(tagsActual.Tags) != 2 { - t.Fatal(tagsActual.Tags) - return - } - for _, tag := range tagsActual.Tags { - if tag.Title == "b" { - if tag.Count != "1" { - t.Fatal("Tag b should have a count 1") - return - } - } - if tag.Title == "a" { - if tag.Count != "2" { - t.Fatal("Tag b should have a count 2") - return - } - } - } - - outp, err = cmd.Exec("posts", "--id=2", "query") - if err != nil { - t.Fatal(string(outp)) - return - } - json.Unmarshal(outp, &actual) - if len(actual.Posts) == 0 { - t.Fatal(string(outp)) - return - } - if actual.Posts[0].Title != "Hi2" || - actual.Posts[0].Content != "Hi there1" || - actual.Posts[0].Slug != "hi2" || len(actual.Posts[0].Tags) != 1 { - t.Fatal(actual) - return - } -} diff --git a/test/integration/integration_test.go b/test/integration/integration_test.go new file mode 100644 index 0000000..67742de --- /dev/null +++ b/test/integration/integration_test.go @@ -0,0 +1,7 @@ +package integration + +import ( + "testing" +) + +func TestIntegrations(t *testing.T) {}