Multitenant users api (#75)

This commit is contained in:
Dominic Wong
2021-03-24 08:40:27 +00:00
committed by GitHub
parent a711e10961
commit d68fdeb516
26 changed files with 233 additions and 352 deletions

View File

@@ -1,16 +1,15 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.13.0
// protoc-gen-go v1.26.0
// protoc v3.15.5
// source: proto/streams.proto
package streams
import (
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
@@ -22,10 +21,6 @@ const (
_ = 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 PublishResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -69,9 +64,9 @@ type Message struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
SentAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
SentAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
}
func (x *Message) Reset() {
@@ -120,7 +115,7 @@ func (x *Message) GetMessage() string {
return ""
}
func (x *Message) GetSentAt() *timestamp.Timestamp {
func (x *Message) GetSentAt() *timestamppb.Timestamp {
if x != nil {
return x.SentAt
}
@@ -317,10 +312,8 @@ var file_proto_streams_proto_rawDesc = []byte{
0x30, 0x01, 0x12, 0x38, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x15, 0x2e, 0x73, 0x74,
0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x54, 0x6f, 0x6b,
0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x31, 0x5a, 0x2f,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f,
0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d,
0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x62,
0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x11, 0x5a, 0x0f,
0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
@@ -338,12 +331,12 @@ func file_proto_streams_proto_rawDescGZIP() []byte {
var file_proto_streams_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_proto_streams_proto_goTypes = []interface{}{
(*PublishResponse)(nil), // 0: streams.PublishResponse
(*Message)(nil), // 1: streams.Message
(*SubscribeRequest)(nil), // 2: streams.SubscribeRequest
(*TokenRequest)(nil), // 3: streams.TokenRequest
(*TokenResponse)(nil), // 4: streams.TokenResponse
(*timestamp.Timestamp)(nil), // 5: google.protobuf.Timestamp
(*PublishResponse)(nil), // 0: streams.PublishResponse
(*Message)(nil), // 1: streams.Message
(*SubscribeRequest)(nil), // 2: streams.SubscribeRequest
(*TokenRequest)(nil), // 3: streams.TokenRequest
(*TokenResponse)(nil), // 4: streams.TokenResponse
(*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp
}
var file_proto_streams_proto_depIdxs = []int32{
5, // 0: streams.Message.sent_at:type_name -> google.protobuf.Timestamp

View File

@@ -6,7 +6,7 @@ package streams
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/protobuf/types/known/timestamppb"
math "math"
)

View File

@@ -1,7 +1,7 @@
syntax = "proto3";
package streams;
option go_package = "github.com/micro/services/streams/proto;streams";
option go_package = "./proto;streams";
import "google/protobuf/timestamp.proto";
service Streams {
@@ -35,4 +35,4 @@ message TokenRequest {
message TokenResponse {
string token = 1;
}
}

View File