This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package grpc | |
| import ( | |
| "context" | |
| "log" | |
| "net" | |
| "google.golang.org/grpc" | |
| "github.com/amsokol/flutter-grpc-tutorial/go-server/pkg/api/v1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package v1 | |
| import ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "github.com/golang/protobuf/ptypes/empty" | |
| "github.com/golang/protobuf/ptypes/wrappers" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax = "proto3"; | |
| package main; | |
| import "google/protobuf/timestamp.proto"; | |
| import "google/protobuf/wrappers.proto"; | |
| import "protoc-gen-gotag/tagger/tagger.proto"; | |
| message Data { | |
| bool boolValue = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TopologyOptions: []topology.Option{ | |
| topology.WithServerOptions(func(opts ...topology.ServerOption) []topology.ServerOption { | |
| return []topology.ServerOption{ | |
| topology.WithRegistry(func(r *bsoncodec.Registry) *bsoncodec.Registry { | |
| return reg | |
| }), | |
| } | |
| }), | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "log" | |
| "time" | |
| "github.com/golang/protobuf/ptypes" | |
| "github.com/golang/protobuf/ptypes/wrappers" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "log" | |
| "time" | |
| "github.com/mongodb/mongo-go-driver/bson" | |
| "github.com/mongodb/mongo-go-driver/mongo" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax = "proto3"; | |
| package main; | |
| import "google/protobuf/timestamp.proto"; | |
| import "google/protobuf/wrappers.proto"; | |
| message Data { | |
| bool boolValue = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package rest | |
| import ( | |
| "context" | |
| "net/http" | |
| "os" | |
| "os/signal" | |
| "time" | |
| "github.com/grpc-ecosystem/grpc-gateway/runtime" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package middleware | |
| import ( | |
| "net/http" | |
| "strings" | |
| "time" | |
| "go.uber.org/zap" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package middleware | |
| import ( | |
| "context" | |
| "crypto/rand" | |
| "encoding/base64" | |
| "fmt" | |
| "net/http" | |
| "os" | |
| "strings" |