Update protobuf definitions: 76a233dc #2
@@ -1,4 +1,4 @@
|
||||
/// This file has messages for describing environments
|
||||
/// Protobuf definitions for the accounts service.
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
@@ -6,7 +6,7 @@
|
||||
// protoc (unknown)
|
||||
// source: accounts/v1/accounts_v1.proto
|
||||
|
||||
package accounts
|
||||
package v1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
@@ -24,96 +24,6 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type EmailVerified struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Verified bool `protobuf:"varint,1,opt,name=verified,proto3" json:"verified,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *EmailVerified) Reset() {
|
||||
*x = EmailVerified{}
|
||||
mi := &file_accounts_v1_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_v1_accounts_v1_proto_msgTypes[0]
|
||||
if 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_v1_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 {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Contour ID: UUID
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AccountId) Reset() {
|
||||
*x = AccountId{}
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AccountId) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AccountId) ProtoMessage() {}
|
||||
|
||||
func (x *AccountId) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AccountId.ProtoReflect.Descriptor instead.
|
||||
func (*AccountId) Descriptor() ([]byte, []int) {
|
||||
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *AccountId) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type AccountPassword struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
|
||||
@@ -123,7 +33,7 @@ type AccountPassword struct {
|
||||
|
||||
func (x *AccountPassword) Reset() {
|
||||
*x = AccountPassword{}
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[2]
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -135,7 +45,7 @@ func (x *AccountPassword) String() string {
|
||||
func (*AccountPassword) ProtoMessage() {}
|
||||
|
||||
func (x *AccountPassword) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[2]
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -148,7 +58,7 @@ func (x *AccountPassword) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AccountPassword.ProtoReflect.Descriptor instead.
|
||||
func (*AccountPassword) Descriptor() ([]byte, []int) {
|
||||
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{2}
|
||||
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *AccountPassword) GetPassword() string {
|
||||
@@ -168,7 +78,7 @@ type AccountData struct {
|
||||
|
||||
func (x *AccountData) Reset() {
|
||||
*x = AccountData{}
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[3]
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -180,7 +90,7 @@ func (x *AccountData) String() string {
|
||||
func (*AccountData) ProtoMessage() {}
|
||||
|
||||
func (x *AccountData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[3]
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -193,7 +103,7 @@ func (x *AccountData) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AccountData.ProtoReflect.Descriptor instead.
|
||||
func (*AccountData) Descriptor() ([]byte, []int) {
|
||||
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{3}
|
||||
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *AccountData) GetName() string {
|
||||
@@ -210,7 +120,7 @@ func (x *AccountData) GetEmail() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type AccountWithPassword struct {
|
||||
type SignUpRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Data *AccountData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||||
Password *AccountPassword `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
||||
@@ -218,20 +128,123 @@ type AccountWithPassword struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AccountWithPassword) Reset() {
|
||||
*x = AccountWithPassword{}
|
||||
func (x *SignUpRequest) Reset() {
|
||||
*x = SignUpRequest{}
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SignUpRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SignUpRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SignUpRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SignUpRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SignUpRequest) Descriptor() ([]byte, []int) {
|
||||
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *SignUpRequest) GetData() *AccountData {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SignUpRequest) GetPassword() *AccountPassword {
|
||||
if x != nil {
|
||||
return x.Password
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SignInRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
|
||||
Verifier string `protobuf:"bytes,2,opt,name=verifier,proto3" json:"verifier,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SignInRequest) Reset() {
|
||||
*x = SignInRequest{}
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SignInRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SignInRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SignInRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SignInRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SignInRequest) Descriptor() ([]byte, []int) {
|
||||
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *SignInRequest) GetCode() string {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SignInRequest) GetVerifier() string {
|
||||
if x != nil {
|
||||
return x.Verifier
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ResetPasswordRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Data *AccountData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ResetPasswordRequest) Reset() {
|
||||
*x = ResetPasswordRequest{}
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AccountWithPassword) String() string {
|
||||
func (x *ResetPasswordRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AccountWithPassword) ProtoMessage() {}
|
||||
func (*ResetPasswordRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AccountWithPassword) ProtoReflect() protoreflect.Message {
|
||||
func (x *ResetPasswordRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -243,26 +256,19 @@ func (x *AccountWithPassword) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AccountWithPassword.ProtoReflect.Descriptor instead.
|
||||
func (*AccountWithPassword) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use ResetPasswordRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ResetPasswordRequest) Descriptor() ([]byte, []int) {
|
||||
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *AccountWithPassword) GetData() *AccountData {
|
||||
func (x *ResetPasswordRequest) GetData() *AccountData {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *AccountWithPassword) GetPassword() *AccountPassword {
|
||||
if x != nil {
|
||||
return x.Password
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type AccountWithPasswordAndCode struct {
|
||||
type NewPasswordRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Data *AccountData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||||
Password *AccountPassword `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
||||
@@ -271,20 +277,20 @@ type AccountWithPasswordAndCode struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AccountWithPasswordAndCode) Reset() {
|
||||
*x = AccountWithPasswordAndCode{}
|
||||
func (x *NewPasswordRequest) Reset() {
|
||||
*x = NewPasswordRequest{}
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AccountWithPasswordAndCode) String() string {
|
||||
func (x *NewPasswordRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AccountWithPasswordAndCode) ProtoMessage() {}
|
||||
func (*NewPasswordRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AccountWithPasswordAndCode) ProtoReflect() protoreflect.Message {
|
||||
func (x *NewPasswordRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -296,54 +302,53 @@ func (x *AccountWithPasswordAndCode) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AccountWithPasswordAndCode.ProtoReflect.Descriptor instead.
|
||||
func (*AccountWithPasswordAndCode) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use NewPasswordRequest.ProtoReflect.Descriptor instead.
|
||||
func (*NewPasswordRequest) Descriptor() ([]byte, []int) {
|
||||
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *AccountWithPasswordAndCode) GetData() *AccountData {
|
||||
func (x *NewPasswordRequest) GetData() *AccountData {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *AccountWithPasswordAndCode) GetPassword() *AccountPassword {
|
||||
func (x *NewPasswordRequest) GetPassword() *AccountPassword {
|
||||
if x != nil {
|
||||
return x.Password
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *AccountWithPasswordAndCode) GetCode() string {
|
||||
func (x *NewPasswordRequest) GetCode() string {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type AccountFull struct {
|
||||
type IsEmailVerifiedRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id *AccountId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Data *AccountData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
||||
Data *AccountData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AccountFull) Reset() {
|
||||
*x = AccountFull{}
|
||||
func (x *IsEmailVerifiedRequest) Reset() {
|
||||
*x = IsEmailVerifiedRequest{}
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AccountFull) String() string {
|
||||
func (x *IsEmailVerifiedRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AccountFull) ProtoMessage() {}
|
||||
func (*IsEmailVerifiedRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AccountFull) ProtoReflect() protoreflect.Message {
|
||||
func (x *IsEmailVerifiedRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -355,48 +360,39 @@ func (x *AccountFull) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AccountFull.ProtoReflect.Descriptor instead.
|
||||
func (*AccountFull) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use IsEmailVerifiedRequest.ProtoReflect.Descriptor instead.
|
||||
func (*IsEmailVerifiedRequest) Descriptor() ([]byte, []int) {
|
||||
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *AccountFull) GetId() *AccountId {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *AccountFull) GetData() *AccountData {
|
||||
func (x *IsEmailVerifiedRequest) GetData() *AccountData {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type AccountFullWithToken struct {
|
||||
type IsEmailVerifiedResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
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"`
|
||||
Verified bool `protobuf:"varint,1,opt,name=verified,proto3" json:"verified,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AccountFullWithToken) Reset() {
|
||||
*x = AccountFullWithToken{}
|
||||
func (x *IsEmailVerifiedResponse) Reset() {
|
||||
*x = IsEmailVerifiedResponse{}
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AccountFullWithToken) String() string {
|
||||
func (x *IsEmailVerifiedResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AccountFullWithToken) ProtoMessage() {}
|
||||
func (*IsEmailVerifiedResponse) ProtoMessage() {}
|
||||
|
||||
func (x *AccountFullWithToken) ProtoReflect() protoreflect.Message {
|
||||
func (x *IsEmailVerifiedResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -408,66 +404,49 @@ func (x *AccountFullWithToken) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AccountFullWithToken.ProtoReflect.Descriptor instead.
|
||||
func (*AccountFullWithToken) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use IsEmailVerifiedResponse.ProtoReflect.Descriptor instead.
|
||||
func (*IsEmailVerifiedResponse) Descriptor() ([]byte, []int) {
|
||||
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *AccountFullWithToken) GetId() *AccountId {
|
||||
func (x *IsEmailVerifiedResponse) GetVerified() bool {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
return x.Verified
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *AccountFullWithToken) GetData() *AccountData {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *AccountFullWithToken) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
return false
|
||||
}
|
||||
|
||||
var File_accounts_v1_accounts_v1_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_accounts_v1_accounts_v1_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x1daccounts/v1/accounts_v1.proto\x12\baccounts\x1a\x1bgoogle/protobuf/empty.proto\"+\n" +
|
||||
"\rEmailVerified\x12\x1a\n" +
|
||||
"\bverified\x18\x01 \x01(\bR\bverified\"\x1b\n" +
|
||||
"\tAccountId\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\"-\n" +
|
||||
"\x1daccounts/v1/accounts_v1.proto\x12\vaccounts.v1\x1a\x1bgoogle/protobuf/empty.proto\"-\n" +
|
||||
"\x0fAccountPassword\x12\x1a\n" +
|
||||
"\bpassword\x18\x01 \x01(\tR\bpassword\"7\n" +
|
||||
"\vAccountData\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +
|
||||
"\x05email\x18\x02 \x01(\tR\x05email\"w\n" +
|
||||
"\x13AccountWithPassword\x12)\n" +
|
||||
"\x04data\x18\x01 \x01(\v2\x15.accounts.AccountDataR\x04data\x125\n" +
|
||||
"\bpassword\x18\x02 \x01(\v2\x19.accounts.AccountPasswordR\bpassword\"\x92\x01\n" +
|
||||
"\x1aAccountWithPasswordAndCode\x12)\n" +
|
||||
"\x04data\x18\x01 \x01(\v2\x15.accounts.AccountDataR\x04data\x125\n" +
|
||||
"\bpassword\x18\x02 \x01(\v2\x19.accounts.AccountPasswordR\bpassword\x12\x12\n" +
|
||||
"\x04code\x18\x03 \x01(\tR\x04code\"]\n" +
|
||||
"\vAccountFull\x12#\n" +
|
||||
"\x02id\x18\x01 \x01(\v2\x13.accounts.AccountIdR\x02id\x12)\n" +
|
||||
"\x04data\x18\x02 \x01(\v2\x15.accounts.AccountDataR\x04data\"|\n" +
|
||||
"\x14AccountFullWithToken\x12#\n" +
|
||||
"\x02id\x18\x01 \x01(\v2\x13.accounts.AccountIdR\x02id\x12)\n" +
|
||||
"\x04data\x18\x02 \x01(\v2\x15.accounts.AccountDataR\x04data\x12\x14\n" +
|
||||
"\x05token\x18\x03 \x01(\tR\x05token2\xf6\x02\n" +
|
||||
"\bAccounts\x12I\n" +
|
||||
"\x06SignUp\x12\x1d.accounts.AccountWithPassword\x1a\x1e.accounts.AccountFullWithToken\"\x00\x12I\n" +
|
||||
"\x06SignIn\x12\x1d.accounts.AccountWithPassword\x1a\x1e.accounts.AccountFullWithToken\"\x00\x12@\n" +
|
||||
"\rResetPassword\x12\x15.accounts.AccountData\x1a\x16.google.protobuf.Empty\"\x00\x12M\n" +
|
||||
"\vNewPassword\x12$.accounts.AccountWithPasswordAndCode\x1a\x16.google.protobuf.Empty\"\x00\x12C\n" +
|
||||
"\x0fIsEmailVerified\x12\x15.accounts.AccountData\x1a\x17.accounts.EmailVerified\"\x00BFZDgitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/accountsb\x06proto3"
|
||||
"\rSignUpRequest\x12,\n" +
|
||||
"\x04data\x18\x01 \x01(\v2\x18.accounts.v1.AccountDataR\x04data\x128\n" +
|
||||
"\bpassword\x18\x02 \x01(\v2\x1c.accounts.v1.AccountPasswordR\bpassword\"?\n" +
|
||||
"\rSignInRequest\x12\x12\n" +
|
||||
"\x04code\x18\x01 \x01(\tR\x04code\x12\x1a\n" +
|
||||
"\bverifier\x18\x02 \x01(\tR\bverifier\"D\n" +
|
||||
"\x14ResetPasswordRequest\x12,\n" +
|
||||
"\x04data\x18\x01 \x01(\v2\x18.accounts.v1.AccountDataR\x04data\"\x90\x01\n" +
|
||||
"\x12NewPasswordRequest\x12,\n" +
|
||||
"\x04data\x18\x01 \x01(\v2\x18.accounts.v1.AccountDataR\x04data\x128\n" +
|
||||
"\bpassword\x18\x02 \x01(\v2\x1c.accounts.v1.AccountPasswordR\bpassword\x12\x12\n" +
|
||||
"\x04code\x18\x03 \x01(\tR\x04code\"F\n" +
|
||||
"\x16IsEmailVerifiedRequest\x12,\n" +
|
||||
"\x04data\x18\x01 \x01(\v2\x18.accounts.v1.AccountDataR\x04data\"5\n" +
|
||||
"\x17IsEmailVerifiedResponse\x12\x1a\n" +
|
||||
"\bverified\x18\x01 \x01(\bR\bverified2W\n" +
|
||||
"\x15AccountsNoAuthService\x12>\n" +
|
||||
"\x06SignIn\x12\x1a.accounts.v1.SignInRequest\x1a\x16.google.protobuf.Empty\"\x002\xb7\x01\n" +
|
||||
"\x13AccountsAuthService\x12^\n" +
|
||||
"\x0fIsEmailVerified\x12#.accounts.v1.IsEmailVerifiedRequest\x1a$.accounts.v1.IsEmailVerifiedResponse\"\x00\x12@\n" +
|
||||
"\fRefreshToken\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00BIZGgitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/accounts/v1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_accounts_v1_accounts_v1_proto_rawDescOnce sync.Once
|
||||
@@ -483,40 +462,34 @@ func file_accounts_v1_accounts_v1_proto_rawDescGZIP() []byte {
|
||||
|
||||
var file_accounts_v1_accounts_v1_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_accounts_v1_accounts_v1_proto_goTypes = []any{
|
||||
(*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
|
||||
(*AccountPassword)(nil), // 0: accounts.v1.AccountPassword
|
||||
(*AccountData)(nil), // 1: accounts.v1.AccountData
|
||||
(*SignUpRequest)(nil), // 2: accounts.v1.SignUpRequest
|
||||
(*SignInRequest)(nil), // 3: accounts.v1.SignInRequest
|
||||
(*ResetPasswordRequest)(nil), // 4: accounts.v1.ResetPasswordRequest
|
||||
(*NewPasswordRequest)(nil), // 5: accounts.v1.NewPasswordRequest
|
||||
(*IsEmailVerifiedRequest)(nil), // 6: accounts.v1.IsEmailVerifiedRequest
|
||||
(*IsEmailVerifiedResponse)(nil), // 7: accounts.v1.IsEmailVerifiedResponse
|
||||
(*emptypb.Empty)(nil), // 8: google.protobuf.Empty
|
||||
}
|
||||
var file_accounts_v1_accounts_v1_proto_depIdxs = []int32{
|
||||
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
|
||||
1, // 0: accounts.v1.SignUpRequest.data:type_name -> accounts.v1.AccountData
|
||||
0, // 1: accounts.v1.SignUpRequest.password:type_name -> accounts.v1.AccountPassword
|
||||
1, // 2: accounts.v1.ResetPasswordRequest.data:type_name -> accounts.v1.AccountData
|
||||
1, // 3: accounts.v1.NewPasswordRequest.data:type_name -> accounts.v1.AccountData
|
||||
0, // 4: accounts.v1.NewPasswordRequest.password:type_name -> accounts.v1.AccountPassword
|
||||
1, // 5: accounts.v1.IsEmailVerifiedRequest.data:type_name -> accounts.v1.AccountData
|
||||
3, // 6: accounts.v1.AccountsNoAuthService.SignIn:input_type -> accounts.v1.SignInRequest
|
||||
6, // 7: accounts.v1.AccountsAuthService.IsEmailVerified:input_type -> accounts.v1.IsEmailVerifiedRequest
|
||||
8, // 8: accounts.v1.AccountsAuthService.RefreshToken:input_type -> google.protobuf.Empty
|
||||
8, // 9: accounts.v1.AccountsNoAuthService.SignIn:output_type -> google.protobuf.Empty
|
||||
7, // 10: accounts.v1.AccountsAuthService.IsEmailVerified:output_type -> accounts.v1.IsEmailVerifiedResponse
|
||||
8, // 11: accounts.v1.AccountsAuthService.RefreshToken:output_type -> google.protobuf.Empty
|
||||
9, // [9:12] is the sub-list for method output_type
|
||||
6, // [6:9] 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
|
||||
}
|
||||
|
||||
func init() { file_accounts_v1_accounts_v1_proto_init() }
|
||||
@@ -532,7 +505,7 @@ func file_accounts_v1_accounts_v1_proto_init() {
|
||||
NumEnums: 0,
|
||||
NumMessages: 8,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
NumServices: 2,
|
||||
},
|
||||
GoTypes: file_accounts_v1_accounts_v1_proto_goTypes,
|
||||
DependencyIndexes: file_accounts_v1_accounts_v1_proto_depIdxs,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/// This file has messages for describing environments
|
||||
/// Protobuf definitions for the accounts service.
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
@@ -6,7 +6,7 @@
|
||||
// - protoc (unknown)
|
||||
// source: accounts/v1/accounts_v1.proto
|
||||
|
||||
package accounts
|
||||
package v1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@@ -22,257 +22,255 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Accounts_SignUp_FullMethodName = "/accounts.Accounts/SignUp"
|
||||
Accounts_SignIn_FullMethodName = "/accounts.Accounts/SignIn"
|
||||
Accounts_ResetPassword_FullMethodName = "/accounts.Accounts/ResetPassword"
|
||||
Accounts_NewPassword_FullMethodName = "/accounts.Accounts/NewPassword"
|
||||
Accounts_IsEmailVerified_FullMethodName = "/accounts.Accounts/IsEmailVerified"
|
||||
AccountsNoAuthService_SignIn_FullMethodName = "/accounts.v1.AccountsNoAuthService/SignIn"
|
||||
)
|
||||
|
||||
// AccountsClient is the client API for Accounts service.
|
||||
// AccountsNoAuthServiceClient is the client API for AccountsNoAuthService 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.
|
||||
//
|
||||
// *
|
||||
// Service for handling environments
|
||||
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)
|
||||
// Service for handling accounts that do not require authentication
|
||||
type AccountsNoAuthServiceClient interface {
|
||||
// Sing in into an existing account
|
||||
SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
type accountsClient struct {
|
||||
type accountsNoAuthServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAccountsClient(cc grpc.ClientConnInterface) AccountsClient {
|
||||
return &accountsClient{cc}
|
||||
func NewAccountsNoAuthServiceClient(cc grpc.ClientConnInterface) AccountsNoAuthServiceClient {
|
||||
return &accountsNoAuthServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *accountsClient) SignUp(ctx context.Context, in *AccountWithPassword, opts ...grpc.CallOption) (*AccountFullWithToken, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AccountFullWithToken)
|
||||
err := c.cc.Invoke(ctx, Accounts_SignUp_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountsClient) SignIn(ctx context.Context, in *AccountWithPassword, opts ...grpc.CallOption) (*AccountFullWithToken, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AccountFullWithToken)
|
||||
err := c.cc.Invoke(ctx, Accounts_SignIn_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountsClient) ResetPassword(ctx context.Context, in *AccountData, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
func (c *accountsNoAuthServiceClient) SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, Accounts_ResetPassword_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, AccountsNoAuthService_SignIn_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountsClient) NewPassword(ctx context.Context, in *AccountWithPasswordAndCode, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, Accounts_NewPassword_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountsClient) IsEmailVerified(ctx context.Context, in *AccountData, opts ...grpc.CallOption) (*EmailVerified, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(EmailVerified)
|
||||
err := c.cc.Invoke(ctx, Accounts_IsEmailVerified_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AccountsServer is the server API for Accounts service.
|
||||
// All implementations should embed UnimplementedAccountsServer
|
||||
// AccountsNoAuthServiceServer is the server API for AccountsNoAuthService service.
|
||||
// All implementations should embed UnimplementedAccountsNoAuthServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// *
|
||||
// Service for handling environments
|
||||
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)
|
||||
// Service for handling accounts that do not require authentication
|
||||
type AccountsNoAuthServiceServer interface {
|
||||
// Sing in into an existing account
|
||||
SignIn(context.Context, *SignInRequest) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
// UnimplementedAccountsServer should be embedded to have
|
||||
// UnimplementedAccountsNoAuthServiceServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedAccountsServer struct{}
|
||||
type UnimplementedAccountsNoAuthServiceServer struct{}
|
||||
|
||||
func (UnimplementedAccountsServer) SignUp(context.Context, *AccountWithPassword) (*AccountFullWithToken, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SignUp not implemented")
|
||||
}
|
||||
func (UnimplementedAccountsServer) SignIn(context.Context, *AccountWithPassword) (*AccountFullWithToken, error) {
|
||||
func (UnimplementedAccountsNoAuthServiceServer) SignIn(context.Context, *SignInRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SignIn not implemented")
|
||||
}
|
||||
func (UnimplementedAccountsServer) ResetPassword(context.Context, *AccountData) (*emptypb.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ResetPassword not implemented")
|
||||
}
|
||||
func (UnimplementedAccountsServer) NewPassword(context.Context, *AccountWithPasswordAndCode) (*emptypb.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method NewPassword not implemented")
|
||||
}
|
||||
func (UnimplementedAccountsServer) IsEmailVerified(context.Context, *AccountData) (*EmailVerified, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method IsEmailVerified not implemented")
|
||||
}
|
||||
func (UnimplementedAccountsServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedAccountsNoAuthServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAccountsServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AccountsServer will
|
||||
// UnsafeAccountsNoAuthServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AccountsNoAuthServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAccountsServer interface {
|
||||
mustEmbedUnimplementedAccountsServer()
|
||||
type UnsafeAccountsNoAuthServiceServer interface {
|
||||
mustEmbedUnimplementedAccountsNoAuthServiceServer()
|
||||
}
|
||||
|
||||
func RegisterAccountsServer(s grpc.ServiceRegistrar, srv AccountsServer) {
|
||||
// If the following call panics, it indicates UnimplementedAccountsServer was
|
||||
func RegisterAccountsNoAuthServiceServer(s grpc.ServiceRegistrar, srv AccountsNoAuthServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedAccountsNoAuthServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Accounts_ServiceDesc, srv)
|
||||
s.RegisterService(&AccountsNoAuthService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Accounts_SignUp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AccountWithPassword)
|
||||
func _AccountsNoAuthService_SignIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SignInRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountsServer).SignUp(ctx, in)
|
||||
return srv.(AccountsNoAuthServiceServer).SignIn(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Accounts_SignUp_FullMethodName,
|
||||
FullMethod: AccountsNoAuthService_SignIn_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountsServer).SignUp(ctx, req.(*AccountWithPassword))
|
||||
return srv.(AccountsNoAuthServiceServer).SignIn(ctx, req.(*SignInRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Accounts_SignIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AccountWithPassword)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountsServer).SignIn(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Accounts_SignIn_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountsServer).SignIn(ctx, req.(*AccountWithPassword))
|
||||
}
|
||||
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_ResetPassword_FullMethodName,
|
||||
}
|
||||
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_NewPassword_FullMethodName,
|
||||
}
|
||||
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_IsEmailVerified_FullMethodName,
|
||||
}
|
||||
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.
|
||||
// AccountsNoAuthService_ServiceDesc is the grpc.ServiceDesc for AccountsNoAuthService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Accounts_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "accounts.Accounts",
|
||||
HandlerType: (*AccountsServer)(nil),
|
||||
var AccountsNoAuthService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "accounts.v1.AccountsNoAuthService",
|
||||
HandlerType: (*AccountsNoAuthServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "SignUp",
|
||||
Handler: _Accounts_SignUp_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SignIn",
|
||||
Handler: _Accounts_SignIn_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ResetPassword",
|
||||
Handler: _Accounts_ResetPassword_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "NewPassword",
|
||||
Handler: _Accounts_NewPassword_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "IsEmailVerified",
|
||||
Handler: _Accounts_IsEmailVerified_Handler,
|
||||
Handler: _AccountsNoAuthService_SignIn_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "accounts/v1/accounts_v1.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
AccountsAuthService_IsEmailVerified_FullMethodName = "/accounts.v1.AccountsAuthService/IsEmailVerified"
|
||||
AccountsAuthService_RefreshToken_FullMethodName = "/accounts.v1.AccountsAuthService/RefreshToken"
|
||||
)
|
||||
|
||||
// AccountsAuthServiceClient is the client API for AccountsAuthService 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.
|
||||
//
|
||||
// *
|
||||
// Service for handling accounts that do require authentication
|
||||
// Tokens should be sent via metadata, so the service is able to authenticate a user for a request
|
||||
type AccountsAuthServiceClient interface {
|
||||
// Is email for the current account verified
|
||||
IsEmailVerified(ctx context.Context, in *IsEmailVerifiedRequest, opts ...grpc.CallOption) (*IsEmailVerifiedResponse, error)
|
||||
RefreshToken(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
type accountsAuthServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAccountsAuthServiceClient(cc grpc.ClientConnInterface) AccountsAuthServiceClient {
|
||||
return &accountsAuthServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *accountsAuthServiceClient) IsEmailVerified(ctx context.Context, in *IsEmailVerifiedRequest, opts ...grpc.CallOption) (*IsEmailVerifiedResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(IsEmailVerifiedResponse)
|
||||
err := c.cc.Invoke(ctx, AccountsAuthService_IsEmailVerified_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountsAuthServiceClient) RefreshToken(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, AccountsAuthService_RefreshToken_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AccountsAuthServiceServer is the server API for AccountsAuthService service.
|
||||
// All implementations should embed UnimplementedAccountsAuthServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// *
|
||||
// Service for handling accounts that do require authentication
|
||||
// Tokens should be sent via metadata, so the service is able to authenticate a user for a request
|
||||
type AccountsAuthServiceServer interface {
|
||||
// Is email for the current account verified
|
||||
IsEmailVerified(context.Context, *IsEmailVerifiedRequest) (*IsEmailVerifiedResponse, error)
|
||||
RefreshToken(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
// UnimplementedAccountsAuthServiceServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedAccountsAuthServiceServer struct{}
|
||||
|
||||
func (UnimplementedAccountsAuthServiceServer) IsEmailVerified(context.Context, *IsEmailVerifiedRequest) (*IsEmailVerifiedResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method IsEmailVerified not implemented")
|
||||
}
|
||||
func (UnimplementedAccountsAuthServiceServer) RefreshToken(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method RefreshToken not implemented")
|
||||
}
|
||||
func (UnimplementedAccountsAuthServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAccountsAuthServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AccountsAuthServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAccountsAuthServiceServer interface {
|
||||
mustEmbedUnimplementedAccountsAuthServiceServer()
|
||||
}
|
||||
|
||||
func RegisterAccountsAuthServiceServer(s grpc.ServiceRegistrar, srv AccountsAuthServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedAccountsAuthServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&AccountsAuthService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _AccountsAuthService_IsEmailVerified_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IsEmailVerifiedRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountsAuthServiceServer).IsEmailVerified(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AccountsAuthService_IsEmailVerified_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountsAuthServiceServer).IsEmailVerified(ctx, req.(*IsEmailVerifiedRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountsAuthService_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountsAuthServiceServer).RefreshToken(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AccountsAuthService_RefreshToken_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountsAuthServiceServer).RefreshToken(ctx, req.(*emptypb.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AccountsAuthService_ServiceDesc is the grpc.ServiceDesc for AccountsAuthService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var AccountsAuthService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "accounts.v1.AccountsAuthService",
|
||||
HandlerType: (*AccountsAuthServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "IsEmailVerified",
|
||||
Handler: _AccountsAuthService_IsEmailVerified_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RefreshToken",
|
||||
Handler: _AccountsAuthService_RefreshToken_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
|
||||
@@ -173,9 +173,10 @@ const file_test_v1_test_v1_proto_rawDesc = "" +
|
||||
"\vPingRequest\"\x0e\n" +
|
||||
"\fPingResponse\"\r\n" +
|
||||
"\vPongRequest\"\x0e\n" +
|
||||
"\fPongResponse2{\n" +
|
||||
"\vTestService\x125\n" +
|
||||
"\x04Ping\x12\x14.test.v1.PingRequest\x1a\x15.test.v1.PingResponse\"\x00\x125\n" +
|
||||
"\fPongResponse2J\n" +
|
||||
"\x11TestNoAuthService\x125\n" +
|
||||
"\x04Ping\x12\x14.test.v1.PingRequest\x1a\x15.test.v1.PingResponse\"\x002H\n" +
|
||||
"\x0fTestAuthService\x125\n" +
|
||||
"\x04Pong\x12\x14.test.v1.PongRequest\x1a\x15.test.v1.PongResponse\"\x00BEZCgitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/test/v1b\x06proto3"
|
||||
|
||||
var (
|
||||
@@ -198,10 +199,10 @@ var file_test_v1_test_v1_proto_goTypes = []any{
|
||||
(*PongResponse)(nil), // 3: test.v1.PongResponse
|
||||
}
|
||||
var file_test_v1_test_v1_proto_depIdxs = []int32{
|
||||
0, // 0: test.v1.TestService.Ping:input_type -> test.v1.PingRequest
|
||||
2, // 1: test.v1.TestService.Pong:input_type -> test.v1.PongRequest
|
||||
1, // 2: test.v1.TestService.Ping:output_type -> test.v1.PingResponse
|
||||
3, // 3: test.v1.TestService.Pong:output_type -> test.v1.PongResponse
|
||||
0, // 0: test.v1.TestNoAuthService.Ping:input_type -> test.v1.PingRequest
|
||||
2, // 1: test.v1.TestAuthService.Pong:input_type -> test.v1.PongRequest
|
||||
1, // 2: test.v1.TestNoAuthService.Ping:output_type -> test.v1.PingResponse
|
||||
3, // 3: test.v1.TestAuthService.Pong:output_type -> test.v1.PongResponse
|
||||
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
|
||||
@@ -222,7 +223,7 @@ func file_test_v1_test_v1_proto_init() {
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
NumServices: 2,
|
||||
},
|
||||
GoTypes: file_test_v1_test_v1_proto_goTypes,
|
||||
DependencyIndexes: file_test_v1_test_v1_proto_depIdxs,
|
||||
|
||||
@@ -19,143 +19,205 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
TestService_Ping_FullMethodName = "/test.v1.TestService/Ping"
|
||||
TestService_Pong_FullMethodName = "/test.v1.TestService/Pong"
|
||||
TestNoAuthService_Ping_FullMethodName = "/test.v1.TestNoAuthService/Ping"
|
||||
)
|
||||
|
||||
// TestServiceClient is the client API for TestService service.
|
||||
// TestNoAuthServiceClient is the client API for TestNoAuthService 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.
|
||||
//
|
||||
// *
|
||||
// Service for handling environments
|
||||
type TestServiceClient interface {
|
||||
type TestNoAuthServiceClient interface {
|
||||
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
|
||||
Pong(ctx context.Context, in *PongRequest, opts ...grpc.CallOption) (*PongResponse, error)
|
||||
}
|
||||
|
||||
type testServiceClient struct {
|
||||
type testNoAuthServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewTestServiceClient(cc grpc.ClientConnInterface) TestServiceClient {
|
||||
return &testServiceClient{cc}
|
||||
func NewTestNoAuthServiceClient(cc grpc.ClientConnInterface) TestNoAuthServiceClient {
|
||||
return &testNoAuthServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *testServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) {
|
||||
func (c *testNoAuthServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PingResponse)
|
||||
err := c.cc.Invoke(ctx, TestService_Ping_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, TestNoAuthService_Ping_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *testServiceClient) Pong(ctx context.Context, in *PongRequest, opts ...grpc.CallOption) (*PongResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PongResponse)
|
||||
err := c.cc.Invoke(ctx, TestService_Pong_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// TestServiceServer is the server API for TestService service.
|
||||
// All implementations should embed UnimplementedTestServiceServer
|
||||
// TestNoAuthServiceServer is the server API for TestNoAuthService service.
|
||||
// All implementations should embed UnimplementedTestNoAuthServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// *
|
||||
// Service for handling environments
|
||||
type TestServiceServer interface {
|
||||
type TestNoAuthServiceServer interface {
|
||||
Ping(context.Context, *PingRequest) (*PingResponse, error)
|
||||
Pong(context.Context, *PongRequest) (*PongResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedTestServiceServer should be embedded to have
|
||||
// UnimplementedTestNoAuthServiceServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedTestServiceServer struct{}
|
||||
type UnimplementedTestNoAuthServiceServer struct{}
|
||||
|
||||
func (UnimplementedTestServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) {
|
||||
func (UnimplementedTestNoAuthServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Ping not implemented")
|
||||
}
|
||||
func (UnimplementedTestServiceServer) Pong(context.Context, *PongRequest) (*PongResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Pong not implemented")
|
||||
}
|
||||
func (UnimplementedTestServiceServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedTestNoAuthServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to TestServiceServer will
|
||||
// UnsafeTestNoAuthServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to TestNoAuthServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeTestServiceServer interface {
|
||||
mustEmbedUnimplementedTestServiceServer()
|
||||
type UnsafeTestNoAuthServiceServer interface {
|
||||
mustEmbedUnimplementedTestNoAuthServiceServer()
|
||||
}
|
||||
|
||||
func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedTestServiceServer was
|
||||
func RegisterTestNoAuthServiceServer(s grpc.ServiceRegistrar, srv TestNoAuthServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedTestNoAuthServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&TestService_ServiceDesc, srv)
|
||||
s.RegisterService(&TestNoAuthService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _TestService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _TestNoAuthService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PingRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TestServiceServer).Ping(ctx, in)
|
||||
return srv.(TestNoAuthServiceServer).Ping(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: TestService_Ping_FullMethodName,
|
||||
FullMethod: TestNoAuthService_Ping_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TestServiceServer).Ping(ctx, req.(*PingRequest))
|
||||
return srv.(TestNoAuthServiceServer).Ping(ctx, req.(*PingRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TestService_Pong_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PongRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TestServiceServer).Pong(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: TestService_Pong_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TestServiceServer).Pong(ctx, req.(*PongRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// TestService_ServiceDesc is the grpc.ServiceDesc for TestService service.
|
||||
// TestNoAuthService_ServiceDesc is the grpc.ServiceDesc for TestNoAuthService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var TestService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "test.v1.TestService",
|
||||
HandlerType: (*TestServiceServer)(nil),
|
||||
var TestNoAuthService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "test.v1.TestNoAuthService",
|
||||
HandlerType: (*TestNoAuthServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Ping",
|
||||
Handler: _TestService_Ping_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Pong",
|
||||
Handler: _TestService_Pong_Handler,
|
||||
Handler: _TestNoAuthService_Ping_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "test/v1/test_v1.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
TestAuthService_Pong_FullMethodName = "/test.v1.TestAuthService/Pong"
|
||||
)
|
||||
|
||||
// TestAuthServiceClient is the client API for TestAuthService 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 TestAuthServiceClient interface {
|
||||
Pong(ctx context.Context, in *PongRequest, opts ...grpc.CallOption) (*PongResponse, error)
|
||||
}
|
||||
|
||||
type testAuthServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewTestAuthServiceClient(cc grpc.ClientConnInterface) TestAuthServiceClient {
|
||||
return &testAuthServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *testAuthServiceClient) Pong(ctx context.Context, in *PongRequest, opts ...grpc.CallOption) (*PongResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PongResponse)
|
||||
err := c.cc.Invoke(ctx, TestAuthService_Pong_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// TestAuthServiceServer is the server API for TestAuthService service.
|
||||
// All implementations should embed UnimplementedTestAuthServiceServer
|
||||
// for forward compatibility.
|
||||
type TestAuthServiceServer interface {
|
||||
Pong(context.Context, *PongRequest) (*PongResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedTestAuthServiceServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedTestAuthServiceServer struct{}
|
||||
|
||||
func (UnimplementedTestAuthServiceServer) Pong(context.Context, *PongRequest) (*PongResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Pong not implemented")
|
||||
}
|
||||
func (UnimplementedTestAuthServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeTestAuthServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to TestAuthServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeTestAuthServiceServer interface {
|
||||
mustEmbedUnimplementedTestAuthServiceServer()
|
||||
}
|
||||
|
||||
func RegisterTestAuthServiceServer(s grpc.ServiceRegistrar, srv TestAuthServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedTestAuthServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&TestAuthService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _TestAuthService_Pong_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PongRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TestAuthServiceServer).Pong(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: TestAuthService_Pong_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TestAuthServiceServer).Pong(ctx, req.(*PongRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// TestAuthService_ServiceDesc is the grpc.ServiceDesc for TestAuthService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var TestAuthService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "test.v1.TestAuthService",
|
||||
HandlerType: (*TestAuthServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Pong",
|
||||
Handler: _TestAuthService_Pong_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
|
||||
Reference in New Issue
Block a user