Compare commits

...

15 Commits
v0.1.1 ... main

12 changed files with 3209 additions and 221 deletions

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "proto"]
path = proto
url = git@git.badhouseplants.net:softplayer/softplayer-proto.git
url = git@gitea.badhouseplants.net:softplayer/softplayer-proto.git

View File

@ -6,8 +6,8 @@ CONTAINER_TOOL ?= docker
container-go-protobuf:
$(CONTAINER_TOOL) build -t gogen . && \
$(CONTAINER_TOOL) run --rm \
-v $$(pwd)/proto:/proto \
-v $$(pwd)/pkg:/pkg \
-v $$(pwd)/proto:/proto:z \
-v $$(pwd)/pkg:/pkg:z \
gogen \
protoc --go_out=/pkg/ --go_opt=paths=source_relative \
--go-grpc_out=/pkg/ --go-grpc_opt=paths=source_relative \

2
go.mod
View File

@ -1,4 +1,4 @@
module git.badhouseplants.net/softplayer/softplayer-go-proto
module gitea.badhouseplants.net/softplayer/softplayer-go-proto
go 1.22.1

View File

@ -11,6 +11,7 @@ package accounts
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
)
@ -22,6 +23,53 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type EmailVerified struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Verified bool `protobuf:"varint,1,opt,name=verified,proto3" json:"verified,omitempty"`
}
func (x *EmailVerified) Reset() {
*x = EmailVerified{}
if protoimpl.UnsafeEnabled {
mi := &file_accounts_accounts_v1_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EmailVerified) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EmailVerified) ProtoMessage() {}
func (x *EmailVerified) ProtoReflect() protoreflect.Message {
mi := &file_accounts_accounts_v1_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 EmailVerified.ProtoReflect.Descriptor instead.
func (*EmailVerified) Descriptor() ([]byte, []int) {
return file_accounts_accounts_v1_proto_rawDescGZIP(), []int{0}
}
func (x *EmailVerified) GetVerified() bool {
if x != nil {
return x.Verified
}
return false
}
// *
// Represents a environment UUID only
type AccountId struct {
@ -35,7 +83,7 @@ type AccountId struct {
func (x *AccountId) Reset() {
*x = AccountId{}
if protoimpl.UnsafeEnabled {
mi := &file_accounts_accounts_v1_proto_msgTypes[0]
mi := &file_accounts_accounts_v1_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -48,7 +96,7 @@ func (x *AccountId) String() string {
func (*AccountId) ProtoMessage() {}
func (x *AccountId) ProtoReflect() protoreflect.Message {
mi := &file_accounts_accounts_v1_proto_msgTypes[0]
mi := &file_accounts_accounts_v1_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -61,7 +109,7 @@ func (x *AccountId) ProtoReflect() protoreflect.Message {
// Deprecated: Use AccountId.ProtoReflect.Descriptor instead.
func (*AccountId) Descriptor() ([]byte, []int) {
return file_accounts_accounts_v1_proto_rawDescGZIP(), []int{0}
return file_accounts_accounts_v1_proto_rawDescGZIP(), []int{1}
}
func (x *AccountId) GetId() string {
@ -76,13 +124,13 @@ type AccountPassword struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Password string `protobuf:"bytes,1,opt,name=Password,proto3" json:"Password,omitempty"`
Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
}
func (x *AccountPassword) Reset() {
*x = AccountPassword{}
if protoimpl.UnsafeEnabled {
mi := &file_accounts_accounts_v1_proto_msgTypes[1]
mi := &file_accounts_accounts_v1_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -95,7 +143,7 @@ func (x *AccountPassword) String() string {
func (*AccountPassword) ProtoMessage() {}
func (x *AccountPassword) ProtoReflect() protoreflect.Message {
mi := &file_accounts_accounts_v1_proto_msgTypes[1]
mi := &file_accounts_accounts_v1_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -108,7 +156,7 @@ func (x *AccountPassword) ProtoReflect() protoreflect.Message {
// Deprecated: Use AccountPassword.ProtoReflect.Descriptor instead.
func (*AccountPassword) Descriptor() ([]byte, []int) {
return file_accounts_accounts_v1_proto_rawDescGZIP(), []int{1}
return file_accounts_accounts_v1_proto_rawDescGZIP(), []int{2}
}
func (x *AccountPassword) GetPassword() string {
@ -130,7 +178,7 @@ type AccountData struct {
func (x *AccountData) Reset() {
*x = AccountData{}
if protoimpl.UnsafeEnabled {
mi := &file_accounts_accounts_v1_proto_msgTypes[2]
mi := &file_accounts_accounts_v1_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -143,7 +191,7 @@ func (x *AccountData) String() string {
func (*AccountData) ProtoMessage() {}
func (x *AccountData) ProtoReflect() protoreflect.Message {
mi := &file_accounts_accounts_v1_proto_msgTypes[2]
mi := &file_accounts_accounts_v1_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -156,7 +204,7 @@ func (x *AccountData) ProtoReflect() protoreflect.Message {
// Deprecated: Use AccountData.ProtoReflect.Descriptor instead.
func (*AccountData) Descriptor() ([]byte, []int) {
return file_accounts_accounts_v1_proto_rawDescGZIP(), []int{2}
return file_accounts_accounts_v1_proto_rawDescGZIP(), []int{3}
}
func (x *AccountData) GetName() string {
@ -178,14 +226,14 @@ type AccountWithPassword struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data *AccountData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
AccountPassword *AccountPassword `protobuf:"bytes,2,opt,name=AccountPassword,proto3" json:"AccountPassword,omitempty"`
Data *AccountData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
Password *AccountPassword `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
}
func (x *AccountWithPassword) Reset() {
*x = AccountWithPassword{}
if protoimpl.UnsafeEnabled {
mi := &file_accounts_accounts_v1_proto_msgTypes[3]
mi := &file_accounts_accounts_v1_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -198,7 +246,7 @@ func (x *AccountWithPassword) String() string {
func (*AccountWithPassword) ProtoMessage() {}
func (x *AccountWithPassword) ProtoReflect() protoreflect.Message {
mi := &file_accounts_accounts_v1_proto_msgTypes[3]
mi := &file_accounts_accounts_v1_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -211,7 +259,7 @@ func (x *AccountWithPassword) ProtoReflect() protoreflect.Message {
// Deprecated: Use AccountWithPassword.ProtoReflect.Descriptor instead.
func (*AccountWithPassword) Descriptor() ([]byte, []int) {
return file_accounts_accounts_v1_proto_rawDescGZIP(), []int{3}
return file_accounts_accounts_v1_proto_rawDescGZIP(), []int{4}
}
func (x *AccountWithPassword) GetData() *AccountData {
@ -221,13 +269,76 @@ func (x *AccountWithPassword) GetData() *AccountData {
return nil
}
func (x *AccountWithPassword) GetAccountPassword() *AccountPassword {
func (x *AccountWithPassword) GetPassword() *AccountPassword {
if x != nil {
return x.AccountPassword
return x.Password
}
return nil
}
type AccountWithPasswordAndCode struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data *AccountData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
Password *AccountPassword `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
}
func (x *AccountWithPasswordAndCode) Reset() {
*x = AccountWithPasswordAndCode{}
if protoimpl.UnsafeEnabled {
mi := &file_accounts_accounts_v1_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AccountWithPasswordAndCode) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AccountWithPasswordAndCode) ProtoMessage() {}
func (x *AccountWithPasswordAndCode) ProtoReflect() protoreflect.Message {
mi := &file_accounts_accounts_v1_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 AccountWithPasswordAndCode.ProtoReflect.Descriptor instead.
func (*AccountWithPasswordAndCode) Descriptor() ([]byte, []int) {
return file_accounts_accounts_v1_proto_rawDescGZIP(), []int{5}
}
func (x *AccountWithPasswordAndCode) GetData() *AccountData {
if x != nil {
return x.Data
}
return nil
}
func (x *AccountWithPasswordAndCode) GetPassword() *AccountPassword {
if x != nil {
return x.Password
}
return nil
}
func (x *AccountWithPasswordAndCode) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
type AccountFull struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -240,7 +351,7 @@ type AccountFull struct {
func (x *AccountFull) Reset() {
*x = AccountFull{}
if protoimpl.UnsafeEnabled {
mi := &file_accounts_accounts_v1_proto_msgTypes[4]
mi := &file_accounts_accounts_v1_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -253,7 +364,7 @@ func (x *AccountFull) String() string {
func (*AccountFull) ProtoMessage() {}
func (x *AccountFull) ProtoReflect() protoreflect.Message {
mi := &file_accounts_accounts_v1_proto_msgTypes[4]
mi := &file_accounts_accounts_v1_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -266,7 +377,7 @@ func (x *AccountFull) ProtoReflect() protoreflect.Message {
// Deprecated: Use AccountFull.ProtoReflect.Descriptor instead.
func (*AccountFull) Descriptor() ([]byte, []int) {
return file_accounts_accounts_v1_proto_rawDescGZIP(), []int{4}
return file_accounts_accounts_v1_proto_rawDescGZIP(), []int{6}
}
func (x *AccountFull) GetId() *AccountId {
@ -290,13 +401,13 @@ type AccountFullWithToken struct {
Id *AccountId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Data *AccountData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Token string `protobuf:"bytes,3,opt,name=Token,proto3" json:"Token,omitempty"`
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
}
func (x *AccountFullWithToken) Reset() {
*x = AccountFullWithToken{}
if protoimpl.UnsafeEnabled {
mi := &file_accounts_accounts_v1_proto_msgTypes[5]
mi := &file_accounts_accounts_v1_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -309,7 +420,7 @@ func (x *AccountFullWithToken) String() string {
func (*AccountFullWithToken) ProtoMessage() {}
func (x *AccountFullWithToken) ProtoReflect() protoreflect.Message {
mi := &file_accounts_accounts_v1_proto_msgTypes[5]
mi := &file_accounts_accounts_v1_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -322,7 +433,7 @@ func (x *AccountFullWithToken) ProtoReflect() protoreflect.Message {
// Deprecated: Use AccountFullWithToken.ProtoReflect.Descriptor instead.
func (*AccountFullWithToken) Descriptor() ([]byte, []int) {
return file_accounts_accounts_v1_proto_rawDescGZIP(), []int{5}
return file_accounts_accounts_v1_proto_rawDescGZIP(), []int{7}
}
func (x *AccountFullWithToken) GetId() *AccountId {
@ -351,24 +462,37 @@ var File_accounts_accounts_v1_proto protoreflect.FileDescriptor
var file_accounts_accounts_v1_proto_rawDesc = []byte{
0x0a, 0x1a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x73, 0x5f, 0x76, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x61, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x1b, 0x0a, 0x09, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x64, 0x22, 0x2d, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61,
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x22, 0x37, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x74,
0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x85, 0x01, 0x0a, 0x13,
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77,
0x6f, 0x72, 0x64, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x43,
0x0a, 0x0f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x52, 0x0f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77,
0x6f, 0x72, 0x64, 0x22, 0x5d, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x75,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x0d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69,
0x66, 0x69, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64,
0x22, 0x1b, 0x0a, 0x09, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2d, 0x0a,
0x0f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x37, 0x0a, 0x0b,
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x77, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x57, 0x69, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x29, 0x0a, 0x04,
0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x74,
0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77,
0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73,
0x77, 0x6f, 0x72, 0x64, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x92,
0x01, 0x0a, 0x1a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x50, 0x61,
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x41, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x29, 0x0a,
0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61,
0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73,
0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x73,
0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12,
0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63,
0x6f, 0x64, 0x65, 0x22, 0x5d, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x75,
0x6c, 0x6c, 0x12, 0x23, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13,
0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x49, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
@ -380,9 +504,9 @@ var file_accounts_accounts_v1_proto_rawDesc = []byte{
0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12,
0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f,
0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
0x32, 0xa0, 0x01, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x49, 0x0a,
0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f,
0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
0x32, 0xf6, 0x02, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x49, 0x0a,
0x06, 0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x12, 0x1d, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x50, 0x61,
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x1e, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
@ -392,12 +516,25 @@ var file_accounts_accounts_v1_proto_rawDesc = []byte{
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
0x64, 0x1a, 0x1e, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x22, 0x00, 0x42, 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x64, 0x68, 0x6f,
0x75, 0x73, 0x65, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x2f, 0x73, 0x6f,
0x66, 0x74, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x73, 0x6f, 0x66, 0x74, 0x70, 0x6c, 0x61,
0x79, 0x65, 0x72, 0x2d, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x6b, 0x67,
0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
0x6e, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73,
0x77, 0x6f, 0x72, 0x64, 0x12, 0x15, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e,
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0b, 0x4e, 0x65, 0x77, 0x50, 0x61, 0x73, 0x73,
0x77, 0x6f, 0x72, 0x64, 0x12, 0x24, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e,
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77,
0x6f, 0x72, 0x64, 0x41, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0f, 0x49, 0x73, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56,
0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x15, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x17,
0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56,
0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0x00, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74,
0x65, 0x61, 0x2e, 0x62, 0x61, 0x64, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x70, 0x6c, 0x61, 0x6e, 0x74,
0x73, 0x2e, 0x6e, 0x65, 0x74, 0x2f, 0x73, 0x6f, 0x66, 0x74, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72,
0x2f, 0x73, 0x6f, 0x66, 0x74, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2d, 0x67, 0x6f, 0x2d, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -412,31 +549,42 @@ func file_accounts_accounts_v1_proto_rawDescGZIP() []byte {
return file_accounts_accounts_v1_proto_rawDescData
}
var file_accounts_accounts_v1_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_accounts_accounts_v1_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_accounts_accounts_v1_proto_goTypes = []interface{}{
(*AccountId)(nil), // 0: accounts.AccountId
(*AccountPassword)(nil), // 1: accounts.AccountPassword
(*AccountData)(nil), // 2: accounts.AccountData
(*AccountWithPassword)(nil), // 3: accounts.AccountWithPassword
(*AccountFull)(nil), // 4: accounts.AccountFull
(*AccountFullWithToken)(nil), // 5: accounts.AccountFullWithToken
(*EmailVerified)(nil), // 0: accounts.EmailVerified
(*AccountId)(nil), // 1: accounts.AccountId
(*AccountPassword)(nil), // 2: accounts.AccountPassword
(*AccountData)(nil), // 3: accounts.AccountData
(*AccountWithPassword)(nil), // 4: accounts.AccountWithPassword
(*AccountWithPasswordAndCode)(nil), // 5: accounts.AccountWithPasswordAndCode
(*AccountFull)(nil), // 6: accounts.AccountFull
(*AccountFullWithToken)(nil), // 7: accounts.AccountFullWithToken
(*emptypb.Empty)(nil), // 8: google.protobuf.Empty
}
var file_accounts_accounts_v1_proto_depIdxs = []int32{
2, // 0: accounts.AccountWithPassword.data:type_name -> accounts.AccountData
1, // 1: accounts.AccountWithPassword.AccountPassword:type_name -> accounts.AccountPassword
0, // 2: accounts.AccountFull.id:type_name -> accounts.AccountId
2, // 3: accounts.AccountFull.data:type_name -> accounts.AccountData
0, // 4: accounts.AccountFullWithToken.id:type_name -> accounts.AccountId
2, // 5: accounts.AccountFullWithToken.data:type_name -> accounts.AccountData
3, // 6: accounts.Accounts.SignUp:input_type -> accounts.AccountWithPassword
3, // 7: accounts.Accounts.SignIn:input_type -> accounts.AccountWithPassword
5, // 8: accounts.Accounts.SignUp:output_type -> accounts.AccountFullWithToken
5, // 9: accounts.Accounts.SignIn:output_type -> accounts.AccountFullWithToken
8, // [8:10] is the sub-list for method output_type
6, // [6:8] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
3, // 0: accounts.AccountWithPassword.data:type_name -> accounts.AccountData
2, // 1: accounts.AccountWithPassword.password:type_name -> accounts.AccountPassword
3, // 2: accounts.AccountWithPasswordAndCode.data:type_name -> accounts.AccountData
2, // 3: accounts.AccountWithPasswordAndCode.password:type_name -> accounts.AccountPassword
1, // 4: accounts.AccountFull.id:type_name -> accounts.AccountId
3, // 5: accounts.AccountFull.data:type_name -> accounts.AccountData
1, // 6: accounts.AccountFullWithToken.id:type_name -> accounts.AccountId
3, // 7: accounts.AccountFullWithToken.data:type_name -> accounts.AccountData
4, // 8: accounts.Accounts.SignUp:input_type -> accounts.AccountWithPassword
4, // 9: accounts.Accounts.SignIn:input_type -> accounts.AccountWithPassword
3, // 10: accounts.Accounts.ResetPassword:input_type -> accounts.AccountData
5, // 11: accounts.Accounts.NewPassword:input_type -> accounts.AccountWithPasswordAndCode
3, // 12: accounts.Accounts.IsEmailVerified:input_type -> accounts.AccountData
7, // 13: accounts.Accounts.SignUp:output_type -> accounts.AccountFullWithToken
7, // 14: accounts.Accounts.SignIn:output_type -> accounts.AccountFullWithToken
8, // 15: accounts.Accounts.ResetPassword:output_type -> google.protobuf.Empty
8, // 16: accounts.Accounts.NewPassword:output_type -> google.protobuf.Empty
0, // 17: accounts.Accounts.IsEmailVerified:output_type -> accounts.EmailVerified
13, // [13:18] is the sub-list for method output_type
8, // [8:13] is the sub-list for method input_type
8, // [8:8] is the sub-list for extension type_name
8, // [8:8] is the sub-list for extension extendee
0, // [0:8] is the sub-list for field type_name
}
func init() { file_accounts_accounts_v1_proto_init() }
@ -446,7 +594,7 @@ func file_accounts_accounts_v1_proto_init() {
}
if !protoimpl.UnsafeEnabled {
file_accounts_accounts_v1_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AccountId); i {
switch v := v.(*EmailVerified); i {
case 0:
return &v.state
case 1:
@ -458,7 +606,7 @@ func file_accounts_accounts_v1_proto_init() {
}
}
file_accounts_accounts_v1_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AccountPassword); i {
switch v := v.(*AccountId); i {
case 0:
return &v.state
case 1:
@ -470,7 +618,7 @@ func file_accounts_accounts_v1_proto_init() {
}
}
file_accounts_accounts_v1_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AccountData); i {
switch v := v.(*AccountPassword); i {
case 0:
return &v.state
case 1:
@ -482,7 +630,7 @@ func file_accounts_accounts_v1_proto_init() {
}
}
file_accounts_accounts_v1_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AccountWithPassword); i {
switch v := v.(*AccountData); i {
case 0:
return &v.state
case 1:
@ -494,7 +642,7 @@ func file_accounts_accounts_v1_proto_init() {
}
}
file_accounts_accounts_v1_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AccountFull); i {
switch v := v.(*AccountWithPassword); i {
case 0:
return &v.state
case 1:
@ -506,6 +654,30 @@ func file_accounts_accounts_v1_proto_init() {
}
}
file_accounts_accounts_v1_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AccountWithPasswordAndCode); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_accounts_accounts_v1_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AccountFull); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_accounts_accounts_v1_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AccountFullWithToken); i {
case 0:
return &v.state
@ -524,7 +696,7 @@ func file_accounts_accounts_v1_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_accounts_accounts_v1_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -7,6 +7,7 @@ import (
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
@ -20,6 +21,9 @@ const _ = grpc.SupportPackageIsVersion7
type AccountsClient interface {
SignUp(ctx context.Context, in *AccountWithPassword, opts ...grpc.CallOption) (*AccountFullWithToken, error)
SignIn(ctx context.Context, in *AccountWithPassword, opts ...grpc.CallOption) (*AccountFullWithToken, error)
ResetPassword(ctx context.Context, in *AccountData, opts ...grpc.CallOption) (*emptypb.Empty, error)
NewPassword(ctx context.Context, in *AccountWithPasswordAndCode, opts ...grpc.CallOption) (*emptypb.Empty, error)
IsEmailVerified(ctx context.Context, in *AccountData, opts ...grpc.CallOption) (*EmailVerified, error)
}
type accountsClient struct {
@ -48,12 +52,42 @@ func (c *accountsClient) SignIn(ctx context.Context, in *AccountWithPassword, op
return out, nil
}
func (c *accountsClient) ResetPassword(ctx context.Context, in *AccountData, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/accounts.Accounts/ResetPassword", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountsClient) NewPassword(ctx context.Context, in *AccountWithPasswordAndCode, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/accounts.Accounts/NewPassword", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountsClient) IsEmailVerified(ctx context.Context, in *AccountData, opts ...grpc.CallOption) (*EmailVerified, error) {
out := new(EmailVerified)
err := c.cc.Invoke(ctx, "/accounts.Accounts/IsEmailVerified", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AccountsServer is the server API for Accounts service.
// All implementations must embed UnimplementedAccountsServer
// for forward compatibility
type AccountsServer interface {
SignUp(context.Context, *AccountWithPassword) (*AccountFullWithToken, error)
SignIn(context.Context, *AccountWithPassword) (*AccountFullWithToken, error)
ResetPassword(context.Context, *AccountData) (*emptypb.Empty, error)
NewPassword(context.Context, *AccountWithPasswordAndCode) (*emptypb.Empty, error)
IsEmailVerified(context.Context, *AccountData) (*EmailVerified, error)
mustEmbedUnimplementedAccountsServer()
}
@ -67,6 +101,15 @@ func (UnimplementedAccountsServer) SignUp(context.Context, *AccountWithPassword)
func (UnimplementedAccountsServer) SignIn(context.Context, *AccountWithPassword) (*AccountFullWithToken, error) {
return nil, status.Errorf(codes.Unimplemented, "method SignIn not implemented")
}
func (UnimplementedAccountsServer) ResetPassword(context.Context, *AccountData) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ResetPassword not implemented")
}
func (UnimplementedAccountsServer) NewPassword(context.Context, *AccountWithPasswordAndCode) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method NewPassword not implemented")
}
func (UnimplementedAccountsServer) IsEmailVerified(context.Context, *AccountData) (*EmailVerified, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsEmailVerified not implemented")
}
func (UnimplementedAccountsServer) mustEmbedUnimplementedAccountsServer() {}
// UnsafeAccountsServer may be embedded to opt out of forward compatibility for this service.
@ -116,6 +159,60 @@ func _Accounts_SignIn_Handler(srv interface{}, ctx context.Context, dec func(int
return interceptor(ctx, in, info, handler)
}
func _Accounts_ResetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AccountData)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountsServer).ResetPassword(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/accounts.Accounts/ResetPassword",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountsServer).ResetPassword(ctx, req.(*AccountData))
}
return interceptor(ctx, in, info, handler)
}
func _Accounts_NewPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AccountWithPasswordAndCode)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountsServer).NewPassword(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/accounts.Accounts/NewPassword",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountsServer).NewPassword(ctx, req.(*AccountWithPasswordAndCode))
}
return interceptor(ctx, in, info, handler)
}
func _Accounts_IsEmailVerified_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AccountData)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountsServer).IsEmailVerified(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/accounts.Accounts/IsEmailVerified",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountsServer).IsEmailVerified(ctx, req.(*AccountData))
}
return interceptor(ctx, in, info, handler)
}
// Accounts_ServiceDesc is the grpc.ServiceDesc for Accounts service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -131,6 +228,18 @@ var Accounts_ServiceDesc = grpc.ServiceDesc{
MethodName: "SignIn",
Handler: _Accounts_SignIn_Handler,
},
{
MethodName: "ResetPassword",
Handler: _Accounts_ResetPassword_Handler,
},
{
MethodName: "NewPassword",
Handler: _Accounts_NewPassword_Handler,
},
{
MethodName: "IsEmailVerified",
Handler: _Accounts_IsEmailVerified_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "accounts/accounts_v1.proto",

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,274 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package applications
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// ApplicationsClient is the client API for Applications service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ApplicationsClient interface {
Create(ctx context.Context, in *CreateOptions, opts ...grpc.CallOption) (*ApplicationFull, error)
Update(ctx context.Context, in *UpdateOptions, opts ...grpc.CallOption) (*ApplicationFull, error)
Delete(ctx context.Context, in *DeleteOptions, opts ...grpc.CallOption) (*emptypb.Empty, error)
Get(ctx context.Context, in *GetOptions, opts ...grpc.CallOption) (*ApplicationFull, error)
List(ctx context.Context, in *ListOptions, opts ...grpc.CallOption) (Applications_ListClient, error)
}
type applicationsClient struct {
cc grpc.ClientConnInterface
}
func NewApplicationsClient(cc grpc.ClientConnInterface) ApplicationsClient {
return &applicationsClient{cc}
}
func (c *applicationsClient) Create(ctx context.Context, in *CreateOptions, opts ...grpc.CallOption) (*ApplicationFull, error) {
out := new(ApplicationFull)
err := c.cc.Invoke(ctx, "/applications.Applications/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *applicationsClient) Update(ctx context.Context, in *UpdateOptions, opts ...grpc.CallOption) (*ApplicationFull, error) {
out := new(ApplicationFull)
err := c.cc.Invoke(ctx, "/applications.Applications/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *applicationsClient) Delete(ctx context.Context, in *DeleteOptions, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/applications.Applications/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *applicationsClient) Get(ctx context.Context, in *GetOptions, opts ...grpc.CallOption) (*ApplicationFull, error) {
out := new(ApplicationFull)
err := c.cc.Invoke(ctx, "/applications.Applications/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *applicationsClient) List(ctx context.Context, in *ListOptions, opts ...grpc.CallOption) (Applications_ListClient, error) {
stream, err := c.cc.NewStream(ctx, &Applications_ServiceDesc.Streams[0], "/applications.Applications/List", opts...)
if err != nil {
return nil, err
}
x := &applicationsListClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type Applications_ListClient interface {
Recv() (*ApplicationFull, error)
grpc.ClientStream
}
type applicationsListClient struct {
grpc.ClientStream
}
func (x *applicationsListClient) Recv() (*ApplicationFull, error) {
m := new(ApplicationFull)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// ApplicationsServer is the server API for Applications service.
// All implementations must embed UnimplementedApplicationsServer
// for forward compatibility
type ApplicationsServer interface {
Create(context.Context, *CreateOptions) (*ApplicationFull, error)
Update(context.Context, *UpdateOptions) (*ApplicationFull, error)
Delete(context.Context, *DeleteOptions) (*emptypb.Empty, error)
Get(context.Context, *GetOptions) (*ApplicationFull, error)
List(*ListOptions, Applications_ListServer) error
mustEmbedUnimplementedApplicationsServer()
}
// UnimplementedApplicationsServer must be embedded to have forward compatible implementations.
type UnimplementedApplicationsServer struct {
}
func (UnimplementedApplicationsServer) Create(context.Context, *CreateOptions) (*ApplicationFull, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedApplicationsServer) Update(context.Context, *UpdateOptions) (*ApplicationFull, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedApplicationsServer) Delete(context.Context, *DeleteOptions) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedApplicationsServer) Get(context.Context, *GetOptions) (*ApplicationFull, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedApplicationsServer) List(*ListOptions, Applications_ListServer) error {
return status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedApplicationsServer) mustEmbedUnimplementedApplicationsServer() {}
// UnsafeApplicationsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ApplicationsServer will
// result in compilation errors.
type UnsafeApplicationsServer interface {
mustEmbedUnimplementedApplicationsServer()
}
func RegisterApplicationsServer(s grpc.ServiceRegistrar, srv ApplicationsServer) {
s.RegisterService(&Applications_ServiceDesc, srv)
}
func _Applications_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateOptions)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ApplicationsServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/applications.Applications/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ApplicationsServer).Create(ctx, req.(*CreateOptions))
}
return interceptor(ctx, in, info, handler)
}
func _Applications_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateOptions)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ApplicationsServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/applications.Applications/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ApplicationsServer).Update(ctx, req.(*UpdateOptions))
}
return interceptor(ctx, in, info, handler)
}
func _Applications_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteOptions)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ApplicationsServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/applications.Applications/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ApplicationsServer).Delete(ctx, req.(*DeleteOptions))
}
return interceptor(ctx, in, info, handler)
}
func _Applications_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetOptions)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ApplicationsServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/applications.Applications/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ApplicationsServer).Get(ctx, req.(*GetOptions))
}
return interceptor(ctx, in, info, handler)
}
func _Applications_List_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(ListOptions)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(ApplicationsServer).List(m, &applicationsListServer{stream})
}
type Applications_ListServer interface {
Send(*ApplicationFull) error
grpc.ServerStream
}
type applicationsListServer struct {
grpc.ServerStream
}
func (x *applicationsListServer) Send(m *ApplicationFull) error {
return x.ServerStream.SendMsg(m)
}
// Applications_ServiceDesc is the grpc.ServiceDesc for Applications service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Applications_ServiceDesc = grpc.ServiceDesc{
ServiceName: "applications.Applications",
HandlerType: (*ApplicationsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _Applications_Create_Handler,
},
{
MethodName: "Update",
Handler: _Applications_Update_Handler,
},
{
MethodName: "Delete",
Handler: _Applications_Delete_Handler,
},
{
MethodName: "Get",
Handler: _Applications_Get_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "List",
Handler: _Applications_List_Handler,
ServerStreams: true,
},
},
Metadata: "applications/applications_v1.proto",
}

238
pkg/email/email_v1.pb.go Normal file
View File

@ -0,0 +1,238 @@
/// This file has messages for describing environments
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v4.24.4
// source: email/email_v1.proto
package email
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
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)
)
type RequestValidation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
}
func (x *RequestValidation) Reset() {
*x = RequestValidation{}
if protoimpl.UnsafeEnabled {
mi := &file_email_email_v1_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RequestValidation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RequestValidation) ProtoMessage() {}
func (x *RequestValidation) ProtoReflect() protoreflect.Message {
mi := &file_email_email_v1_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 RequestValidation.ProtoReflect.Descriptor instead.
func (*RequestValidation) Descriptor() ([]byte, []int) {
return file_email_email_v1_proto_rawDescGZIP(), []int{0}
}
func (x *RequestValidation) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
type ConfirmValidation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
}
func (x *ConfirmValidation) Reset() {
*x = ConfirmValidation{}
if protoimpl.UnsafeEnabled {
mi := &file_email_email_v1_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ConfirmValidation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ConfirmValidation) ProtoMessage() {}
func (x *ConfirmValidation) ProtoReflect() protoreflect.Message {
mi := &file_email_email_v1_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 ConfirmValidation.ProtoReflect.Descriptor instead.
func (*ConfirmValidation) Descriptor() ([]byte, []int) {
return file_email_email_v1_proto_rawDescGZIP(), []int{1}
}
func (x *ConfirmValidation) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
func (x *ConfirmValidation) GetCode() int32 {
if x != nil {
return x.Code
}
return 0
}
var File_email_email_v1_proto protoreflect.FileDescriptor
var file_email_email_v1_proto_rawDesc = []byte{
0x0a, 0x14, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x76, 0x31,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x1a, 0x1b, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65,
0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2c, 0x0a, 0x11, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x40, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x66,
0x69, 0x72, 0x6d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a,
0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x99, 0x01, 0x0a, 0x0f, 0x45,
0x6d, 0x61, 0x69, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41,
0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x2e,
0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
0x00, 0x12, 0x43, 0x0a, 0x0d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61,
0x69, 0x6c, 0x12, 0x18, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x72, 0x6d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x16, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x65, 0x61, 0x2e,
0x62, 0x61, 0x64, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x6e,
0x65, 0x74, 0x2f, 0x73, 0x6f, 0x66, 0x74, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x73, 0x6f,
0x66, 0x74, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2d, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_email_email_v1_proto_rawDescOnce sync.Once
file_email_email_v1_proto_rawDescData = file_email_email_v1_proto_rawDesc
)
func file_email_email_v1_proto_rawDescGZIP() []byte {
file_email_email_v1_proto_rawDescOnce.Do(func() {
file_email_email_v1_proto_rawDescData = protoimpl.X.CompressGZIP(file_email_email_v1_proto_rawDescData)
})
return file_email_email_v1_proto_rawDescData
}
var file_email_email_v1_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_email_email_v1_proto_goTypes = []interface{}{
(*RequestValidation)(nil), // 0: email.RequestValidation
(*ConfirmValidation)(nil), // 1: email.ConfirmValidation
(*emptypb.Empty)(nil), // 2: google.protobuf.Empty
}
var file_email_email_v1_proto_depIdxs = []int32{
0, // 0: email.EmailValidation.SendRequest:input_type -> email.RequestValidation
1, // 1: email.EmailValidation.ValidateEmail:input_type -> email.ConfirmValidation
2, // 2: email.EmailValidation.SendRequest:output_type -> google.protobuf.Empty
2, // 3: email.EmailValidation.ValidateEmail:output_type -> google.protobuf.Empty
2, // [2:4] is the sub-list for method output_type
0, // [0:2] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_email_email_v1_proto_init() }
func file_email_email_v1_proto_init() {
if File_email_email_v1_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_email_email_v1_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RequestValidation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_email_email_v1_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ConfirmValidation); 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_email_email_v1_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_email_email_v1_proto_goTypes,
DependencyIndexes: file_email_email_v1_proto_depIdxs,
MessageInfos: file_email_email_v1_proto_msgTypes,
}.Build()
File_email_email_v1_proto = out.File
file_email_email_v1_proto_rawDesc = nil
file_email_email_v1_proto_goTypes = nil
file_email_email_v1_proto_depIdxs = nil
}

View File

@ -0,0 +1,138 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package email
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// EmailValidationClient is the client API for EmailValidation service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type EmailValidationClient interface {
SendRequest(ctx context.Context, in *RequestValidation, opts ...grpc.CallOption) (*emptypb.Empty, error)
ValidateEmail(ctx context.Context, in *ConfirmValidation, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type emailValidationClient struct {
cc grpc.ClientConnInterface
}
func NewEmailValidationClient(cc grpc.ClientConnInterface) EmailValidationClient {
return &emailValidationClient{cc}
}
func (c *emailValidationClient) SendRequest(ctx context.Context, in *RequestValidation, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/email.EmailValidation/SendRequest", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *emailValidationClient) ValidateEmail(ctx context.Context, in *ConfirmValidation, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/email.EmailValidation/ValidateEmail", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// EmailValidationServer is the server API for EmailValidation service.
// All implementations must embed UnimplementedEmailValidationServer
// for forward compatibility
type EmailValidationServer interface {
SendRequest(context.Context, *RequestValidation) (*emptypb.Empty, error)
ValidateEmail(context.Context, *ConfirmValidation) (*emptypb.Empty, error)
mustEmbedUnimplementedEmailValidationServer()
}
// UnimplementedEmailValidationServer must be embedded to have forward compatible implementations.
type UnimplementedEmailValidationServer struct {
}
func (UnimplementedEmailValidationServer) SendRequest(context.Context, *RequestValidation) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendRequest not implemented")
}
func (UnimplementedEmailValidationServer) ValidateEmail(context.Context, *ConfirmValidation) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ValidateEmail not implemented")
}
func (UnimplementedEmailValidationServer) mustEmbedUnimplementedEmailValidationServer() {}
// UnsafeEmailValidationServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EmailValidationServer will
// result in compilation errors.
type UnsafeEmailValidationServer interface {
mustEmbedUnimplementedEmailValidationServer()
}
func RegisterEmailValidationServer(s grpc.ServiceRegistrar, srv EmailValidationServer) {
s.RegisterService(&EmailValidation_ServiceDesc, srv)
}
func _EmailValidation_SendRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RequestValidation)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EmailValidationServer).SendRequest(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/email.EmailValidation/SendRequest",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EmailValidationServer).SendRequest(ctx, req.(*RequestValidation))
}
return interceptor(ctx, in, info, handler)
}
func _EmailValidation_ValidateEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ConfirmValidation)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EmailValidationServer).ValidateEmail(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/email.EmailValidation/ValidateEmail",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EmailValidationServer).ValidateEmail(ctx, req.(*ConfirmValidation))
}
return interceptor(ctx, in, info, handler)
}
// EmailValidation_ServiceDesc is the grpc.ServiceDesc for EmailValidation service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var EmailValidation_ServiceDesc = grpc.ServiceDesc{
ServiceName: "email.EmailValidation",
HandlerType: (*EmailValidationServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SendRequest",
Handler: _EmailValidation_SendRequest_Handler,
},
{
MethodName: "ValidateEmail",
Handler: _EmailValidation_ValidateEmail_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "email/email_v1.proto",
}

File diff suppressed because it is too large Load Diff

View File

@ -19,11 +19,11 @@ const _ = grpc.SupportPackageIsVersion7
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type EnvironmentsClient interface {
Create(ctx context.Context, in *EnvironmentData, opts ...grpc.CallOption) (*EnvironmentFull, error)
Update(ctx context.Context, in *EnvironmentFull, opts ...grpc.CallOption) (*EnvironmentFull, error)
Delete(ctx context.Context, in *EnvironmentFull, opts ...grpc.CallOption) (*emptypb.Empty, error)
Get(ctx context.Context, in *EnvironmentId, opts ...grpc.CallOption) (*EnvironmentFull, error)
List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Environments_ListClient, error)
Create(ctx context.Context, in *CreateOptions, opts ...grpc.CallOption) (*EnvironmentFull, error)
Update(ctx context.Context, in *UpdateOptions, opts ...grpc.CallOption) (*EnvironmentFull, error)
Delete(ctx context.Context, in *DeleteOptions, opts ...grpc.CallOption) (*emptypb.Empty, error)
Get(ctx context.Context, in *GetOptions, opts ...grpc.CallOption) (*EnvironmentFull, error)
List(ctx context.Context, in *ListOptions, opts ...grpc.CallOption) (Environments_ListClient, error)
}
type environmentsClient struct {
@ -34,7 +34,7 @@ func NewEnvironmentsClient(cc grpc.ClientConnInterface) EnvironmentsClient {
return &environmentsClient{cc}
}
func (c *environmentsClient) Create(ctx context.Context, in *EnvironmentData, opts ...grpc.CallOption) (*EnvironmentFull, error) {
func (c *environmentsClient) Create(ctx context.Context, in *CreateOptions, opts ...grpc.CallOption) (*EnvironmentFull, error) {
out := new(EnvironmentFull)
err := c.cc.Invoke(ctx, "/environments.Environments/Create", in, out, opts...)
if err != nil {
@ -43,7 +43,7 @@ func (c *environmentsClient) Create(ctx context.Context, in *EnvironmentData, op
return out, nil
}
func (c *environmentsClient) Update(ctx context.Context, in *EnvironmentFull, opts ...grpc.CallOption) (*EnvironmentFull, error) {
func (c *environmentsClient) Update(ctx context.Context, in *UpdateOptions, opts ...grpc.CallOption) (*EnvironmentFull, error) {
out := new(EnvironmentFull)
err := c.cc.Invoke(ctx, "/environments.Environments/Update", in, out, opts...)
if err != nil {
@ -52,7 +52,7 @@ func (c *environmentsClient) Update(ctx context.Context, in *EnvironmentFull, op
return out, nil
}
func (c *environmentsClient) Delete(ctx context.Context, in *EnvironmentFull, opts ...grpc.CallOption) (*emptypb.Empty, error) {
func (c *environmentsClient) Delete(ctx context.Context, in *DeleteOptions, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/environments.Environments/Delete", in, out, opts...)
if err != nil {
@ -61,7 +61,7 @@ func (c *environmentsClient) Delete(ctx context.Context, in *EnvironmentFull, op
return out, nil
}
func (c *environmentsClient) Get(ctx context.Context, in *EnvironmentId, opts ...grpc.CallOption) (*EnvironmentFull, error) {
func (c *environmentsClient) Get(ctx context.Context, in *GetOptions, opts ...grpc.CallOption) (*EnvironmentFull, error) {
out := new(EnvironmentFull)
err := c.cc.Invoke(ctx, "/environments.Environments/Get", in, out, opts...)
if err != nil {
@ -70,7 +70,7 @@ func (c *environmentsClient) Get(ctx context.Context, in *EnvironmentId, opts ..
return out, nil
}
func (c *environmentsClient) List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Environments_ListClient, error) {
func (c *environmentsClient) List(ctx context.Context, in *ListOptions, opts ...grpc.CallOption) (Environments_ListClient, error) {
stream, err := c.cc.NewStream(ctx, &Environments_ServiceDesc.Streams[0], "/environments.Environments/List", opts...)
if err != nil {
return nil, err
@ -106,11 +106,11 @@ func (x *environmentsListClient) Recv() (*EnvironmentFull, error) {
// All implementations must embed UnimplementedEnvironmentsServer
// for forward compatibility
type EnvironmentsServer interface {
Create(context.Context, *EnvironmentData) (*EnvironmentFull, error)
Update(context.Context, *EnvironmentFull) (*EnvironmentFull, error)
Delete(context.Context, *EnvironmentFull) (*emptypb.Empty, error)
Get(context.Context, *EnvironmentId) (*EnvironmentFull, error)
List(*emptypb.Empty, Environments_ListServer) error
Create(context.Context, *CreateOptions) (*EnvironmentFull, error)
Update(context.Context, *UpdateOptions) (*EnvironmentFull, error)
Delete(context.Context, *DeleteOptions) (*emptypb.Empty, error)
Get(context.Context, *GetOptions) (*EnvironmentFull, error)
List(*ListOptions, Environments_ListServer) error
mustEmbedUnimplementedEnvironmentsServer()
}
@ -118,19 +118,19 @@ type EnvironmentsServer interface {
type UnimplementedEnvironmentsServer struct {
}
func (UnimplementedEnvironmentsServer) Create(context.Context, *EnvironmentData) (*EnvironmentFull, error) {
func (UnimplementedEnvironmentsServer) Create(context.Context, *CreateOptions) (*EnvironmentFull, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedEnvironmentsServer) Update(context.Context, *EnvironmentFull) (*EnvironmentFull, error) {
func (UnimplementedEnvironmentsServer) Update(context.Context, *UpdateOptions) (*EnvironmentFull, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedEnvironmentsServer) Delete(context.Context, *EnvironmentFull) (*emptypb.Empty, error) {
func (UnimplementedEnvironmentsServer) Delete(context.Context, *DeleteOptions) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedEnvironmentsServer) Get(context.Context, *EnvironmentId) (*EnvironmentFull, error) {
func (UnimplementedEnvironmentsServer) Get(context.Context, *GetOptions) (*EnvironmentFull, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedEnvironmentsServer) List(*emptypb.Empty, Environments_ListServer) error {
func (UnimplementedEnvironmentsServer) List(*ListOptions, Environments_ListServer) error {
return status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedEnvironmentsServer) mustEmbedUnimplementedEnvironmentsServer() {}
@ -147,7 +147,7 @@ func RegisterEnvironmentsServer(s grpc.ServiceRegistrar, srv EnvironmentsServer)
}
func _Environments_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EnvironmentData)
in := new(CreateOptions)
if err := dec(in); err != nil {
return nil, err
}
@ -159,13 +159,13 @@ func _Environments_Create_Handler(srv interface{}, ctx context.Context, dec func
FullMethod: "/environments.Environments/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EnvironmentsServer).Create(ctx, req.(*EnvironmentData))
return srv.(EnvironmentsServer).Create(ctx, req.(*CreateOptions))
}
return interceptor(ctx, in, info, handler)
}
func _Environments_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EnvironmentFull)
in := new(UpdateOptions)
if err := dec(in); err != nil {
return nil, err
}
@ -177,13 +177,13 @@ func _Environments_Update_Handler(srv interface{}, ctx context.Context, dec func
FullMethod: "/environments.Environments/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EnvironmentsServer).Update(ctx, req.(*EnvironmentFull))
return srv.(EnvironmentsServer).Update(ctx, req.(*UpdateOptions))
}
return interceptor(ctx, in, info, handler)
}
func _Environments_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EnvironmentFull)
in := new(DeleteOptions)
if err := dec(in); err != nil {
return nil, err
}
@ -195,13 +195,13 @@ func _Environments_Delete_Handler(srv interface{}, ctx context.Context, dec func
FullMethod: "/environments.Environments/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EnvironmentsServer).Delete(ctx, req.(*EnvironmentFull))
return srv.(EnvironmentsServer).Delete(ctx, req.(*DeleteOptions))
}
return interceptor(ctx, in, info, handler)
}
func _Environments_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EnvironmentId)
in := new(GetOptions)
if err := dec(in); err != nil {
return nil, err
}
@ -213,13 +213,13 @@ func _Environments_Get_Handler(srv interface{}, ctx context.Context, dec func(in
FullMethod: "/environments.Environments/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EnvironmentsServer).Get(ctx, req.(*EnvironmentId))
return srv.(EnvironmentsServer).Get(ctx, req.(*GetOptions))
}
return interceptor(ctx, in, info, handler)
}
func _Environments_List_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(emptypb.Empty)
m := new(ListOptions)
if err := stream.RecvMsg(m); err != nil {
return err
}

2
proto

@ -1 +1 @@
Subproject commit 2bd603442ae86210a54c8edd14fe66dc111cb839
Subproject commit 19468be27139f862a55bfcb884205035db39bb84