diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8866613..1a90f1f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,5 +1,10 @@ name: Generate docs -on: [push] +on: + # Trigger the workflow on push or pull request, + # but only for the main branch + push: + branches: + - master jobs: docs: @@ -66,3 +71,31 @@ jobs: 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 + 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 + with: + access: public + package: services/clients/ts/package.json + token: ${{ secrets.NPM_SITE_TOKEN }} diff --git a/chats/Makefile b/chats/Makefile index 09fbf49..1cd3626 100644 --- a/chats/Makefile +++ b/chats/Makefile @@ -7,8 +7,12 @@ init: go get github.com/micro/micro/v3/cmd/protoc-gen-micro .PHONY: proto proto: - protoc --proto_path=. --micro_out=. --go_out=:. proto/chats.proto - + protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=:. proto/chats.proto + +docs: + protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=:. proto/chats.proto + @redoc-cli bundle api-protobuf.json + .PHONY: build build: go build -o chats *.go diff --git a/chats/proto/chats.pb.go b/chats/proto/chats.pb.go index 27ce863..9530c19 100644 --- a/chats/proto/chats.pb.go +++ b/chats/proto/chats.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.23.0 -// protoc v3.13.0 +// protoc-gen-go v1.25.0 +// protoc v3.6.1 // source: proto/chats.proto package chats diff --git a/clients/skip b/clients/skip new file mode 100644 index 0000000..e69de29 diff --git a/clients/ts/.gitignore b/clients/ts/.gitignore new file mode 100644 index 0000000..1521c8b --- /dev/null +++ b/clients/ts/.gitignore @@ -0,0 +1 @@ +dist diff --git a/clients/ts/.npmrc b/clients/ts/.npmrc new file mode 100644 index 0000000..48c7fa5 --- /dev/null +++ b/clients/ts/.npmrc @@ -0,0 +1 @@ +registry=https://npm.pkg.github.com/micro diff --git a/clients/ts/package.json b/clients/ts/package.json new file mode 100644 index 0000000..3bfa913 --- /dev/null +++ b/clients/ts/package.json @@ -0,0 +1,21 @@ +{ + "name": "@micro/services", + "version": "1.0.1", + "description": "", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/micro/services" + }, + "author": "", + "license": "ISC", + "scripts": { + "build": "tsc", + "prepare": "tsc", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "devDependencies": { + "typescript": "^2.7.2" + } +} diff --git a/clients/ts/tsconfig.json b/clients/ts/tsconfig.json new file mode 100644 index 0000000..1c7598d --- /dev/null +++ b/clients/ts/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "lib": ["es2017", "es7", "es6", "dom"], + "declaration": true, + "outDir": "dist", + "strict": true, + "esModuleInterop": true + }, + "exclude": [ + "node_modules", + "dist" + ] + } \ No newline at end of file diff --git a/cmd/docgen/main.go b/cmd/docgen/main.go index 45d6ba6..7a1bc99 100644 --- a/cmd/docgen/main.go +++ b/cmd/docgen/main.go @@ -157,7 +157,7 @@ var servicesToTags = map[string][]string{ "posts": []string{"Headless CMS"}, "tags": []string{"Headless CMS"}, "feeds": []string{"Headless CMS"}, - "chat": []string{"Communications"}, + "datastore": []string{"Backend"}, "geocoding": []string{"Logistics"}, "places": []string{"Logistics"}, "routing": []string{"Logistics"}, @@ -214,7 +214,7 @@ func saveSpec(originalMarkDown []byte, contentDir, serviceName string, spec *ope if len(parts) <= 1 { return string(bs) } - parts[len(parts)-1] = strings.Repeat(" ", prepend) + parts[len(parts)-1] + parts[len(parts)-1] = parts[len(parts)-1] return strings.Join(parts, "\n") } } @@ -265,6 +265,13 @@ func schemaToMap(spec *openapi3.SchemaRef, schemas map[string]*openapi3.SchemaRe k = strcase.SnakeCase(k) //v.Value. if v.Value.Type == "object" { + // @todo identify what is a slice and what is not! + // currently the openapi converter messes this up + // see redoc html output + ret[k] = recurse(v.Value.Properties) + continue + } + if v.Value.Type == "array" { // @todo identify what is a slice and what is not! // currently the openapi converter messes this up // see redoc html output diff --git a/cmd/tsgen/gen_test.go b/cmd/tsgen/gen_test.go new file mode 100644 index 0000000..6ce69e3 --- /dev/null +++ b/cmd/tsgen/gen_test.go @@ -0,0 +1,154 @@ +package main + +import ( + "encoding/json" + "testing" + + "github.com/getkin/kin-openapi/openapi3" +) + +type tspec struct { + openapi string + tsresult string + key string +} + +var cases = []tspec{ + { + openapi: `{ + "components": { + "schemas": { + "QueryRequest": { + "description": "Query posts. Acts as a listing when no id or slug provided.\n Gets a single post by id or slug if any of them provided.", + "properties": { + "id": { + "type": "string" + }, + "limit": { + "format": "int64", + "type": "number" + }, + "offset": { + "format": "int64", + "type": "number" + }, + "slug": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "title": "QueryRequest", + "type": "object" + } + } + } + }`, + key: "QueryRequest", + tsresult: `export interface QueryRequest { + limit?: number; + offset?: number; + slug?: number; + tag?: number; + id?: number; +}`, + }, + { + openapi: `{"components": { "schemas": { + "QueryResponse": { + "properties": { + "posts": { + "items": { + "properties": { + "author": { + "type": "string" + }, + "content": { + "type": "string" + }, + "created": { + "format": "int64", + "type": "number" + }, + "id": { + "type": "string" + }, + "image": { + "type": "string" + }, + "metadata": { + "items": { + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "slug": { + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "type": "string" + }, + "updated": { + "format": "int64", + "type": "number" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "title": "QueryResponse", + "type": "object" +}}}}`, + key: "QueryResponse", + tsresult: ` +export interface QueryResponse { + posts?: { + metadata?: { + value?: string; + key?: string; + }[]; + slug?: string; + title?: string; + content?: string; + created?: number; + id?: string; + image?: string; + author?: string; + tags?: string[]; + updated?: number; + }[]; +}`, + }, +} + +func TestTsGen(t *testing.T) { + for _, c := range cases { + spec := &openapi3.Swagger{} + err := json.Unmarshal([]byte(c.openapi), &spec) + if err != nil { + t.Fatal(err) + } + //spew.Dump(spec.Components.Schemas) + res := schemaToTs(c.key, spec.Components.Schemas[c.key]) + if res != c.tsresult { + t.Logf("Expected %v, got: %v", c.tsresult, res) + } + } +} diff --git a/cmd/tsgen/main.go b/cmd/tsgen/main.go new file mode 100644 index 0000000..ffcf64f --- /dev/null +++ b/cmd/tsgen/main.go @@ -0,0 +1,424 @@ +package main + +import ( + "encoding/json" + "fmt" + "io" + "io/ioutil" + "log" + "os" + "os/exec" + "path/filepath" + "strings" + "text/template" + + "github.com/Masterminds/semver/v3" + "github.com/getkin/kin-openapi/openapi3" + "github.com/stoewer/go-strcase" +) + +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() + + tsPath := filepath.Join(workDir, "clients", "ts") + + for _, f := range files { + if f.IsDir() && !strings.HasPrefix(f.Name(), ".") { + serviceName := 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 + + // detect openapi json file + apiJSON := "" + for _, serviceFile := range serviceFiles { + if strings.Contains(serviceFile.Name(), "api") && strings.HasSuffix(serviceFile.Name(), ".json") { + apiJSON = filepath.Join(serviceDir, serviceFile.Name()) + } + if serviceFile.Name() == "skip" { + skip = true + } + } + if skip { + continue + } + fmt.Println(apiJSON) + + fmt.Println("Processing folder", serviceDir) + + // generate typescript files from openapi json + //gents := exec.Command("npx", "openapi-typescript", apiJSON, "--output", serviceName+".ts") + //gents.Dir = serviceDir + //fmt.Println(serviceDir) + //outp, err := gents.CombinedOutput() + //if err != nil { + // fmt.Println("Failed to make docs", string(outp)) + // os.Exit(1) + //} + 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) + } + + tsContent := "" + typeNames := []string{} + for k, v := range spec.Components.Schemas { + tsContent += schemaToTs(k, v) + "\n\n" + typeNames = append(typeNames, k) + } + os.MkdirAll(filepath.Join(tsPath, serviceName), 0777) + f, err := os.OpenFile(filepath.Join(tsPath, serviceName, "index.ts"), os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600) + if err != nil { + fmt.Println("Failed to open schema file", err) + os.Exit(1) + } + _, err = f.Write([]byte(tsContent)) + if err != nil { + fmt.Println("Failed to append to schema file", err) + os.Exit(1) + } + + f, err = os.OpenFile(filepath.Join(tsPath, "index.ts"), os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600) + if err != nil { + fmt.Println("Failed to open index.ts", err) + os.Exit(1) + } + + _, err = f.Write([]byte("")) + if err != nil { + fmt.Println("Failed to append to index file", err) + os.Exit(1) + } + } + } + // login to NPM + f, err := os.OpenFile(filepath.Join(tsPath, ".npmrc"), os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600) + if err != nil { + fmt.Println("Failed to open npmrc", err) + os.Exit(1) + } + + defer f.Close() + if len(os.Getenv("NPM_TOKEN")) == 0 { + fmt.Println("No NPM_TOKEN env found") + os.Exit(1) + } + if _, err = f.WriteString("\n//npm.pkg.github.com/:_authToken=" + os.Getenv("NPM_TOKEN")); err != nil { + fmt.Println("Failed to open npmrc", err) + os.Exit(1) + } + + // get latest version from github + getVersions := exec.Command("npm", "show", "@micro/services", "time", "--json") + getVersions.Dir = tsPath + + outp, err := getVersions.CombinedOutput() + if err != nil { + fmt.Println("Failed to get versions of NPM package", string(outp)) + os.Exit(1) + } + versions := map[string]interface{}{} + err = json.Unmarshal(outp, &versions) + if err != nil { + fmt.Println("Failed to unmarshal versions", string(outp)) + os.Exit(1) + } + + var latest *semver.Version + for version, _ := range versions { + v, err := semver.NewVersion(version) + if err != nil { + fmt.Println("Failed to parse semver", err) + os.Exit(1) + } + if latest == nil { + latest = v + } + if v.GreaterThan(latest) { + latest = v + } + } + newV := latest.IncPatch() + + // bump package to latest version + fmt.Println("Bumping to ", newV.String()) + repl := exec.Command("sed", "-i", "-e", "s/1.0.1/"+newV.String()+"/g", "package.json") + repl.Dir = tsPath + outp, err = repl.CombinedOutput() + if err != nil { + fmt.Println("Failed to make docs", 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, + }, +} + +func saveFile(tsDir string, serviceName string, spec *openapi3.Swagger) error { + for _, v := range specTypes { + fmt.Println("Processing ", v.name) + contentFile := filepath.Join(tsDir, serviceName+".ts") + fi, err := os.OpenFile(contentFile, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0777) + if err != nil { + return err + } + tmpl, err := template.New("test").Funcs(template.FuncMap{ + "toLower": func(s string) string { + return strings.ToLower(s) + }, + "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{} + + recurse = func(props map[string]*openapi3.SchemaRef) map[string]interface{} { + ret := map[string]interface{}{} + for k, v := range props { + k = strcase.SnakeCase(k) + //v.Value. + if v.Value.Type == "object" { + // @todo identify what is a slice and what is not! + // currently the openapi converter messes this up + // see redoc html output + ret[k] = recurse(v.Value.Properties) + continue + } + if v.Value.Type == "array" { + // @todo identify what is a slice and what is not! + // currently the openapi converter messes this up + // see redoc html output + ret[k] = []interface{}{recurse(v.Value.Properties)} + continue + } + switch v.Value.Type { + case "string": + if len(v.Value.Description) > 0 { + ret[k] = strings.Replace(v.Value.Description, "\n", ".", -1) + } else { + ret[k] = v.Value.Type + } + case "number": + ret[k] = 1 + case "boolean": + ret[k] = true + } + + } + return ret + } + return recurse(spec.Value.Properties) +} + +func schemaToTs(title string, spec *openapi3.SchemaRef) string { + var recurse func(props map[string]*openapi3.SchemaRef, level int) string + + recurse = func(props map[string]*openapi3.SchemaRef, level int) string { + ret := "" + + i := 0 + for k, v := range props { + ret += strings.Repeat(" ", level) + k = strcase.SnakeCase(k) + //v.Value. + switch v.Value.Type { + case "object": + // @todo identify what is a slice and what is not! + // currently the openapi converter messes this up + // see redoc html output + ret += k + "?: {\n" + recurse(v.Value.Properties, level+1) + strings.Repeat(" ", level) + "};" + + case "array": + if len(v.Value.Items.Value.Properties) == 0 { + ret += k + "?: " + v.Value.Items.Value.Type + "[];" + } else { + // @todo identify what is a slice and what is not! + // currently the openapi converter messes this up + // see redoc html output + ret += k + "?: {\n" + recurse(v.Value.Items.Value.Properties, level+1) + strings.Repeat(" ", level) + "}[];" + } + case "string": + ret += k + "?: " + "string;" + case "number": + ret += k + "?: " + "number;" + case "boolean": + ret += k + "?: " + "boolean;" + } + + if i < len(props) { + ret += "\n" + } + i++ + + } + return ret + } + return "export interface " + title + " {\n" + recurse(spec.Value.Properties, 1) + "}" +} + +const defTempl = ` +import { components } from './{{ .Info.Title | toLower }}_schema'; + +export interface types extends components {}; +` + +// 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/datastore/.gitignore b/datastore/.gitignore new file mode 100644 index 0000000..1001c0a --- /dev/null +++ b/datastore/.gitignore @@ -0,0 +1,2 @@ + +datastore diff --git a/datastore/Dockerfile b/datastore/Dockerfile new file mode 100644 index 0000000..89fe95f --- /dev/null +++ b/datastore/Dockerfile @@ -0,0 +1,3 @@ +FROM alpine +ADD datastore /datastore +ENTRYPOINT [ "/datastore" ] diff --git a/datastore/Makefile b/datastore/Makefile new file mode 100644 index 0000000..1875e30 --- /dev/null +++ b/datastore/Makefile @@ -0,0 +1,27 @@ + +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/datastore.proto + +.PHONY: docs +docs: + protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=:. proto/datastore.proto + @redoc-cli bundle api-datastore.json + +.PHONY: build +build: + go build -o datastore *.go + +.PHONY: test +test: + go test -v ./... -cover + +.PHONY: docker +docker: + docker build . -t datastore:latest diff --git a/datastore/README.md b/datastore/README.md new file mode 100644 index 0000000..1dcae7f --- /dev/null +++ b/datastore/README.md @@ -0,0 +1,4 @@ +# Datastore Service + +The Datastore service is a document store with simple querying capabilities. +Tutorial coming soon. \ No newline at end of file diff --git a/datastore/generate.go b/datastore/generate.go new file mode 100644 index 0000000..96f431a --- /dev/null +++ b/datastore/generate.go @@ -0,0 +1,2 @@ +package main +//go:generate make proto diff --git a/datastore/handler/datastore.go b/datastore/handler/datastore.go new file mode 100644 index 0000000..9d8183b --- /dev/null +++ b/datastore/handler/datastore.go @@ -0,0 +1,140 @@ +package handler + +import ( + "context" + "encoding/json" + "strings" + + log "github.com/micro/micro/v3/service/logger" + "github.com/micro/micro/v3/service/model" + + datastore "github.com/micro/services/datastore/proto" +) + +var indexIndex = model.Index{ + FieldName: "TypeOf", +} + +type IndexRecord struct { + ID string + TypeOf string + Index model.Index +} + +type Datastore struct { +} + +func (e *Datastore) Create(ctx context.Context, req *datastore.CreateRequest, rsp *datastore.CreateResponse) error { + log.Info("Received Datastore.Create request") + m := map[string]interface{}{} + err := json.Unmarshal([]byte(req.Value), &m) + if err != nil { + return err + } + indexes, err := e.getIndexes(ctx) + if err != nil { + return err + } + db := model.New(map[string]interface{}{}, &model.Options{ + Indexes: indexes, + }) + return db.Context(ctx).Create(m) +} + +func (e *Datastore) Update(ctx context.Context, req *datastore.UpdateRequest, rsp *datastore.UpdateResponse) error { + log.Info("Received Datastore.Update request") + m := map[string]interface{}{} + err := json.Unmarshal([]byte(req.Value), &m) + if err != nil { + return err + } + indexes, err := e.getIndexes(ctx) + if err != nil { + return err + } + db := model.New(map[string]interface{}{}, &model.Options{ + Indexes: indexes, + }) + return db.Context(ctx).Update(m) +} + +func (e *Datastore) getIndexes(ctx context.Context) ([]model.Index, error) { + indexDb := model.New(map[string]interface{}{}, &model.Options{ + Indexes: []model.Index{indexIndex}, + }) + result := []IndexRecord{} + err := indexDb.Context(ctx).Read(model.QueryEquals("TypeOf", "_index"), &result) + if err != nil { + return nil, err + } + indexes := []model.Index{} + for _, v := range result { + indexes = append(indexes, v.Index) + } + return indexes, nil +} + +func (e *Datastore) Read(ctx context.Context, req *datastore.ReadRequest, rsp *datastore.ReadResponse) error { + log.Info("Received Datastore.Read request") + q := toQuery(req.Query) + result := []map[string]interface{}{} + indexes, err := e.getIndexes(ctx) + if err != nil { + return err + } + db := model.New(map[string]interface{}{}, &model.Options{ + Indexes: indexes, + }) + err = db.Context(ctx).Read(q, &result) + if err != nil { + return err + } + js, err := json.Marshal(result) + rsp.Value = string(js) + return err +} + +func (e *Datastore) CreateIndex(ctx context.Context, req *datastore.CreateIndexRequest, rsp *datastore.CreateIndexResponse) error { + log.Info("Received Datastore.Index request") + + index := toIndex(req.Index) + indexRecord := IndexRecord{ + ID: index.FieldName + index.Type + index.Order.FieldName + string(index.Order.Type), + Index: index, + TypeOf: "_index", + } + db := model.New(IndexRecord{}, &model.Options{ + Indexes: []model.Index{indexIndex}, + }) + return db.Context(ctx).Create(indexRecord) +} + +func (e *Datastore) Delete(ctx context.Context, req *datastore.DeleteRequest, rsp *datastore.DeleteResponse) error { + log.Info("Received Datastore.Delete request") + q := toQuery(req.Query) + return model.New(map[string]interface{}{}, nil).Context(ctx).Delete(q) +} + +func toQuery(pquery *datastore.Query) model.Query { + q := model.QueryEquals(pquery.Index.FieldName, pquery.Value) + if pquery.Order != nil { + q.Order.FieldName = pquery.Order.FieldName + q.Order.Type = model.OrderType(pquery.Order.OrderType.String()) + } + return q +} + +func toIndex(pindex *datastore.Index) model.Index { + i := model.Index{ + FieldName: pindex.FieldName, + Type: pindex.Type, + Unique: pindex.Unique, + } + if pindex.Order != nil { + i.Order = model.Order{ + FieldName: pindex.FieldName, + Type: model.OrderType(strings.ToLower(pindex.Order.OrderType.String())), + } + } + return i +} diff --git a/datastore/main.go b/datastore/main.go new file mode 100644 index 0000000..3918873 --- /dev/null +++ b/datastore/main.go @@ -0,0 +1,25 @@ +package main + +import ( + "github.com/micro/services/datastore/handler" + pb "github.com/micro/services/datastore/proto" + + "github.com/micro/micro/v3/service" + "github.com/micro/micro/v3/service/logger" +) + +func main() { + // Create service + srv := service.New( + service.Name("datastore"), + service.Version("latest"), + ) + + // Register handler + pb.RegisterDatastoreHandler(srv.Server(), new(handler.Datastore)) + + // Run service + if err := srv.Run(); err != nil { + logger.Fatal(err) + } +} diff --git a/datastore/micro.mu b/datastore/micro.mu new file mode 100644 index 0000000..7e81a1f --- /dev/null +++ b/datastore/micro.mu @@ -0,0 +1 @@ +service datastore diff --git a/datastore/proto/datastore.pb.go b/datastore/proto/datastore.pb.go new file mode 100644 index 0000000..31a240a --- /dev/null +++ b/datastore/proto/datastore.pb.go @@ -0,0 +1,1111 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.6.1 +// source: proto/datastore.proto + +package datastore + +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 + +// Ordered or unordered keys. Ordered keys are padded. +// Default is true. This option only exists for strings, where ordering +// comes at the cost of having rather long padded keys. +type Order_OrderType int32 + +const ( + Order_UNORDERED Order_OrderType = 0 + Order_ASCENDING Order_OrderType = 1 + Order_DESCENDING Order_OrderType = 1 +) + +// Enum value maps for Order_OrderType. +var ( + Order_OrderType_name = map[int32]string{ + 0: "UNORDERED", + 1: "ASCENDING", + // Duplicate value: 1: "DESCENDING", + } + Order_OrderType_value = map[string]int32{ + "UNORDERED": 0, + "ASCENDING": 1, + "DESCENDING": 1, + } +) + +func (x Order_OrderType) Enum() *Order_OrderType { + p := new(Order_OrderType) + *p = x + return p +} + +func (x Order_OrderType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Order_OrderType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_datastore_proto_enumTypes[0].Descriptor() +} + +func (Order_OrderType) Type() protoreflect.EnumType { + return &file_proto_datastore_proto_enumTypes[0] +} + +func (x Order_OrderType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Order_OrderType.Descriptor instead. +func (Order_OrderType) EnumDescriptor() ([]byte, []int) { + return file_proto_datastore_proto_rawDescGZIP(), []int{1, 0} +} + +type Query struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Index *Index `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` + Order *Order `protobuf:"bytes,2,opt,name=order,proto3" json:"order,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,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 *Query) Reset() { + *x = Query{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_datastore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Query) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Query) ProtoMessage() {} + +func (x *Query) ProtoReflect() protoreflect.Message { + mi := &file_proto_datastore_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 Query.ProtoReflect.Descriptor instead. +func (*Query) Descriptor() ([]byte, []int) { + return file_proto_datastore_proto_rawDescGZIP(), []int{0} +} + +func (x *Query) GetIndex() *Index { + if x != nil { + return x.Index + } + return nil +} + +func (x *Query) GetOrder() *Order { + if x != nil { + return x.Order + } + return nil +} + +func (x *Query) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *Query) GetOffset() int64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *Query) GetLimit() int64 { + if x != nil { + return x.Limit + } + return 0 +} + +// Order is the order of the index +type Order struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Field to order on + // eg. age + FieldName string `protobuf:"bytes,1,opt,name=fieldName,proto3" json:"fieldName,omitempty"` + // Type of the ordering + // eg. ascending, descending, unordered + OrderType Order_OrderType `protobuf:"varint,2,opt,name=orderType,proto3,enum=datastore.Order_OrderType" json:"orderType,omitempty"` +} + +func (x *Order) Reset() { + *x = Order{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_datastore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Order) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Order) ProtoMessage() {} + +func (x *Order) ProtoReflect() protoreflect.Message { + mi := &file_proto_datastore_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 Order.ProtoReflect.Descriptor instead. +func (*Order) Descriptor() ([]byte, []int) { + return file_proto_datastore_proto_rawDescGZIP(), []int{1} +} + +func (x *Order) GetFieldName() string { + if x != nil { + return x.FieldName + } + return "" +} + +func (x *Order) GetOrderType() Order_OrderType { + if x != nil { + return x.OrderType + } + return Order_UNORDERED +} + +type Index struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Field to index on. + // eg. email + FieldName string `protobuf:"bytes,1,opt,name=fieldName,proto3" json:"fieldName,omitempty"` + // Type of index + // eg. eq + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Order *Order `protobuf:"bytes,3,opt,name=order,proto3" json:"order,omitempty"` + // Do not allow duplicate values of this field in the index. + // Useful for emails, usernames, post slugs etc. + Unique bool `protobuf:"varint,4,opt,name=unique,proto3" json:"unique,omitempty"` + // Strings for ordering will be padded to a fix length + // Not a useful property for Querying, please ignore this at query time. + // Number is in bytes, not string characters. Choose a sufficiently big one. + // Consider that each character might take 4 bytes given the + // internals of reverse ordering. So a good rule of thumbs is expected + // characters in a string X 4 + StringOrderPadLength int64 `protobuf:"varint,5,opt,name=stringOrderPadLength,proto3" json:"stringOrderPadLength,omitempty"` + // True = base32 encode ordered strings for easier management + // or false = keep 4 bytes long runes that might dispaly weirdly + Base32Encode bool `protobuf:"varint,6,opt,name=Base32Encode,proto3" json:"Base32Encode,omitempty"` + FloatFormat string `protobuf:"bytes,7,opt,name=FloatFormat,proto3" json:"FloatFormat,omitempty"` + Float64Max float32 `protobuf:"fixed32,8,opt,name=Float64Max,proto3" json:"Float64Max,omitempty"` + Float32Max float32 `protobuf:"fixed32,9,opt,name=Float32Max,proto3" json:"Float32Max,omitempty"` +} + +func (x *Index) Reset() { + *x = Index{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_datastore_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Index) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Index) ProtoMessage() {} + +func (x *Index) ProtoReflect() protoreflect.Message { + mi := &file_proto_datastore_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 Index.ProtoReflect.Descriptor instead. +func (*Index) Descriptor() ([]byte, []int) { + return file_proto_datastore_proto_rawDescGZIP(), []int{2} +} + +func (x *Index) GetFieldName() string { + if x != nil { + return x.FieldName + } + return "" +} + +func (x *Index) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Index) GetOrder() *Order { + if x != nil { + return x.Order + } + return nil +} + +func (x *Index) GetUnique() bool { + if x != nil { + return x.Unique + } + return false +} + +func (x *Index) GetStringOrderPadLength() int64 { + if x != nil { + return x.StringOrderPadLength + } + return 0 +} + +func (x *Index) GetBase32Encode() bool { + if x != nil { + return x.Base32Encode + } + return false +} + +func (x *Index) GetFloatFormat() string { + if x != nil { + return x.FloatFormat + } + return "" +} + +func (x *Index) GetFloat64Max() float32 { + if x != nil { + return x.Float64Max + } + return 0 +} + +func (x *Index) GetFloat32Max() float32 { + if x != nil { + return x.Float32Max + } + return 0 +} + +type CreateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // JSON marshalled record to save + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *CreateRequest) Reset() { + *x = CreateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_datastore_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRequest) ProtoMessage() {} + +func (x *CreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_datastore_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 CreateRequest.ProtoReflect.Descriptor instead. +func (*CreateRequest) Descriptor() ([]byte, []int) { + return file_proto_datastore_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateRequest) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type CreateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateResponse) Reset() { + *x = CreateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_datastore_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateResponse) ProtoMessage() {} + +func (x *CreateResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_datastore_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 CreateResponse.ProtoReflect.Descriptor instead. +func (*CreateResponse) Descriptor() ([]byte, []int) { + return file_proto_datastore_proto_rawDescGZIP(), []int{4} +} + +type UpdateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // JSON marshalled record to save + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *UpdateRequest) Reset() { + *x = UpdateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_datastore_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_datastore_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_datastore_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateRequest) GetValue() string { + if x != nil { + return x.Value + } + 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_datastore_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_datastore_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_datastore_proto_rawDescGZIP(), []int{6} +} + +type ReadRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Query *Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` +} + +func (x *ReadRequest) Reset() { + *x = ReadRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_datastore_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadRequest) ProtoMessage() {} + +func (x *ReadRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_datastore_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 ReadRequest.ProtoReflect.Descriptor instead. +func (*ReadRequest) Descriptor() ([]byte, []int) { + return file_proto_datastore_proto_rawDescGZIP(), []int{7} +} + +func (x *ReadRequest) GetQuery() *Query { + if x != nil { + return x.Query + } + return nil +} + +type ReadResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // JSON marshalled record found + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *ReadResponse) Reset() { + *x = ReadResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_datastore_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadResponse) ProtoMessage() {} + +func (x *ReadResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_datastore_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 ReadResponse.ProtoReflect.Descriptor instead. +func (*ReadResponse) Descriptor() ([]byte, []int) { + return file_proto_datastore_proto_rawDescGZIP(), []int{8} +} + +func (x *ReadResponse) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type DeleteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Query *Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` +} + +func (x *DeleteRequest) Reset() { + *x = DeleteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_datastore_proto_msgTypes[9] + 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_datastore_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 DeleteRequest.ProtoReflect.Descriptor instead. +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return file_proto_datastore_proto_rawDescGZIP(), []int{9} +} + +func (x *DeleteRequest) GetQuery() *Query { + if x != nil { + return x.Query + } + return nil +} + +type DeleteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteResponse) Reset() { + *x = DeleteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_datastore_proto_msgTypes[10] + 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_datastore_proto_msgTypes[10] + 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_datastore_proto_rawDescGZIP(), []int{10} +} + +type CreateIndexRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Index *Index `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` +} + +func (x *CreateIndexRequest) Reset() { + *x = CreateIndexRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_datastore_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateIndexRequest) ProtoMessage() {} + +func (x *CreateIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_datastore_proto_msgTypes[11] + 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 CreateIndexRequest.ProtoReflect.Descriptor instead. +func (*CreateIndexRequest) Descriptor() ([]byte, []int) { + return file_proto_datastore_proto_rawDescGZIP(), []int{11} +} + +func (x *CreateIndexRequest) GetIndex() *Index { + if x != nil { + return x.Index + } + return nil +} + +type CreateIndexResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateIndexResponse) Reset() { + *x = CreateIndexResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_datastore_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateIndexResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateIndexResponse) ProtoMessage() {} + +func (x *CreateIndexResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_datastore_proto_msgTypes[12] + 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 CreateIndexResponse.ProtoReflect.Descriptor instead. +func (*CreateIndexResponse) Descriptor() ([]byte, []int) { + return file_proto_datastore_proto_rawDescGZIP(), []int{12} +} + +var File_proto_datastore_proto protoreflect.FileDescriptor + +var file_proto_datastore_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 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, 0x9e, 0x01, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, + 0x70, 0x65, 0x22, 0x3d, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, + 0x0a, 0x09, 0x41, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, 0x0a, + 0x0a, 0x44, 0x45, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x1a, 0x02, 0x10, + 0x01, 0x22, 0xb3, 0x02, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, + 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x12, 0x32, 0x0a, + 0x14, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x50, 0x61, 0x64, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x50, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x12, 0x22, 0x0a, 0x0c, 0x42, 0x61, 0x73, 0x65, 0x33, 0x32, 0x45, 0x6e, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x42, 0x61, 0x73, 0x65, 0x33, 0x32, 0x45, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x46, 0x6c, 0x6f, 0x61, + 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x61, 0x74, + 0x36, 0x34, 0x4d, 0x61, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x46, 0x6c, 0x6f, + 0x61, 0x74, 0x36, 0x34, 0x4d, 0x61, 0x78, 0x12, 0x1e, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x61, 0x74, + 0x33, 0x32, 0x4d, 0x61, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x46, 0x6c, 0x6f, + 0x61, 0x74, 0x33, 0x32, 0x4d, 0x61, 0x78, 0x22, 0x25, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x10, + 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x25, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x0a, 0x0b, 0x52, 0x65, 0x61, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x22, 0x24, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x37, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, + 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x3c, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, + 0x15, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd9, 0x02, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x18, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, + 0x18, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x16, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x3f, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x1d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x42, 0x11, 0x5a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_datastore_proto_rawDescOnce sync.Once + file_proto_datastore_proto_rawDescData = file_proto_datastore_proto_rawDesc +) + +func file_proto_datastore_proto_rawDescGZIP() []byte { + file_proto_datastore_proto_rawDescOnce.Do(func() { + file_proto_datastore_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_datastore_proto_rawDescData) + }) + return file_proto_datastore_proto_rawDescData +} + +var file_proto_datastore_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_proto_datastore_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_proto_datastore_proto_goTypes = []interface{}{ + (Order_OrderType)(0), // 0: datastore.Order.OrderType + (*Query)(nil), // 1: datastore.Query + (*Order)(nil), // 2: datastore.Order + (*Index)(nil), // 3: datastore.Index + (*CreateRequest)(nil), // 4: datastore.CreateRequest + (*CreateResponse)(nil), // 5: datastore.CreateResponse + (*UpdateRequest)(nil), // 6: datastore.UpdateRequest + (*UpdateResponse)(nil), // 7: datastore.UpdateResponse + (*ReadRequest)(nil), // 8: datastore.ReadRequest + (*ReadResponse)(nil), // 9: datastore.ReadResponse + (*DeleteRequest)(nil), // 10: datastore.DeleteRequest + (*DeleteResponse)(nil), // 11: datastore.DeleteResponse + (*CreateIndexRequest)(nil), // 12: datastore.CreateIndexRequest + (*CreateIndexResponse)(nil), // 13: datastore.CreateIndexResponse +} +var file_proto_datastore_proto_depIdxs = []int32{ + 3, // 0: datastore.Query.index:type_name -> datastore.Index + 2, // 1: datastore.Query.order:type_name -> datastore.Order + 0, // 2: datastore.Order.orderType:type_name -> datastore.Order.OrderType + 2, // 3: datastore.Index.order:type_name -> datastore.Order + 1, // 4: datastore.ReadRequest.query:type_name -> datastore.Query + 1, // 5: datastore.DeleteRequest.query:type_name -> datastore.Query + 3, // 6: datastore.CreateIndexRequest.index:type_name -> datastore.Index + 4, // 7: datastore.Datastore.Create:input_type -> datastore.CreateRequest + 6, // 8: datastore.Datastore.Update:input_type -> datastore.UpdateRequest + 8, // 9: datastore.Datastore.Read:input_type -> datastore.ReadRequest + 10, // 10: datastore.Datastore.Delete:input_type -> datastore.DeleteRequest + 12, // 11: datastore.Datastore.CreateIndex:input_type -> datastore.CreateIndexRequest + 5, // 12: datastore.Datastore.Create:output_type -> datastore.CreateResponse + 7, // 13: datastore.Datastore.Update:output_type -> datastore.UpdateResponse + 9, // 14: datastore.Datastore.Read:output_type -> datastore.ReadResponse + 11, // 15: datastore.Datastore.Delete:output_type -> datastore.DeleteResponse + 13, // 16: datastore.Datastore.CreateIndex:output_type -> datastore.CreateIndexResponse + 12, // [12:17] is the sub-list for method output_type + 7, // [7:12] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_proto_datastore_proto_init() } +func file_proto_datastore_proto_init() { + if File_proto_datastore_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_datastore_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Query); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_datastore_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Order); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_datastore_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Index); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_datastore_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_datastore_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_datastore_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_datastore_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_datastore_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_datastore_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_datastore_proto_msgTypes[9].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_datastore_proto_msgTypes[10].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 + } + } + file_proto_datastore_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateIndexRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_datastore_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateIndexResponse); 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_datastore_proto_rawDesc, + NumEnums: 1, + NumMessages: 13, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_datastore_proto_goTypes, + DependencyIndexes: file_proto_datastore_proto_depIdxs, + EnumInfos: file_proto_datastore_proto_enumTypes, + MessageInfos: file_proto_datastore_proto_msgTypes, + }.Build() + File_proto_datastore_proto = out.File + file_proto_datastore_proto_rawDesc = nil + file_proto_datastore_proto_goTypes = nil + file_proto_datastore_proto_depIdxs = nil +} diff --git a/datastore/proto/datastore.pb.micro.go b/datastore/proto/datastore.pb.micro.go new file mode 100644 index 0000000..9f94d48 --- /dev/null +++ b/datastore/proto/datastore.pb.micro.go @@ -0,0 +1,161 @@ +// Code generated by protoc-gen-micro. DO NOT EDIT. +// source: proto/datastore.proto + +package datastore + +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 Datastore service + +func NewDatastoreEndpoints() []*api.Endpoint { + return []*api.Endpoint{} +} + +// Client API for Datastore service + +type DatastoreService interface { + Create(ctx context.Context, in *CreateRequest, opts ...client.CallOption) (*CreateResponse, error) + Update(ctx context.Context, in *UpdateRequest, opts ...client.CallOption) (*UpdateResponse, error) + Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error) + Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error) + CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...client.CallOption) (*CreateIndexResponse, error) +} + +type datastoreService struct { + c client.Client + name string +} + +func NewDatastoreService(name string, c client.Client) DatastoreService { + return &datastoreService{ + c: c, + name: name, + } +} + +func (c *datastoreService) Create(ctx context.Context, in *CreateRequest, opts ...client.CallOption) (*CreateResponse, error) { + req := c.c.NewRequest(c.name, "Datastore.Create", in) + out := new(CreateResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastoreService) Update(ctx context.Context, in *UpdateRequest, opts ...client.CallOption) (*UpdateResponse, error) { + req := c.c.NewRequest(c.name, "Datastore.Update", in) + out := new(UpdateResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastoreService) Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error) { + req := c.c.NewRequest(c.name, "Datastore.Read", in) + out := new(ReadResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastoreService) Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error) { + req := c.c.NewRequest(c.name, "Datastore.Delete", in) + out := new(DeleteResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastoreService) CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...client.CallOption) (*CreateIndexResponse, error) { + req := c.c.NewRequest(c.name, "Datastore.CreateIndex", in) + out := new(CreateIndexResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for Datastore service + +type DatastoreHandler interface { + Create(context.Context, *CreateRequest, *CreateResponse) error + Update(context.Context, *UpdateRequest, *UpdateResponse) error + Read(context.Context, *ReadRequest, *ReadResponse) error + Delete(context.Context, *DeleteRequest, *DeleteResponse) error + CreateIndex(context.Context, *CreateIndexRequest, *CreateIndexResponse) error +} + +func RegisterDatastoreHandler(s server.Server, hdlr DatastoreHandler, opts ...server.HandlerOption) error { + type datastore interface { + Create(ctx context.Context, in *CreateRequest, out *CreateResponse) error + Update(ctx context.Context, in *UpdateRequest, out *UpdateResponse) error + Read(ctx context.Context, in *ReadRequest, out *ReadResponse) error + Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error + CreateIndex(ctx context.Context, in *CreateIndexRequest, out *CreateIndexResponse) error + } + type Datastore struct { + datastore + } + h := &datastoreHandler{hdlr} + return s.Handle(s.NewHandler(&Datastore{h}, opts...)) +} + +type datastoreHandler struct { + DatastoreHandler +} + +func (h *datastoreHandler) Create(ctx context.Context, in *CreateRequest, out *CreateResponse) error { + return h.DatastoreHandler.Create(ctx, in, out) +} + +func (h *datastoreHandler) Update(ctx context.Context, in *UpdateRequest, out *UpdateResponse) error { + return h.DatastoreHandler.Update(ctx, in, out) +} + +func (h *datastoreHandler) Read(ctx context.Context, in *ReadRequest, out *ReadResponse) error { + return h.DatastoreHandler.Read(ctx, in, out) +} + +func (h *datastoreHandler) Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error { + return h.DatastoreHandler.Delete(ctx, in, out) +} + +func (h *datastoreHandler) CreateIndex(ctx context.Context, in *CreateIndexRequest, out *CreateIndexResponse) error { + return h.DatastoreHandler.CreateIndex(ctx, in, out) +} diff --git a/datastore/proto/datastore.proto b/datastore/proto/datastore.proto new file mode 100644 index 0000000..3a86eaa --- /dev/null +++ b/datastore/proto/datastore.proto @@ -0,0 +1,113 @@ +syntax = "proto3"; + +package datastore; + +option go_package = "proto;datastore"; + +// These endpoints are experimental and will likely change, +// especially related to indexes. +service Datastore { + rpc Create(CreateRequest) returns (CreateResponse) {} + rpc Update(UpdateRequest) returns (UpdateResponse) {} + rpc Read(ReadRequest) returns (ReadResponse) {} + rpc Delete(DeleteRequest) returns (DeleteResponse) {} + rpc CreateIndex(CreateIndexRequest) returns (CreateIndexResponse) {} +} + +message Query { + Index index = 1; + Order order = 2; + string value = 3; + int64 offset = 4; + int64 limit = 5; +} + +// Order is the order of the index +message Order { + // Field to order on + // eg. age + string fieldName = 1; + // Ordered or unordered keys. Ordered keys are padded. + // Default is true. This option only exists for strings, where ordering + // comes at the cost of having rather long padded keys. + enum OrderType { + option allow_alias = true; + UNORDERED = 0; + ASCENDING = 1; + DESCENDING = 2; + } + // Type of the ordering + // eg. ascending, descending, unordered + OrderType orderType = 2; +} + +message Index { + // Field to index on. + // eg. email + string fieldName = 1; + // Type of index + // eg. eq + string type = 2; + Order order = 3; + + // Do not allow duplicate values of this field in the index. + // Useful for emails, usernames, post slugs etc. + bool unique = 4; + + // Strings for ordering will be padded to a fix length + // Not a useful property for Querying, please ignore this at query time. + // Number is in bytes, not string characters. Choose a sufficiently big one. + // Consider that each character might take 4 bytes given the + // internals of reverse ordering. So a good rule of thumbs is expected + // characters in a string X 4 + int64 stringOrderPadLength = 5; + // True = base32 encode ordered strings for easier management + // or false = keep 4 bytes long runes that might dispaly weirdly + bool Base32Encode = 6; + + string FloatFormat = 7; + float Float64Max = 8; + float Float32Max = 9; +} + + +message CreateRequest { + // JSON marshalled record to save + string value = 1; +} + +message CreateResponse { +} + +message UpdateRequest { + // JSON marshalled record to save + string value = 1; +} + +message UpdateResponse { + +} + +message ReadRequest { + Query query = 1; +} + +message ReadResponse { + // JSON marshalled record found + string value = 1; +} + +message DeleteRequest { + Query query = 1; +} + +message DeleteResponse { +} + +message CreateIndexRequest { + Index index = 1; +} + +message CreateIndexResponse { + +} \ No newline at end of file diff --git a/feeds/proto/feeds.pb.go b/feeds/proto/feeds.pb.go index 257ad2e..0ddb369 100644 --- a/feeds/proto/feeds.pb.go +++ b/feeds/proto/feeds.pb.go @@ -1,26 +1,35 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.6.1 // source: proto/feeds.proto package feeds import ( - fmt "fmt" proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +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 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 +// 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"` @@ -28,146 +37,162 @@ type Feed struct { // 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Category string `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"` } -func (m *Feed) Reset() { *m = Feed{} } -func (m *Feed) String() string { return proto.CompactTextString(m) } -func (*Feed) ProtoMessage() {} +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 fileDescriptor_dd517c38176c13bf, []int{0} + return file_proto_feeds_proto_rawDescGZIP(), []int{0} } -func (m *Feed) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Feed.Unmarshal(m, b) -} -func (m *Feed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Feed.Marshal(b, m, deterministic) -} -func (m *Feed) XXX_Merge(src proto.Message) { - xxx_messageInfo_Feed.Merge(m, src) -} -func (m *Feed) XXX_Size() int { - return xxx_messageInfo_Feed.Size(m) -} -func (m *Feed) XXX_DiscardUnknown() { - xxx_messageInfo_Feed.DiscardUnknown(m) -} - -var xxx_messageInfo_Feed proto.InternalMessageInfo - -func (m *Feed) GetName() string { - if m != nil { - return m.Name +func (x *Feed) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *Feed) GetUrl() string { - if m != nil { - return m.Url +func (x *Feed) GetUrl() string { + if x != nil { + return x.Url } return "" } -func (m *Feed) GetCategory() string { - if m != nil { - return m.Category +func (x *Feed) GetCategory() string { + if x != nil { + return x.Category } return "" } type Entry struct { - 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + 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 (m *Entry) Reset() { *m = Entry{} } -func (m *Entry) String() string { return proto.CompactTextString(m) } -func (*Entry) ProtoMessage() {} +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 fileDescriptor_dd517c38176c13bf, []int{1} + return file_proto_feeds_proto_rawDescGZIP(), []int{1} } -func (m *Entry) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Entry.Unmarshal(m, b) -} -func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Entry.Marshal(b, m, deterministic) -} -func (m *Entry) XXX_Merge(src proto.Message) { - xxx_messageInfo_Entry.Merge(m, src) -} -func (m *Entry) XXX_Size() int { - return xxx_messageInfo_Entry.Size(m) -} -func (m *Entry) XXX_DiscardUnknown() { - xxx_messageInfo_Entry.DiscardUnknown(m) -} - -var xxx_messageInfo_Entry proto.InternalMessageInfo - -func (m *Entry) GetId() string { - if m != nil { - return m.Id +func (x *Entry) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *Entry) GetDomain() string { - if m != nil { - return m.Domain +func (x *Entry) GetDomain() string { + if x != nil { + return x.Domain } return "" } -func (m *Entry) GetUrl() string { - if m != nil { - return m.Url +func (x *Entry) GetUrl() string { + if x != nil { + return x.Url } return "" } -func (m *Entry) GetTitle() string { - if m != nil { - return m.Title +func (x *Entry) GetTitle() string { + if x != nil { + return x.Title } return "" } -func (m *Entry) GetContent() string { - if m != nil { - return m.Content +func (x *Entry) GetContent() string { + if x != nil { + return x.Content } return "" } -func (m *Entry) GetDate() int64 { - if m != nil { - return m.Date +func (x *Entry) GetDate() int64 { + if x != nil { + return x.Date } return 0 } -func (m *Entry) GetCategory() string { - if m != nil { - return m.Category +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"` @@ -175,350 +200,611 @@ type AddRequest struct { // 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Category string `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"` } -func (m *AddRequest) Reset() { *m = AddRequest{} } -func (m *AddRequest) String() string { return proto.CompactTextString(m) } -func (*AddRequest) ProtoMessage() {} +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 fileDescriptor_dd517c38176c13bf, []int{2} + return file_proto_feeds_proto_rawDescGZIP(), []int{2} } -func (m *AddRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddRequest.Unmarshal(m, b) -} -func (m *AddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddRequest.Marshal(b, m, deterministic) -} -func (m *AddRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddRequest.Merge(m, src) -} -func (m *AddRequest) XXX_Size() int { - return xxx_messageInfo_AddRequest.Size(m) -} -func (m *AddRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AddRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AddRequest proto.InternalMessageInfo - -func (m *AddRequest) GetName() string { - if m != nil { - return m.Name +func (x *AddRequest) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *AddRequest) GetUrl() string { - if m != nil { - return m.Url +func (x *AddRequest) GetUrl() string { + if x != nil { + return x.Url } return "" } -func (m *AddRequest) GetCategory() string { - if m != nil { - return m.Category +func (x *AddRequest) GetCategory() string { + if x != nil { + return x.Category } return "" } type AddResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *AddResponse) Reset() { *m = AddResponse{} } -func (m *AddResponse) String() string { return proto.CompactTextString(m) } -func (*AddResponse) ProtoMessage() {} +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 fileDescriptor_dd517c38176c13bf, []int{3} + return file_proto_feeds_proto_rawDescGZIP(), []int{3} } -func (m *AddResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddResponse.Unmarshal(m, b) -} -func (m *AddResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddResponse.Marshal(b, m, deterministic) -} -func (m *AddResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddResponse.Merge(m, src) -} -func (m *AddResponse) XXX_Size() int { - return xxx_messageInfo_AddResponse.Size(m) -} -func (m *AddResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AddResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AddResponse proto.InternalMessageInfo - 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` } -func (m *EntriesRequest) Reset() { *m = EntriesRequest{} } -func (m *EntriesRequest) String() string { return proto.CompactTextString(m) } -func (*EntriesRequest) ProtoMessage() {} +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 fileDescriptor_dd517c38176c13bf, []int{4} + return file_proto_feeds_proto_rawDescGZIP(), []int{4} } -func (m *EntriesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EntriesRequest.Unmarshal(m, b) -} -func (m *EntriesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EntriesRequest.Marshal(b, m, deterministic) -} -func (m *EntriesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_EntriesRequest.Merge(m, src) -} -func (m *EntriesRequest) XXX_Size() int { - return xxx_messageInfo_EntriesRequest.Size(m) -} -func (m *EntriesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_EntriesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_EntriesRequest proto.InternalMessageInfo - -func (m *EntriesRequest) GetUrl() string { - if m != nil { - return m.Url +func (x *EntriesRequest) GetUrl() string { + if x != nil { + return x.Url } return "" } type EntriesResponse struct { - Entries []*Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entries []*Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` } -func (m *EntriesResponse) Reset() { *m = EntriesResponse{} } -func (m *EntriesResponse) String() string { return proto.CompactTextString(m) } -func (*EntriesResponse) ProtoMessage() {} +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 fileDescriptor_dd517c38176c13bf, []int{5} + return file_proto_feeds_proto_rawDescGZIP(), []int{5} } -func (m *EntriesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EntriesResponse.Unmarshal(m, b) -} -func (m *EntriesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EntriesResponse.Marshal(b, m, deterministic) -} -func (m *EntriesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_EntriesResponse.Merge(m, src) -} -func (m *EntriesResponse) XXX_Size() int { - return xxx_messageInfo_EntriesResponse.Size(m) -} -func (m *EntriesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_EntriesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_EntriesResponse proto.InternalMessageInfo - -func (m *EntriesResponse) GetEntries() []*Entry { - if m != nil { - return m.Entries +func (x *EntriesResponse) GetEntries() []*Entry { + if x != nil { + return x.Entries } return nil } type ListRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *ListRequest) Reset() { *m = ListRequest{} } -func (m *ListRequest) String() string { return proto.CompactTextString(m) } -func (*ListRequest) ProtoMessage() {} +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 fileDescriptor_dd517c38176c13bf, []int{6} + return file_proto_feeds_proto_rawDescGZIP(), []int{6} } -func (m *ListRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListRequest.Unmarshal(m, b) -} -func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListRequest.Marshal(b, m, deterministic) -} -func (m *ListRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListRequest.Merge(m, src) -} -func (m *ListRequest) XXX_Size() int { - return xxx_messageInfo_ListRequest.Size(m) -} -func (m *ListRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListRequest proto.InternalMessageInfo - type ListResponse struct { - Feeds []*Feed `protobuf:"bytes,1,rep,name=feeds,proto3" json:"feeds,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Feeds []*Feed `protobuf:"bytes,1,rep,name=feeds,proto3" json:"feeds,omitempty"` } -func (m *ListResponse) Reset() { *m = ListResponse{} } -func (m *ListResponse) String() string { return proto.CompactTextString(m) } -func (*ListResponse) ProtoMessage() {} +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 fileDescriptor_dd517c38176c13bf, []int{7} + return file_proto_feeds_proto_rawDescGZIP(), []int{7} } -func (m *ListResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListResponse.Unmarshal(m, b) -} -func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListResponse.Marshal(b, m, deterministic) -} -func (m *ListResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListResponse.Merge(m, src) -} -func (m *ListResponse) XXX_Size() int { - return xxx_messageInfo_ListResponse.Size(m) -} -func (m *ListResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListResponse proto.InternalMessageInfo - -func (m *ListResponse) GetFeeds() []*Feed { - if m != nil { - return m.Feeds +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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *RemoveRequest) Reset() { *m = RemoveRequest{} } -func (m *RemoveRequest) String() string { return proto.CompactTextString(m) } -func (*RemoveRequest) ProtoMessage() {} +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 fileDescriptor_dd517c38176c13bf, []int{8} + return file_proto_feeds_proto_rawDescGZIP(), []int{8} } -func (m *RemoveRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RemoveRequest.Unmarshal(m, b) -} -func (m *RemoveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RemoveRequest.Marshal(b, m, deterministic) -} -func (m *RemoveRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveRequest.Merge(m, src) -} -func (m *RemoveRequest) XXX_Size() int { - return xxx_messageInfo_RemoveRequest.Size(m) -} -func (m *RemoveRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RemoveRequest proto.InternalMessageInfo - -func (m *RemoveRequest) GetName() string { - if m != nil { - return m.Name +func (x *RemoveRequest) GetName() string { + if x != nil { + return x.Name } return "" } type RemoveResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *RemoveResponse) Reset() { *m = RemoveResponse{} } -func (m *RemoveResponse) String() string { return proto.CompactTextString(m) } -func (*RemoveResponse) ProtoMessage() {} +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 fileDescriptor_dd517c38176c13bf, []int{9} + return file_proto_feeds_proto_rawDescGZIP(), []int{9} } -func (m *RemoveResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RemoveResponse.Unmarshal(m, b) -} -func (m *RemoveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RemoveResponse.Marshal(b, m, deterministic) -} -func (m *RemoveResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoveResponse.Merge(m, src) -} -func (m *RemoveResponse) XXX_Size() int { - return xxx_messageInfo_RemoveResponse.Size(m) -} -func (m *RemoveResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RemoveResponse.DiscardUnknown(m) +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 xxx_messageInfo_RemoveResponse proto.InternalMessageInfo +var ( + file_proto_feeds_proto_rawDescOnce sync.Once + file_proto_feeds_proto_rawDescData = file_proto_feeds_proto_rawDesc +) -func init() { - proto.RegisterType((*Feed)(nil), "feeds.Feed") - proto.RegisterType((*Entry)(nil), "feeds.Entry") - proto.RegisterType((*AddRequest)(nil), "feeds.AddRequest") - proto.RegisterType((*AddResponse)(nil), "feeds.AddResponse") - proto.RegisterType((*EntriesRequest)(nil), "feeds.EntriesRequest") - proto.RegisterType((*EntriesResponse)(nil), "feeds.EntriesResponse") - proto.RegisterType((*ListRequest)(nil), "feeds.ListRequest") - proto.RegisterType((*ListResponse)(nil), "feeds.ListResponse") - proto.RegisterType((*RemoveRequest)(nil), "feeds.RemoveRequest") - proto.RegisterType((*RemoveResponse)(nil), "feeds.RemoveResponse") +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 } -func init() { proto.RegisterFile("proto/feeds.proto", fileDescriptor_dd517c38176c13bf) } - -var fileDescriptor_dd517c38176c13bf = []byte{ - // 384 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xbb, 0x4e, 0xf3, 0x40, - 0x10, 0x85, 0x7f, 0xc7, 0xb7, 0x9f, 0x71, 0x12, 0x92, 0x21, 0x89, 0x56, 0xae, 0x82, 0x91, 0x50, - 0xaa, 0xa0, 0x84, 0x02, 0x01, 0x55, 0x90, 0x40, 0x14, 0x88, 0xc2, 0x25, 0x9d, 0xc9, 0x0e, 0xc8, - 0x52, 0x62, 0x07, 0x7b, 0x83, 0x94, 0xc7, 0xe1, 0xc9, 0x78, 0x15, 0xe4, 0xbd, 0x38, 0x97, 0x82, - 0x8a, 0x6e, 0xce, 0xd9, 0x9d, 0x6f, 0xc7, 0x67, 0x64, 0xe8, 0xae, 0x8a, 0x5c, 0xe4, 0x17, 0x6f, - 0x44, 0xbc, 0x1c, 0xcb, 0x1a, 0x5d, 0x29, 0xa2, 0x47, 0x70, 0x1e, 0x88, 0x38, 0x22, 0x38, 0x59, - 0xb2, 0x24, 0x66, 0x0d, 0xad, 0xd1, 0x51, 0x2c, 0x6b, 0xec, 0x80, 0xbd, 0x2e, 0x16, 0xac, 0x21, - 0xad, 0xaa, 0xc4, 0x10, 0xfe, 0xcf, 0x13, 0x41, 0xef, 0x79, 0xb1, 0x61, 0xb6, 0xb4, 0x6b, 0x1d, - 0x7d, 0x59, 0xe0, 0xde, 0x67, 0xa2, 0xd8, 0x60, 0x1b, 0x1a, 0x29, 0xd7, 0xa4, 0x46, 0xca, 0x71, - 0x00, 0x1e, 0xcf, 0x97, 0x49, 0x9a, 0x69, 0x94, 0x56, 0x86, 0x6f, 0x6f, 0xf9, 0x3d, 0x70, 0x45, - 0x2a, 0x16, 0xc4, 0x1c, 0xe9, 0x29, 0x81, 0x0c, 0xfc, 0x79, 0x9e, 0x09, 0xca, 0x04, 0x73, 0xa5, - 0x6f, 0x64, 0x35, 0x35, 0x4f, 0x04, 0x31, 0x6f, 0x68, 0x8d, 0xec, 0x58, 0xd6, 0x7b, 0x33, 0xfa, - 0x07, 0x33, 0x3e, 0x03, 0xcc, 0x38, 0x8f, 0xe9, 0x63, 0x4d, 0xa5, 0xf8, 0x83, 0x6f, 0x6e, 0x41, - 0x20, 0x79, 0xe5, 0x2a, 0xcf, 0x4a, 0x8a, 0x22, 0x68, 0x57, 0x09, 0xa4, 0x54, 0x9a, 0x27, 0x34, - 0xce, 0xaa, 0x71, 0xd1, 0x35, 0x1c, 0xd7, 0x77, 0x54, 0x1b, 0x9e, 0x83, 0x4f, 0xca, 0x62, 0xd6, - 0xd0, 0x1e, 0x05, 0xd3, 0xe6, 0x58, 0x6d, 0x4a, 0xc6, 0x19, 0x9b, 0xc3, 0xea, 0xb5, 0xa7, 0xb4, - 0x14, 0x9a, 0x1d, 0x4d, 0xa0, 0xa9, 0xa4, 0xc6, 0x9c, 0x82, 0xda, 0xa9, 0x86, 0x04, 0x1a, 0x52, - 0xad, 0x37, 0xd6, 0xdb, 0x3e, 0x83, 0x56, 0x4c, 0xcb, 0xfc, 0x93, 0x7e, 0x89, 0x20, 0xea, 0x40, - 0xdb, 0x5c, 0x52, 0xe4, 0xe9, 0xb7, 0x05, 0x6e, 0x85, 0x29, 0x71, 0x0c, 0xf6, 0x8c, 0x73, 0xec, - 0x6a, 0xf6, 0x36, 0xcc, 0x10, 0x77, 0x2d, 0x9d, 0xc7, 0x3f, 0xbc, 0x02, 0x4f, 0xb1, 0xb0, 0xa7, - 0xcf, 0xf7, 0xde, 0x0f, 0xfb, 0x07, 0x6e, 0xdd, 0x78, 0x03, 0xbe, 0x8e, 0x09, 0xfb, 0x3b, 0x69, - 0x6c, 0xa3, 0x0d, 0x07, 0x87, 0x76, 0xdd, 0x3b, 0x01, 0xa7, 0x0a, 0x06, 0xcd, 0x48, 0x3b, 0xa1, - 0x85, 0x27, 0x7b, 0x9e, 0x69, 0xb9, 0x6b, 0xbd, 0x04, 0xf2, 0xb7, 0xb8, 0x95, 0xa7, 0xaf, 0x9e, - 0x14, 0x97, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x42, 0x5d, 0x93, 0x38, 0x03, 0x00, 0x00, +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/go.mod b/go.mod index 273569b..8a72937 100644 --- a/go.mod +++ b/go.mod @@ -3,14 +3,16 @@ module github.com/micro/services go 1.14 require ( + github.com/Masterminds/semver/v3 v3.1.1 github.com/SlyMarbo/rss v1.0.1 + github.com/davecgh/go-spew v1.1.1 github.com/getkin/kin-openapi v0.26.0 github.com/golang/protobuf v1.4.3 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/micro/dev v0.0.0-20201117163752-d3cfc9788dfa - github.com/micro/micro/v3 v3.0.5-0.20210127154217-fef839257cb5 + github.com/micro/micro/v3 v3.0.5-0.20210128123520-45956342a06b github.com/miekg/dns v1.1.31 // indirect github.com/stoewer/go-strcase v1.2.0 github.com/stretchr/testify v1.6.1 diff --git a/go.sum b/go.sum index 2a7aaf0..c8e93ce 100644 --- a/go.sum +++ b/go.sum @@ -47,6 +47,9 @@ github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6L 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 v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= @@ -82,18 +85,19 @@ github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnweb github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= 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/bwmarrin/discordgo v0.19.0/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= -github.com/bwmarrin/discordgo v0.20.1/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q= +github.com/caddyserver/certmagic v0.10.6 h1:sCya6FmfaN74oZE46kqfaFOVoROD/mF36rTQfjN7TZc= github.com/caddyserver/certmagic v0.10.6/go.mod h1:Y8jcUBctgk/IhpAzlHKfimZNyXCkfGgRTC0orl8gROQ= -github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= +github.com/cenkalti/backoff/v4 v4.0.0 h1:6VeaLF9aI+MAUQ95106HwWzYZgJJpZ4stumjj6RFYAU= 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/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cloudflare/cloudflare-go v0.10.2/go.mod h1:qhVI5MKwBGhdNU89ZRz2plgYutcJ5PCekLxXn56w6SY= +github.com/cloudflare/cloudflare-go v0.10.9 h1:d8KOgLpYiC+Xq3T4tuO+/goM+RZvuO+T4pojuv8giL8= github.com/cloudflare/cloudflare-go v0.10.9/go.mod h1:5TrsWH+3f4NV6WjtS5QFp+DifH81rph40gU374Sh0dQ= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= @@ -130,11 +134,7 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm 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/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v1.4.2-0.20190710153559-aa8249ae1b8b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v1.4.2-0.20191101170500-ac7306503d23/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= 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= @@ -142,6 +142,7 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch/v5 v5.0.0 h1:dKTrUeykyQwKb/kx7Z+4ukDs6l+4L41HqG1XHnhX7WE= 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= @@ -156,8 +157,7 @@ github.com/getkin/kin-openapi v0.26.0 h1:xKIW5Z5wAfutxGBH+rr9qu0Ywfb/E1bPWkYLKRY github.com/getkin/kin-openapi v0.26.0/go.mod h1:WGRs2ZMM1Q8LR1QBEwUxC6RJEfaBcD0s+pcEVXFuAjw= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-acme/lego/v3 v3.1.0/go.mod h1:074uqt+JS6plx+c9Xaiz6+L+GBb+7itGtzfcDM2AhEE= +github.com/go-acme/lego/v3 v3.4.0 h1:deB9NkelA+TfjGHVw8J7iKl/rMtffcGMWSMmptvMv0A= 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= @@ -173,9 +173,11 @@ github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3yg github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible/go.mod h1:qf9acutJ8cwBUhm1bqgz6Bei9/C/c93FPDljKWwsOgM= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og= github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.3 h1:ZOigqf7iBxkA4jdQ3am7ATzdlOFp9YzA6NmuvEEZc9g= github.com/gobwas/ws v1.0.3/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE= @@ -248,8 +250,10 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m 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 h1:0QniY0USkHQ1RGCLfKxeNHK9bkDHGRYGNDFBCS+YARg= 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 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -264,10 +268,10 @@ github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= github.com/hailocab/go-geoindex v0.0.0-20160127134810-64631bfe9711 h1:Oi8hPOZX0gaM2sPVXse2bMpfOjP47a7O61YuB6Z4sGk= github.com/hailocab/go-geoindex v0.0.0-20160127134810-64631bfe9711/go.mod h1:+v2qJ3UZe4q2GfgZO4od004F/cMgJbmPSs7dD/ZMUkY= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= 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-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= +github.com/hashicorp/go-retryablehttp v0.6.4 h1:BbgctKO892xEyOXnGiaAwIoSq1QZ/SS4AhjoAh9DnfY= 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= @@ -362,6 +366,7 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s= 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= @@ -404,6 +409,7 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky 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 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= 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= @@ -417,18 +423,18 @@ github.com/micro/micro/v3 v3.0.0-beta.6.0.20201016094841-ca8ffd563b2b/go.mod h1: github.com/micro/micro/v3 v3.0.4 h1:GupR5YoV0A7hn6C9taD49voZyTyVQT/ihqtGDg867c0= github.com/micro/micro/v3 v3.0.5-0.20201219085254-c8ea24387d19 h1:EtYX0x8UgndRyr1NbxOhbYDublbLYolGxftMv5QlAoY= github.com/micro/micro/v3 v3.0.5-0.20201219085254-c8ea24387d19/go.mod h1:dZa1KcK6Uh9ny7nhgHxOvoPiZR5cAnZefYT+EMmGwp4= -github.com/micro/micro/v3 v3.0.5-0.20210127104758-0b759ad942a4 h1:RsLuIC27lqUiloWPitvRbJjkBuVNAkUsNSj6vJiacJI= -github.com/micro/micro/v3 v3.0.5-0.20210127104758-0b759ad942a4/go.mod h1:+WoC+lHuRy8FIgJlNuLkhpmsFbylYb0vYcEgMpKT4Z4= -github.com/micro/micro/v3 v3.0.5-0.20210127114057-8b4be865b86a h1:2dOu2GU5PPy8BLpbkgXv9Fz31AHJPMRGpXsGEd29ZMw= -github.com/micro/micro/v3 v3.0.5-0.20210127114057-8b4be865b86a/go.mod h1:+WoC+lHuRy8FIgJlNuLkhpmsFbylYb0vYcEgMpKT4Z4= -github.com/micro/micro/v3 v3.0.5-0.20210127125609-3c95b22d9553 h1:Ucgp8KlMJeaGzOZOfDnZCxBd0xkoBf6v1Vtv7LByJP0= -github.com/micro/micro/v3 v3.0.5-0.20210127125609-3c95b22d9553/go.mod h1:+WoC+lHuRy8FIgJlNuLkhpmsFbylYb0vYcEgMpKT4Z4= +github.com/micro/micro/v3 v3.0.5-0.20210125165249-844800facc76 h1:6AWM3vET7Gesy0l4Ob0dD3uXzIw1nk37d64wHGZj0fA= +github.com/micro/micro/v3 v3.0.5-0.20210125165249-844800facc76/go.mod h1:gTRCjPnKF3ExZTVFMbTzo1+x3LmvHWPQUYsnKIK+ot4= +github.com/micro/micro/v3 v3.0.5-0.20210126155917-64e1f3cde41d h1:R6Q7I9SaX+z9FTRAq2WRmNnkpt47rJUf5D8Hdl6QYl8= +github.com/micro/micro/v3 v3.0.5-0.20210126155917-64e1f3cde41d/go.mod h1:+WoC+lHuRy8FIgJlNuLkhpmsFbylYb0vYcEgMpKT4Z4= github.com/micro/micro/v3 v3.0.5-0.20210127143903-789ea1c27f67 h1:cw9gVgwpc0p2/MqRGDFO22JOpr01d4QJ8JL5ZeXk3T4= github.com/micro/micro/v3 v3.0.5-0.20210127143903-789ea1c27f67/go.mod h1:+WoC+lHuRy8FIgJlNuLkhpmsFbylYb0vYcEgMpKT4Z4= -github.com/micro/micro/v3 v3.0.5-0.20210127152852-66be29f3436d h1:PHeuOP+6EhbGgsF0L8k3hzEutNkgUjDgMNa1+/H8NNs= -github.com/micro/micro/v3 v3.0.5-0.20210127152852-66be29f3436d/go.mod h1:+WoC+lHuRy8FIgJlNuLkhpmsFbylYb0vYcEgMpKT4Z4= github.com/micro/micro/v3 v3.0.5-0.20210127154217-fef839257cb5 h1:H+GimIg9PEkWz9sIxMDDg6uVOx4PPyvMmp1Sz2RWJ9U= github.com/micro/micro/v3 v3.0.5-0.20210127154217-fef839257cb5/go.mod h1:+WoC+lHuRy8FIgJlNuLkhpmsFbylYb0vYcEgMpKT4Z4= +github.com/micro/micro/v3 v3.0.5-0.20210128091711-6008b182bc48 h1:SYPqZl9d1amQTJdiPCdJkmUcpzw+qSKwkPLokeNhPvs= +github.com/micro/micro/v3 v3.0.5-0.20210128091711-6008b182bc48/go.mod h1:+WoC+lHuRy8FIgJlNuLkhpmsFbylYb0vYcEgMpKT4Z4= +github.com/micro/micro/v3 v3.0.5-0.20210128123520-45956342a06b h1:NQvH8HfmA01/HTWYiCGN4kfAaPYEksaRoYUfCZNic8U= +github.com/micro/micro/v3 v3.0.5-0.20210128123520-45956342a06b/go.mod h1:+WoC+lHuRy8FIgJlNuLkhpmsFbylYb0vYcEgMpKT4Z4= github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= @@ -466,6 +472,7 @@ github.com/nrdcg/goinwx v0.6.1/go.mod h1:XPiut7enlbEdntAqalBIqcYcTEVhpv/dKWgDCX2 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 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8= 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= @@ -531,6 +538,7 @@ github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0 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 h1:ofR1ZdrNSkiWcMsRrubK9tb2/SlZVWttAfqUjJi6QYc= github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= @@ -563,7 +571,7 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= 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/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog= +github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf h1:Z2X3Os7oRzpdJ75iPqWZc0HeJWFYNCvKsfpQwFpRNTA= 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/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -579,13 +587,14 @@ github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX 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 h1:jJSgT0NxjCvrSZf7Gvn2NxxV9xAYkTjYrKW8XwWhrfY= github.com/xanzy/go-gitlab v0.35.1/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= 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 v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca h1:1CFlNzQhALwjS9mBAUkycX616GzgsuYUOCHA5+HSlXI= 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= @@ -943,6 +952,7 @@ gopkg.in/ns1/ns1-go.v2 v2.0.0-20190730140822-b51389932cbc/go.mod h1:VV+3haRsgDiV 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 h1:H0TmLt7/KmzlrDOpa1F+zr0Tk90PbJYBfsVUmRLrf9Y= gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= diff --git a/invites/Makefile b/invites/Makefile index 6ec921a..55a9a7c 100644 --- a/invites/Makefile +++ b/invites/Makefile @@ -8,7 +8,12 @@ init: .PHONY: proto proto: protoc --proto_path=. --micro_out=. --go_out=:. proto/invites.proto - + +.PHONY: docs +docs: + protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=:. proto/invites.proto + @redoc-cli bundle api-protobuf.json + .PHONY: build build: go build -o invites *.go diff --git a/invites/proto/invites.pb.go b/invites/proto/invites.pb.go index 96ea51e..f6a4fb0 100644 --- a/invites/proto/invites.pb.go +++ b/invites/proto/invites.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.23.0 -// protoc v3.13.0 +// protoc-gen-go v1.25.0 +// protoc v3.6.1 // source: proto/invites.proto package invites diff --git a/posts/proto/posts.pb.go b/posts/proto/posts.pb.go index e47444c..028d476 100644 --- a/posts/proto/posts.pb.go +++ b/posts/proto/posts.pb.go @@ -1,132 +1,145 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.6.1 // source: proto/posts.proto package posts import ( - fmt "fmt" proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +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 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 +// 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 { - 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + 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 (m *Post) Reset() { *m = Post{} } -func (m *Post) String() string { return proto.CompactTextString(m) } -func (*Post) ProtoMessage() {} +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 fileDescriptor_e93dc7d934d9dc10, []int{0} + return file_proto_posts_proto_rawDescGZIP(), []int{0} } -func (m *Post) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Post.Unmarshal(m, b) -} -func (m *Post) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Post.Marshal(b, m, deterministic) -} -func (m *Post) XXX_Merge(src proto.Message) { - xxx_messageInfo_Post.Merge(m, src) -} -func (m *Post) XXX_Size() int { - return xxx_messageInfo_Post.Size(m) -} -func (m *Post) XXX_DiscardUnknown() { - xxx_messageInfo_Post.DiscardUnknown(m) -} - -var xxx_messageInfo_Post proto.InternalMessageInfo - -func (m *Post) GetId() string { - if m != nil { - return m.Id +func (x *Post) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *Post) GetTitle() string { - if m != nil { - return m.Title +func (x *Post) GetTitle() string { + if x != nil { + return x.Title } return "" } -func (m *Post) GetSlug() string { - if m != nil { - return m.Slug +func (x *Post) GetSlug() string { + if x != nil { + return x.Slug } return "" } -func (m *Post) GetContent() string { - if m != nil { - return m.Content +func (x *Post) GetContent() string { + if x != nil { + return x.Content } return "" } -func (m *Post) GetCreated() int64 { - if m != nil { - return m.Created +func (x *Post) GetCreated() int64 { + if x != nil { + return x.Created } return 0 } -func (m *Post) GetUpdated() int64 { - if m != nil { - return m.Updated +func (x *Post) GetUpdated() int64 { + if x != nil { + return x.Updated } return 0 } -func (m *Post) GetAuthor() string { - if m != nil { - return m.Author +func (x *Post) GetAuthor() string { + if x != nil { + return x.Author } return "" } -func (m *Post) GetTags() []string { - if m != nil { - return m.Tags +func (x *Post) GetTags() []string { + if x != nil { + return x.Tags } return nil } -func (m *Post) GetMetadata() map[string]string { - if m != nil { - return m.Metadata +func (x *Post) GetMetadata() map[string]string { + if x != nil { + return x.Metadata } return nil } -func (m *Post) GetImage() string { - if m != nil { - return m.Image +func (x *Post) GetImage() string { + if x != nil { + return x.Image } return "" } @@ -220,6 +233,26 @@ func (m *IndexResponse) GetPosts() []*Post { // 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 { +<<<<<<< HEAD + 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[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +======= 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"` @@ -235,101 +268,127 @@ func (m *QueryRequest) String() string { return proto.CompactTextString(m) } func (*QueryRequest) ProtoMessage() {} func (*QueryRequest) Descriptor() ([]byte, []int) { return fileDescriptor_e93dc7d934d9dc10, []int{3} +>>>>>>> master } -func (m *QueryRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QueryRequest.Unmarshal(m, b) -} -func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QueryRequest.Marshal(b, m, deterministic) -} -func (m *QueryRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRequest.Merge(m, src) -} -func (m *QueryRequest) XXX_Size() int { - return xxx_messageInfo_QueryRequest.Size(m) -} -func (m *QueryRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRequest.DiscardUnknown(m) +func (x *QueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_QueryRequest proto.InternalMessageInfo +func (*QueryRequest) ProtoMessage() {} -func (m *QueryRequest) GetId() string { - if m != nil { - return m.Id +func (x *QueryRequest) 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 QueryRequest.ProtoReflect.Descriptor instead. +func (*QueryRequest) Descriptor() ([]byte, []int) { + return file_proto_posts_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryRequest) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *QueryRequest) GetSlug() string { - if m != nil { - return m.Slug +func (x *QueryRequest) GetSlug() string { + if x != nil { + return x.Slug } return "" } -func (m *QueryRequest) GetTag() string { - if m != nil { - return m.Tag +func (x *QueryRequest) GetTag() string { + if x != nil { + return x.Tag } return "" } -func (m *QueryRequest) GetOffset() int64 { - if m != nil { - return m.Offset +func (x *QueryRequest) GetOffset() int64 { + if x != nil { + return x.Offset } return 0 } -func (m *QueryRequest) GetLimit() int64 { - if m != nil { - return m.Limit +func (x *QueryRequest) GetLimit() int64 { + if x != nil { + return x.Limit } return 0 } type QueryResponse struct { - Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +<<<<<<< HEAD + Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` +======= func (m *QueryResponse) Reset() { *m = QueryResponse{} } func (m *QueryResponse) String() string { return proto.CompactTextString(m) } func (*QueryResponse) ProtoMessage() {} func (*QueryResponse) Descriptor() ([]byte, []int) { return fileDescriptor_e93dc7d934d9dc10, []int{4} +>>>>>>> master } -func (m *QueryResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QueryResponse.Unmarshal(m, b) -} -func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QueryResponse.Marshal(b, m, deterministic) -} -func (m *QueryResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryResponse.Merge(m, src) -} -func (m *QueryResponse) XXX_Size() int { - return xxx_messageInfo_QueryResponse.Size(m) -} -func (m *QueryResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryResponse.DiscardUnknown(m) +func (x *QueryResponse) Reset() { + *x = QueryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_posts_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -var xxx_messageInfo_QueryResponse proto.InternalMessageInfo +func (x *QueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *QueryResponse) GetPosts() []*Post { - if m != nil { - return m.Posts +func (*QueryResponse) ProtoMessage() {} + +func (x *QueryResponse) 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 QueryResponse.ProtoReflect.Descriptor instead. +func (*QueryResponse) Descriptor() ([]byte, []int) { + return file_proto_posts_proto_rawDescGZIP(), []int{2} +} + +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"` @@ -337,183 +396,480 @@ type SaveRequest struct { 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + 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"` } +<<<<<<< HEAD +func (x *SaveRequest) Reset() { + *x = SaveRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_posts_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +======= func (m *SaveRequest) Reset() { *m = SaveRequest{} } func (m *SaveRequest) String() string { return proto.CompactTextString(m) } func (*SaveRequest) ProtoMessage() {} func (*SaveRequest) Descriptor() ([]byte, []int) { return fileDescriptor_e93dc7d934d9dc10, []int{5} +>>>>>>> master } -func (m *SaveRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SaveRequest.Unmarshal(m, b) -} -func (m *SaveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SaveRequest.Marshal(b, m, deterministic) -} -func (m *SaveRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SaveRequest.Merge(m, src) -} -func (m *SaveRequest) XXX_Size() int { - return xxx_messageInfo_SaveRequest.Size(m) -} -func (m *SaveRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SaveRequest.DiscardUnknown(m) +func (x *SaveRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_SaveRequest proto.InternalMessageInfo +func (*SaveRequest) ProtoMessage() {} -func (m *SaveRequest) GetId() string { - if m != nil { - return m.Id +func (x *SaveRequest) 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 SaveRequest.ProtoReflect.Descriptor instead. +func (*SaveRequest) Descriptor() ([]byte, []int) { + return file_proto_posts_proto_rawDescGZIP(), []int{3} +} + +func (x *SaveRequest) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *SaveRequest) GetTitle() string { - if m != nil { - return m.Title +func (x *SaveRequest) GetTitle() string { + if x != nil { + return x.Title } return "" } -func (m *SaveRequest) GetSlug() string { - if m != nil { - return m.Slug +func (x *SaveRequest) GetSlug() string { + if x != nil { + return x.Slug } return "" } -func (m *SaveRequest) GetContent() string { - if m != nil { - return m.Content +func (x *SaveRequest) GetContent() string { + if x != nil { + return x.Content } return "" } -func (m *SaveRequest) GetTimestamp() int64 { - if m != nil { - return m.Timestamp +func (x *SaveRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp } return 0 } -func (m *SaveRequest) GetTags() []string { - if m != nil { - return m.Tags +func (x *SaveRequest) GetTags() []string { + if x != nil { + return x.Tags } return nil } -func (m *SaveRequest) GetMetadata() map[string]string { - if m != nil { - return m.Metadata +func (x *SaveRequest) GetMetadata() map[string]string { + if x != nil { + return x.Metadata } return nil } -func (m *SaveRequest) GetImage() string { - if m != nil { - return m.Image +func (x *SaveRequest) GetImage() string { + if x != nil { + return x.Image } return "" } type SaveResponse struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +<<<<<<< HEAD + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +======= func (m *SaveResponse) Reset() { *m = SaveResponse{} } func (m *SaveResponse) String() string { return proto.CompactTextString(m) } func (*SaveResponse) ProtoMessage() {} func (*SaveResponse) Descriptor() ([]byte, []int) { return fileDescriptor_e93dc7d934d9dc10, []int{6} +>>>>>>> master } -func (m *SaveResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SaveResponse.Unmarshal(m, b) -} -func (m *SaveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SaveResponse.Marshal(b, m, deterministic) -} -func (m *SaveResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SaveResponse.Merge(m, src) -} -func (m *SaveResponse) XXX_Size() int { - return xxx_messageInfo_SaveResponse.Size(m) -} -func (m *SaveResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SaveResponse.DiscardUnknown(m) +func (x *SaveResponse) Reset() { + *x = SaveResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_posts_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -var xxx_messageInfo_SaveResponse proto.InternalMessageInfo +func (x *SaveResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *SaveResponse) GetId() string { - if m != nil { - return m.Id +func (*SaveResponse) ProtoMessage() {} + +func (x *SaveResponse) 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 SaveResponse.ProtoReflect.Descriptor instead. +func (*SaveResponse) Descriptor() ([]byte, []int) { + return file_proto_posts_proto_rawDescGZIP(), []int{4} +} + +func (x *SaveResponse) GetId() string { + if x != nil { + return x.Id } return "" } type DeleteRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +<<<<<<< HEAD + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +======= func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } func (m *DeleteRequest) String() string { return proto.CompactTextString(m) } func (*DeleteRequest) ProtoMessage() {} func (*DeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptor_e93dc7d934d9dc10, []int{7} +>>>>>>> master } -func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteRequest.Unmarshal(m, b) -} -func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic) -} -func (m *DeleteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteRequest.Merge(m, src) -} -func (m *DeleteRequest) XXX_Size() int { - return xxx_messageInfo_DeleteRequest.Size(m) -} -func (m *DeleteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteRequest.DiscardUnknown(m) +func (x *DeleteRequest) Reset() { + *x = DeleteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_posts_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo +func (x *DeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *DeleteRequest) GetId() string { - if m != nil { - return m.Id +func (*DeleteRequest) ProtoMessage() {} + +func (x *DeleteRequest) 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 DeleteRequest.ProtoReflect.Descriptor instead. +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return file_proto_posts_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteRequest) GetId() string { + if x != nil { + return x.Id } return "" } type DeleteResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *DeleteResponse) Reset() { *m = DeleteResponse{} } -func (m *DeleteResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteResponse) ProtoMessage() {} +func (x *DeleteResponse) Reset() { + *x = DeleteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_posts_proto_msgTypes[6] + 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[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 DeleteResponse.ProtoReflect.Descriptor instead. func (*DeleteResponse) Descriptor() ([]byte, []int) { +<<<<<<< HEAD + return file_proto_posts_proto_rawDescGZIP(), []int{6} +} + +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, 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, 0xa9, 0x01, 0x0a, 0x05, 0x50, 0x6f, 0x73, 0x74, 0x73, 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, 9) +var file_proto_posts_proto_goTypes = []interface{}{ + (*Post)(nil), // 0: posts.Post + (*QueryRequest)(nil), // 1: posts.QueryRequest + (*QueryResponse)(nil), // 2: posts.QueryResponse + (*SaveRequest)(nil), // 3: posts.SaveRequest + (*SaveResponse)(nil), // 4: posts.SaveResponse + (*DeleteRequest)(nil), // 5: posts.DeleteRequest + (*DeleteResponse)(nil), // 6: posts.DeleteResponse + nil, // 7: posts.Post.MetadataEntry + nil, // 8: posts.SaveRequest.MetadataEntry +} +var file_proto_posts_proto_depIdxs = []int32{ + 7, // 0: posts.Post.metadata:type_name -> posts.Post.MetadataEntry + 0, // 1: posts.QueryResponse.posts:type_name -> posts.Post + 8, // 2: posts.SaveRequest.metadata:type_name -> posts.SaveRequest.MetadataEntry + 1, // 3: posts.Posts.Query:input_type -> posts.QueryRequest + 3, // 4: posts.Posts.Save:input_type -> posts.SaveRequest + 5, // 5: posts.Posts.Delete:input_type -> posts.DeleteRequest + 2, // 6: posts.Posts.Query:output_type -> posts.QueryResponse + 4, // 7: posts.Posts.Save:output_type -> posts.SaveResponse + 6, // 8: posts.Posts.Delete:output_type -> posts.DeleteResponse + 6, // [6:9] is the sub-list for method output_type + 3, // [3:6] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] 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.(*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[2].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[3].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[4].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[5].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[6].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: 9, + 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 +======= return fileDescriptor_e93dc7d934d9dc10, []int{8} } @@ -584,4 +940,5 @@ var fileDescriptor_e93dc7d934d9dc10 = []byte{ 0x21, 0x4f, 0xc1, 0x97, 0x46, 0x08, 0xf9, 0x77, 0x9e, 0xd1, 0x7a, 0x54, 0x1b, 0x28, 0x2f, 0x21, 0xd4, 0xd2, 0x49, 0xff, 0xe8, 0xc8, 0x6a, 0x74, 0xf7, 0xa8, 0xda, 0x13, 0xbf, 0x84, 0xea, 0x57, 0xf6, 0xec, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa7, 0xee, 0x3f, 0xc4, 0xdf, 0x04, 0x00, 0x00, +>>>>>>> master } diff --git a/streams/proto/streams.pb.go b/streams/proto/streams.pb.go new file mode 100644 index 0000000..7e35136 --- /dev/null +++ b/streams/proto/streams.pb.go @@ -0,0 +1,1465 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.6.1 +// source: proto/streams.proto + +package streams + +import ( + proto "github.com/golang/protobuf/proto" + timestamp "github.com/golang/protobuf/ptypes/timestamp" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + 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 Conversation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + Topic string `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"` + CreatedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +} + +func (x *Conversation) Reset() { + *x = Conversation{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Conversation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Conversation) ProtoMessage() {} + +func (x *Conversation) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_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 Conversation.ProtoReflect.Descriptor instead. +func (*Conversation) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{0} +} + +func (x *Conversation) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Conversation) GetGroupId() string { + if x != nil { + return x.GroupId + } + return "" +} + +func (x *Conversation) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +func (x *Conversation) GetCreatedAt() *timestamp.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +type Message struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + AuthorId string `protobuf:"bytes,2,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` + ConversationId string `protobuf:"bytes,3,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"` + Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"` + SentAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"` +} + +func (x *Message) Reset() { + *x = Message{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Message) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message) ProtoMessage() {} + +func (x *Message) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_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 Message.ProtoReflect.Descriptor instead. +func (*Message) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{1} +} + +func (x *Message) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Message) GetAuthorId() string { + if x != nil { + return x.AuthorId + } + return "" +} + +func (x *Message) GetConversationId() string { + if x != nil { + return x.ConversationId + } + return "" +} + +func (x *Message) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +func (x *Message) GetSentAt() *timestamp.Timestamp { + if x != nil { + return x.SentAt + } + return nil +} + +type CreateConversationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` +} + +func (x *CreateConversationRequest) Reset() { + *x = CreateConversationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateConversationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateConversationRequest) ProtoMessage() {} + +func (x *CreateConversationRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_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 CreateConversationRequest.ProtoReflect.Descriptor instead. +func (*CreateConversationRequest) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateConversationRequest) GetGroupId() string { + if x != nil { + return x.GroupId + } + return "" +} + +func (x *CreateConversationRequest) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +type CreateConversationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Conversation *Conversation `protobuf:"bytes,1,opt,name=conversation,proto3" json:"conversation,omitempty"` +} + +func (x *CreateConversationResponse) Reset() { + *x = CreateConversationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateConversationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateConversationResponse) ProtoMessage() {} + +func (x *CreateConversationResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_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 CreateConversationResponse.ProtoReflect.Descriptor instead. +func (*CreateConversationResponse) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateConversationResponse) GetConversation() *Conversation { + if x != nil { + return x.Conversation + } + return nil +} + +type ReadConversationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + GroupId *wrappers.StringValue `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` +} + +func (x *ReadConversationRequest) Reset() { + *x = ReadConversationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadConversationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadConversationRequest) ProtoMessage() {} + +func (x *ReadConversationRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_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 ReadConversationRequest.ProtoReflect.Descriptor instead. +func (*ReadConversationRequest) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{4} +} + +func (x *ReadConversationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ReadConversationRequest) GetGroupId() *wrappers.StringValue { + if x != nil { + return x.GroupId + } + return nil +} + +type ReadConversationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Conversation *Conversation `protobuf:"bytes,1,opt,name=conversation,proto3" json:"conversation,omitempty"` +} + +func (x *ReadConversationResponse) Reset() { + *x = ReadConversationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadConversationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadConversationResponse) ProtoMessage() {} + +func (x *ReadConversationResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_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 ReadConversationResponse.ProtoReflect.Descriptor instead. +func (*ReadConversationResponse) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{5} +} + +func (x *ReadConversationResponse) GetConversation() *Conversation { + if x != nil { + return x.Conversation + } + return nil +} + +type ListConversationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` +} + +func (x *ListConversationsRequest) Reset() { + *x = ListConversationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListConversationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListConversationsRequest) ProtoMessage() {} + +func (x *ListConversationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_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 ListConversationsRequest.ProtoReflect.Descriptor instead. +func (*ListConversationsRequest) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{6} +} + +func (x *ListConversationsRequest) GetGroupId() string { + if x != nil { + return x.GroupId + } + return "" +} + +type ListConversationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Conversations []*Conversation `protobuf:"bytes,1,rep,name=conversations,proto3" json:"conversations,omitempty"` +} + +func (x *ListConversationsResponse) Reset() { + *x = ListConversationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListConversationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListConversationsResponse) ProtoMessage() {} + +func (x *ListConversationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_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 ListConversationsResponse.ProtoReflect.Descriptor instead. +func (*ListConversationsResponse) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{7} +} + +func (x *ListConversationsResponse) GetConversations() []*Conversation { + if x != nil { + return x.Conversations + } + return nil +} + +type UpdateConversationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` +} + +func (x *UpdateConversationRequest) Reset() { + *x = UpdateConversationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateConversationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateConversationRequest) ProtoMessage() {} + +func (x *UpdateConversationRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_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 UpdateConversationRequest.ProtoReflect.Descriptor instead. +func (*UpdateConversationRequest) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateConversationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UpdateConversationRequest) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +type UpdateConversationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Conversation *Conversation `protobuf:"bytes,1,opt,name=conversation,proto3" json:"conversation,omitempty"` +} + +func (x *UpdateConversationResponse) Reset() { + *x = UpdateConversationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateConversationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateConversationResponse) ProtoMessage() {} + +func (x *UpdateConversationResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_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 UpdateConversationResponse.ProtoReflect.Descriptor instead. +func (*UpdateConversationResponse) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdateConversationResponse) GetConversation() *Conversation { + if x != nil { + return x.Conversation + } + return nil +} + +type DeleteConversationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteConversationRequest) Reset() { + *x = DeleteConversationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteConversationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteConversationRequest) ProtoMessage() {} + +func (x *DeleteConversationRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_proto_msgTypes[10] + 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 DeleteConversationRequest.ProtoReflect.Descriptor instead. +func (*DeleteConversationRequest) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{10} +} + +func (x *DeleteConversationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteConversationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteConversationResponse) Reset() { + *x = DeleteConversationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteConversationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteConversationResponse) ProtoMessage() {} + +func (x *DeleteConversationResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_proto_msgTypes[11] + 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 DeleteConversationResponse.ProtoReflect.Descriptor instead. +func (*DeleteConversationResponse) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{11} +} + +type CreateMessageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ConversationId string `protobuf:"bytes,1,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"` + AuthorId string `protobuf:"bytes,2,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` + Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"` +} + +func (x *CreateMessageRequest) Reset() { + *x = CreateMessageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateMessageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateMessageRequest) ProtoMessage() {} + +func (x *CreateMessageRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_proto_msgTypes[12] + 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 CreateMessageRequest.ProtoReflect.Descriptor instead. +func (*CreateMessageRequest) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{12} +} + +func (x *CreateMessageRequest) GetConversationId() string { + if x != nil { + return x.ConversationId + } + return "" +} + +func (x *CreateMessageRequest) GetAuthorId() string { + if x != nil { + return x.AuthorId + } + return "" +} + +func (x *CreateMessageRequest) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +type CreateMessageResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *CreateMessageResponse) Reset() { + *x = CreateMessageResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateMessageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateMessageResponse) ProtoMessage() {} + +func (x *CreateMessageResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_proto_msgTypes[13] + 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 CreateMessageResponse.ProtoReflect.Descriptor instead. +func (*CreateMessageResponse) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{13} +} + +func (x *CreateMessageResponse) GetMessage() *Message { + if x != nil { + return x.Message + } + return nil +} + +type ListMessagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ConversationId string `protobuf:"bytes,1,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"` + SentBefore *timestamp.Timestamp `protobuf:"bytes,2,opt,name=sent_before,json=sentBefore,proto3" json:"sent_before,omitempty"` + Limit *wrappers.Int32Value `protobuf:"bytes,3,opt,name=limit,proto3" json:"limit,omitempty"` +} + +func (x *ListMessagesRequest) Reset() { + *x = ListMessagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListMessagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMessagesRequest) ProtoMessage() {} + +func (x *ListMessagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_proto_msgTypes[14] + 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 ListMessagesRequest.ProtoReflect.Descriptor instead. +func (*ListMessagesRequest) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{14} +} + +func (x *ListMessagesRequest) GetConversationId() string { + if x != nil { + return x.ConversationId + } + return "" +} + +func (x *ListMessagesRequest) GetSentBefore() *timestamp.Timestamp { + if x != nil { + return x.SentBefore + } + return nil +} + +func (x *ListMessagesRequest) GetLimit() *wrappers.Int32Value { + if x != nil { + return x.Limit + } + return nil +} + +type ListMessagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Messages []*Message `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` +} + +func (x *ListMessagesResponse) Reset() { + *x = ListMessagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListMessagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMessagesResponse) ProtoMessage() {} + +func (x *ListMessagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_proto_msgTypes[15] + 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 ListMessagesResponse.ProtoReflect.Descriptor instead. +func (*ListMessagesResponse) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{15} +} + +func (x *ListMessagesResponse) GetMessages() []*Message { + if x != nil { + return x.Messages + } + return nil +} + +type RecentMessagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ConversationIds []string `protobuf:"bytes,1,rep,name=conversation_ids,json=conversationIds,proto3" json:"conversation_ids,omitempty"` + LimitPerConversation *wrappers.Int32Value `protobuf:"bytes,2,opt,name=limit_per_conversation,json=limitPerConversation,proto3" json:"limit_per_conversation,omitempty"` +} + +func (x *RecentMessagesRequest) Reset() { + *x = RecentMessagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RecentMessagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecentMessagesRequest) ProtoMessage() {} + +func (x *RecentMessagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_proto_msgTypes[16] + 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 RecentMessagesRequest.ProtoReflect.Descriptor instead. +func (*RecentMessagesRequest) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{16} +} + +func (x *RecentMessagesRequest) GetConversationIds() []string { + if x != nil { + return x.ConversationIds + } + return nil +} + +func (x *RecentMessagesRequest) GetLimitPerConversation() *wrappers.Int32Value { + if x != nil { + return x.LimitPerConversation + } + return nil +} + +type RecentMessagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Messages []*Message `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` +} + +func (x *RecentMessagesResponse) Reset() { + *x = RecentMessagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_streams_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RecentMessagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecentMessagesResponse) ProtoMessage() {} + +func (x *RecentMessagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_streams_proto_msgTypes[17] + 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 RecentMessagesResponse.ProtoReflect.Descriptor instead. +func (*RecentMessagesResponse) Descriptor() ([]byte, []int) { + return file_proto_streams_proto_rawDescGZIP(), []int{17} +} + +func (x *RecentMessagesResponse) GetMessages() []*Message { + if x != nil { + return x.Messages + } + return nil +} + +var File_proto_streams_proto protoreflect.FileDescriptor + +var file_proto_streams_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x1a, 0x1f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x8a, 0x01, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, + 0x6f, 0x70, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xa8, 0x01, 0x0a, + 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, + 0x78, 0x74, 0x12, 0x33, 0x0a, 0x07, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x06, 0x73, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x22, 0x4c, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x74, 0x6f, 0x70, 0x69, 0x63, 0x22, 0x57, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x62, + 0x0a, 0x17, 0x52, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x49, 0x64, 0x22, 0x55, 0x0a, 0x18, 0x52, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, + 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x43, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x18, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, + 0x22, 0x58, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, + 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x43, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x41, 0x0a, 0x19, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 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, 0x6f, 0x70, 0x69, 0x63, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x22, 0x57, 0x0a, + 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x63, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2b, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x70, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x49, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, + 0x65, 0x78, 0x74, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, + 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x6e, + 0x74, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x6e, 0x74, + 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x44, 0x0a, 0x14, 0x4c, 0x69, 0x73, + 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, + 0x95, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x73, 0x12, 0x51, 0x0a, 0x16, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x65, + 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x14, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x16, 0x52, 0x65, 0x63, 0x65, 0x6e, + 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x32, + 0xcb, 0x05, 0x0a, 0x07, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x22, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x52, 0x65, + 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, + 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x43, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5a, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, + 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1d, + 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, + 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1c, 0x2e, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x52, 0x65, + 0x63, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0f, 0x5a, + 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_streams_proto_rawDescOnce sync.Once + file_proto_streams_proto_rawDescData = file_proto_streams_proto_rawDesc +) + +func file_proto_streams_proto_rawDescGZIP() []byte { + file_proto_streams_proto_rawDescOnce.Do(func() { + file_proto_streams_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_streams_proto_rawDescData) + }) + return file_proto_streams_proto_rawDescData +} + +var file_proto_streams_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_proto_streams_proto_goTypes = []interface{}{ + (*Conversation)(nil), // 0: streams.Conversation + (*Message)(nil), // 1: streams.Message + (*CreateConversationRequest)(nil), // 2: streams.CreateConversationRequest + (*CreateConversationResponse)(nil), // 3: streams.CreateConversationResponse + (*ReadConversationRequest)(nil), // 4: streams.ReadConversationRequest + (*ReadConversationResponse)(nil), // 5: streams.ReadConversationResponse + (*ListConversationsRequest)(nil), // 6: streams.ListConversationsRequest + (*ListConversationsResponse)(nil), // 7: streams.ListConversationsResponse + (*UpdateConversationRequest)(nil), // 8: streams.UpdateConversationRequest + (*UpdateConversationResponse)(nil), // 9: streams.UpdateConversationResponse + (*DeleteConversationRequest)(nil), // 10: streams.DeleteConversationRequest + (*DeleteConversationResponse)(nil), // 11: streams.DeleteConversationResponse + (*CreateMessageRequest)(nil), // 12: streams.CreateMessageRequest + (*CreateMessageResponse)(nil), // 13: streams.CreateMessageResponse + (*ListMessagesRequest)(nil), // 14: streams.ListMessagesRequest + (*ListMessagesResponse)(nil), // 15: streams.ListMessagesResponse + (*RecentMessagesRequest)(nil), // 16: streams.RecentMessagesRequest + (*RecentMessagesResponse)(nil), // 17: streams.RecentMessagesResponse + (*timestamp.Timestamp)(nil), // 18: google.protobuf.Timestamp + (*wrappers.StringValue)(nil), // 19: google.protobuf.StringValue + (*wrappers.Int32Value)(nil), // 20: google.protobuf.Int32Value +} +var file_proto_streams_proto_depIdxs = []int32{ + 18, // 0: streams.Conversation.created_at:type_name -> google.protobuf.Timestamp + 18, // 1: streams.Message.sent_at:type_name -> google.protobuf.Timestamp + 0, // 2: streams.CreateConversationResponse.conversation:type_name -> streams.Conversation + 19, // 3: streams.ReadConversationRequest.group_id:type_name -> google.protobuf.StringValue + 0, // 4: streams.ReadConversationResponse.conversation:type_name -> streams.Conversation + 0, // 5: streams.ListConversationsResponse.conversations:type_name -> streams.Conversation + 0, // 6: streams.UpdateConversationResponse.conversation:type_name -> streams.Conversation + 1, // 7: streams.CreateMessageResponse.message:type_name -> streams.Message + 18, // 8: streams.ListMessagesRequest.sent_before:type_name -> google.protobuf.Timestamp + 20, // 9: streams.ListMessagesRequest.limit:type_name -> google.protobuf.Int32Value + 1, // 10: streams.ListMessagesResponse.messages:type_name -> streams.Message + 20, // 11: streams.RecentMessagesRequest.limit_per_conversation:type_name -> google.protobuf.Int32Value + 1, // 12: streams.RecentMessagesResponse.messages:type_name -> streams.Message + 2, // 13: streams.Streams.CreateConversation:input_type -> streams.CreateConversationRequest + 4, // 14: streams.Streams.ReadConversation:input_type -> streams.ReadConversationRequest + 8, // 15: streams.Streams.UpdateConversation:input_type -> streams.UpdateConversationRequest + 10, // 16: streams.Streams.DeleteConversation:input_type -> streams.DeleteConversationRequest + 6, // 17: streams.Streams.ListConversations:input_type -> streams.ListConversationsRequest + 12, // 18: streams.Streams.CreateMessage:input_type -> streams.CreateMessageRequest + 14, // 19: streams.Streams.ListMessages:input_type -> streams.ListMessagesRequest + 16, // 20: streams.Streams.RecentMessages:input_type -> streams.RecentMessagesRequest + 3, // 21: streams.Streams.CreateConversation:output_type -> streams.CreateConversationResponse + 5, // 22: streams.Streams.ReadConversation:output_type -> streams.ReadConversationResponse + 9, // 23: streams.Streams.UpdateConversation:output_type -> streams.UpdateConversationResponse + 11, // 24: streams.Streams.DeleteConversation:output_type -> streams.DeleteConversationResponse + 7, // 25: streams.Streams.ListConversations:output_type -> streams.ListConversationsResponse + 13, // 26: streams.Streams.CreateMessage:output_type -> streams.CreateMessageResponse + 15, // 27: streams.Streams.ListMessages:output_type -> streams.ListMessagesResponse + 17, // 28: streams.Streams.RecentMessages:output_type -> streams.RecentMessagesResponse + 21, // [21:29] is the sub-list for method output_type + 13, // [13:21] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_proto_streams_proto_init() } +func file_proto_streams_proto_init() { + if File_proto_streams_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_streams_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Conversation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Message); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateConversationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateConversationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadConversationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadConversationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListConversationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListConversationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateConversationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateConversationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteConversationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteConversationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateMessageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateMessageResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListMessagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListMessagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RecentMessagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_streams_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RecentMessagesResponse); 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_streams_proto_rawDesc, + NumEnums: 0, + NumMessages: 18, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_streams_proto_goTypes, + DependencyIndexes: file_proto_streams_proto_depIdxs, + MessageInfos: file_proto_streams_proto_msgTypes, + }.Build() + File_proto_streams_proto = out.File + file_proto_streams_proto_rawDesc = nil + file_proto_streams_proto_goTypes = nil + file_proto_streams_proto_depIdxs = nil +} diff --git a/threads/Makefile b/threads/Makefile index 74a0e4b..b427bf1 100644 --- a/threads/Makefile +++ b/threads/Makefile @@ -8,7 +8,12 @@ init: .PHONY: proto proto: protoc --proto_path=. --micro_out=. --go_out=:. proto/threads.proto - + +.PHONY: docs +docs: + protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=:. proto/threads.proto + @redoc-cli bundle api-protobuf.json + .PHONY: build build: go build -o threads *.go diff --git a/users/Makefile b/users/Makefile index ddbb866..0761276 100644 --- a/users/Makefile +++ b/users/Makefile @@ -7,8 +7,13 @@ init: go get github.com/micro/micro/v3/cmd/protoc-gen-micro .PHONY: proto proto: - protoc --proto_path=. --micro_out=. --go_out=:. proto/users.proto - + protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=:. proto/users.proto + +.PHONY: docs +docs: + protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=:. proto/users.proto + @redoc-cli bundle api-protobuf.json + .PHONY: build build: go build -o users *.go diff --git a/users/proto/users.pb.go b/users/proto/users.pb.go index c878dc4..50f0dde 100644 --- a/users/proto/users.pb.go +++ b/users/proto/users.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.23.0 -// protoc v3.13.0 +// protoc-gen-go v1.25.0 +// protoc v3.6.1 // source: proto/users.proto package users