Update protobuf definitions: 1d3ceb07

By allanger

Commit link: 1d3ceb07da

Pipeline link: https://ci.badhouseplants.net/repos/34/pipeline/30
This commit is contained in:
2026-04-23 18:02:38 +00:00
parent f1512e3f4c
commit 53a8a976b5
8 changed files with 3669 additions and 0 deletions

View File

@@ -0,0 +1,544 @@
/// This file has messages for describing environments
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: accounts/v1/accounts_v1.proto
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"
unsafe "unsafe"
)
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 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"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AccountPassword) Reset() {
*x = AccountPassword{}
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AccountPassword) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AccountPassword) ProtoMessage() {}
func (x *AccountPassword) 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 AccountPassword.ProtoReflect.Descriptor instead.
func (*AccountPassword) Descriptor() ([]byte, []int) {
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{2}
}
func (x *AccountPassword) GetPassword() string {
if x != nil {
return x.Password
}
return ""
}
type AccountData struct {
state protoimpl.MessageState `protogen:"open.v1"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Account name
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // Account email
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AccountData) Reset() {
*x = AccountData{}
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AccountData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AccountData) ProtoMessage() {}
func (x *AccountData) 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 AccountData.ProtoReflect.Descriptor instead.
func (*AccountData) Descriptor() ([]byte, []int) {
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{3}
}
func (x *AccountData) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *AccountData) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
type AccountWithPassword 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"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AccountWithPassword) Reset() {
*x = AccountWithPassword{}
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AccountWithPassword) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AccountWithPassword) ProtoMessage() {}
func (x *AccountWithPassword) ProtoReflect() protoreflect.Message {
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[4]
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 AccountWithPassword.ProtoReflect.Descriptor instead.
func (*AccountWithPassword) Descriptor() ([]byte, []int) {
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{4}
}
func (x *AccountWithPassword) 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 {
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"`
Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AccountWithPasswordAndCode) Reset() {
*x = AccountWithPasswordAndCode{}
mi := &file_accounts_v1_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_v1_accounts_v1_proto_msgTypes[5]
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 AccountWithPasswordAndCode.ProtoReflect.Descriptor instead.
func (*AccountWithPasswordAndCode) Descriptor() ([]byte, []int) {
return file_accounts_v1_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 `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"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AccountFull) Reset() {
*x = AccountFull{}
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AccountFull) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AccountFull) ProtoMessage() {}
func (x *AccountFull) ProtoReflect() protoreflect.Message {
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[6]
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 AccountFull.ProtoReflect.Descriptor instead.
func (*AccountFull) 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 {
if x != nil {
return x.Data
}
return nil
}
type AccountFullWithToken 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"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AccountFullWithToken) Reset() {
*x = AccountFullWithToken{}
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AccountFullWithToken) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AccountFullWithToken) ProtoMessage() {}
func (x *AccountFullWithToken) ProtoReflect() protoreflect.Message {
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[7]
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 AccountFullWithToken.ProtoReflect.Descriptor instead.
func (*AccountFullWithToken) Descriptor() ([]byte, []int) {
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{7}
}
func (x *AccountFullWithToken) GetId() *AccountId {
if x != nil {
return x.Id
}
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 ""
}
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" +
"\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"
var (
file_accounts_v1_accounts_v1_proto_rawDescOnce sync.Once
file_accounts_v1_accounts_v1_proto_rawDescData []byte
)
func file_accounts_v1_accounts_v1_proto_rawDescGZIP() []byte {
file_accounts_v1_accounts_v1_proto_rawDescOnce.Do(func() {
file_accounts_v1_accounts_v1_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_accounts_v1_accounts_v1_proto_rawDesc), len(file_accounts_v1_accounts_v1_proto_rawDesc)))
})
return file_accounts_v1_accounts_v1_proto_rawDescData
}
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
}
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
}
func init() { file_accounts_v1_accounts_v1_proto_init() }
func file_accounts_v1_accounts_v1_proto_init() {
if File_accounts_v1_accounts_v1_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_accounts_v1_accounts_v1_proto_rawDesc), len(file_accounts_v1_accounts_v1_proto_rawDesc)),
NumEnums: 0,
NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_accounts_v1_accounts_v1_proto_goTypes,
DependencyIndexes: file_accounts_v1_accounts_v1_proto_depIdxs,
MessageInfos: file_accounts_v1_accounts_v1_proto_msgTypes,
}.Build()
File_accounts_v1_accounts_v1_proto = out.File
file_accounts_v1_accounts_v1_proto_goTypes = nil
file_accounts_v1_accounts_v1_proto_depIdxs = nil
}

View File

@@ -0,0 +1,280 @@
/// This file has messages for describing environments
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc (unknown)
// source: accounts/v1/accounts_v1.proto
package accounts
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.64.0 or later.
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"
)
// AccountsClient is the client API for Accounts 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)
}
type accountsClient struct {
cc grpc.ClientConnInterface
}
func NewAccountsClient(cc grpc.ClientConnInterface) AccountsClient {
return &accountsClient{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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Accounts_ResetPassword_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
// 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)
}
// UnimplementedAccountsServer 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{}
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) {
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() {}
// 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
// result in compilation errors.
type UnsafeAccountsServer interface {
mustEmbedUnimplementedAccountsServer()
}
func RegisterAccountsServer(s grpc.ServiceRegistrar, srv AccountsServer) {
// If the following call panics, it indicates UnimplementedAccountsServer 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)
}
func _Accounts_SignUp_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).SignUp(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Accounts_SignUp_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountsServer).SignUp(ctx, req.(*AccountWithPassword))
}
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.
// 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),
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,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "accounts/v1/accounts_v1.proto",
}

View File

@@ -0,0 +1,840 @@
/// This file has messages for describing applications
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: applications/v1/applications_v1.proto
package applications
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"
unsafe "unsafe"
)
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 OwnerId struct {
state protoimpl.MessageState `protogen:"open.v1"`
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // UUID of a user that is creating an environemnt
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *OwnerId) Reset() {
*x = OwnerId{}
mi := &file_applications_v1_applications_v1_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *OwnerId) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OwnerId) ProtoMessage() {}
func (x *OwnerId) ProtoReflect() protoreflect.Message {
mi := &file_applications_v1_applications_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 OwnerId.ProtoReflect.Descriptor instead.
func (*OwnerId) Descriptor() ([]byte, []int) {
return file_applications_v1_applications_v1_proto_rawDescGZIP(), []int{0}
}
func (x *OwnerId) GetUuid() string {
if x != nil {
return x.Uuid
}
return ""
}
type Token struct {
state protoimpl.MessageState `protogen:"open.v1"`
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // Token that should be used to create an environment
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Token) Reset() {
*x = Token{}
mi := &file_applications_v1_applications_v1_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Token) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Token) ProtoMessage() {}
func (x *Token) ProtoReflect() protoreflect.Message {
mi := &file_applications_v1_applications_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 Token.ProtoReflect.Descriptor instead.
func (*Token) Descriptor() ([]byte, []int) {
return file_applications_v1_applications_v1_proto_rawDescGZIP(), []int{1}
}
func (x *Token) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
type CreateOptions struct {
state protoimpl.MessageState `protogen:"open.v1"`
Metadata *ApplicationMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
Spec *ApplicationSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
OwnerId *OwnerId `protobuf:"bytes,3,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
Token *Token `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateOptions) Reset() {
*x = CreateOptions{}
mi := &file_applications_v1_applications_v1_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateOptions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateOptions) ProtoMessage() {}
func (x *CreateOptions) ProtoReflect() protoreflect.Message {
mi := &file_applications_v1_applications_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 CreateOptions.ProtoReflect.Descriptor instead.
func (*CreateOptions) Descriptor() ([]byte, []int) {
return file_applications_v1_applications_v1_proto_rawDescGZIP(), []int{2}
}
func (x *CreateOptions) GetMetadata() *ApplicationMetadata {
if x != nil {
return x.Metadata
}
return nil
}
func (x *CreateOptions) GetSpec() *ApplicationSpec {
if x != nil {
return x.Spec
}
return nil
}
func (x *CreateOptions) GetOwnerId() *OwnerId {
if x != nil {
return x.OwnerId
}
return nil
}
func (x *CreateOptions) GetToken() *Token {
if x != nil {
return x.Token
}
return nil
}
type UpdateOptions struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id *ApplicationId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Metadata *ApplicationMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
Spec *ApplicationSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"`
OwnerId *OwnerId `protobuf:"bytes,4,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
Token *Token `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UpdateOptions) Reset() {
*x = UpdateOptions{}
mi := &file_applications_v1_applications_v1_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UpdateOptions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateOptions) ProtoMessage() {}
func (x *UpdateOptions) ProtoReflect() protoreflect.Message {
mi := &file_applications_v1_applications_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 UpdateOptions.ProtoReflect.Descriptor instead.
func (*UpdateOptions) Descriptor() ([]byte, []int) {
return file_applications_v1_applications_v1_proto_rawDescGZIP(), []int{3}
}
func (x *UpdateOptions) GetId() *ApplicationId {
if x != nil {
return x.Id
}
return nil
}
func (x *UpdateOptions) GetMetadata() *ApplicationMetadata {
if x != nil {
return x.Metadata
}
return nil
}
func (x *UpdateOptions) GetSpec() *ApplicationSpec {
if x != nil {
return x.Spec
}
return nil
}
func (x *UpdateOptions) GetOwnerId() *OwnerId {
if x != nil {
return x.OwnerId
}
return nil
}
func (x *UpdateOptions) GetToken() *Token {
if x != nil {
return x.Token
}
return nil
}
type DeleteOptions struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id *ApplicationId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Metadata *ApplicationMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
OwnerId *OwnerId `protobuf:"bytes,3,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
Token *Token `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeleteOptions) Reset() {
*x = DeleteOptions{}
mi := &file_applications_v1_applications_v1_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeleteOptions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteOptions) ProtoMessage() {}
func (x *DeleteOptions) ProtoReflect() protoreflect.Message {
mi := &file_applications_v1_applications_v1_proto_msgTypes[4]
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 DeleteOptions.ProtoReflect.Descriptor instead.
func (*DeleteOptions) Descriptor() ([]byte, []int) {
return file_applications_v1_applications_v1_proto_rawDescGZIP(), []int{4}
}
func (x *DeleteOptions) GetId() *ApplicationId {
if x != nil {
return x.Id
}
return nil
}
func (x *DeleteOptions) GetMetadata() *ApplicationMetadata {
if x != nil {
return x.Metadata
}
return nil
}
func (x *DeleteOptions) GetOwnerId() *OwnerId {
if x != nil {
return x.OwnerId
}
return nil
}
func (x *DeleteOptions) GetToken() *Token {
if x != nil {
return x.Token
}
return nil
}
type GetOptions struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id *ApplicationId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Metadata *ApplicationMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
OwnerId *OwnerId `protobuf:"bytes,3,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
Token *Token `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetOptions) Reset() {
*x = GetOptions{}
mi := &file_applications_v1_applications_v1_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetOptions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetOptions) ProtoMessage() {}
func (x *GetOptions) ProtoReflect() protoreflect.Message {
mi := &file_applications_v1_applications_v1_proto_msgTypes[5]
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 GetOptions.ProtoReflect.Descriptor instead.
func (*GetOptions) Descriptor() ([]byte, []int) {
return file_applications_v1_applications_v1_proto_rawDescGZIP(), []int{5}
}
func (x *GetOptions) GetId() *ApplicationId {
if x != nil {
return x.Id
}
return nil
}
func (x *GetOptions) GetMetadata() *ApplicationMetadata {
if x != nil {
return x.Metadata
}
return nil
}
func (x *GetOptions) GetOwnerId() *OwnerId {
if x != nil {
return x.OwnerId
}
return nil
}
func (x *GetOptions) GetToken() *Token {
if x != nil {
return x.Token
}
return nil
}
type ListOptions struct {
state protoimpl.MessageState `protogen:"open.v1"`
Metadata *ApplicationMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
OwnerId *OwnerId `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
Token *Token `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ListOptions) Reset() {
*x = ListOptions{}
mi := &file_applications_v1_applications_v1_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ListOptions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListOptions) ProtoMessage() {}
func (x *ListOptions) ProtoReflect() protoreflect.Message {
mi := &file_applications_v1_applications_v1_proto_msgTypes[6]
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 ListOptions.ProtoReflect.Descriptor instead.
func (*ListOptions) Descriptor() ([]byte, []int) {
return file_applications_v1_applications_v1_proto_rawDescGZIP(), []int{6}
}
func (x *ListOptions) GetMetadata() *ApplicationMetadata {
if x != nil {
return x.Metadata
}
return nil
}
func (x *ListOptions) GetOwnerId() *OwnerId {
if x != nil {
return x.OwnerId
}
return nil
}
func (x *ListOptions) GetToken() *Token {
if x != nil {
return x.Token
}
return nil
}
type ApplicationId struct {
state protoimpl.MessageState `protogen:"open.v1"`
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ApplicationId) Reset() {
*x = ApplicationId{}
mi := &file_applications_v1_applications_v1_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ApplicationId) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ApplicationId) ProtoMessage() {}
func (x *ApplicationId) ProtoReflect() protoreflect.Message {
mi := &file_applications_v1_applications_v1_proto_msgTypes[7]
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 ApplicationId.ProtoReflect.Descriptor instead.
func (*ApplicationId) Descriptor() ([]byte, []int) {
return file_applications_v1_applications_v1_proto_rawDescGZIP(), []int{7}
}
func (x *ApplicationId) GetUuid() string {
if x != nil {
return x.Uuid
}
return ""
}
type ApplicationMetadata struct {
state protoimpl.MessageState `protogen:"open.v1"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ApplicationMetadata) Reset() {
*x = ApplicationMetadata{}
mi := &file_applications_v1_applications_v1_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ApplicationMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ApplicationMetadata) ProtoMessage() {}
func (x *ApplicationMetadata) ProtoReflect() protoreflect.Message {
mi := &file_applications_v1_applications_v1_proto_msgTypes[8]
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 ApplicationMetadata.ProtoReflect.Descriptor instead.
func (*ApplicationMetadata) Descriptor() ([]byte, []int) {
return file_applications_v1_applications_v1_proto_rawDescGZIP(), []int{8}
}
func (x *ApplicationMetadata) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *ApplicationMetadata) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
type ApplicationSpec struct {
state protoimpl.MessageState `protogen:"open.v1"`
Application string `protobuf:"bytes,1,opt,name=application,proto3" json:"application,omitempty"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
EnvironemntId string `protobuf:"bytes,3,opt,name=environemnt_id,json=environemntId,proto3" json:"environemnt_id,omitempty"`
Config map[string]string `protobuf:"bytes,4,rep,name=config,proto3" json:"config,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
RawConfig string `protobuf:"bytes,5,opt,name=raw_config,json=rawConfig,proto3" json:"raw_config,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ApplicationSpec) Reset() {
*x = ApplicationSpec{}
mi := &file_applications_v1_applications_v1_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ApplicationSpec) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ApplicationSpec) ProtoMessage() {}
func (x *ApplicationSpec) ProtoReflect() protoreflect.Message {
mi := &file_applications_v1_applications_v1_proto_msgTypes[9]
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 ApplicationSpec.ProtoReflect.Descriptor instead.
func (*ApplicationSpec) Descriptor() ([]byte, []int) {
return file_applications_v1_applications_v1_proto_rawDescGZIP(), []int{9}
}
func (x *ApplicationSpec) GetApplication() string {
if x != nil {
return x.Application
}
return ""
}
func (x *ApplicationSpec) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *ApplicationSpec) GetEnvironemntId() string {
if x != nil {
return x.EnvironemntId
}
return ""
}
func (x *ApplicationSpec) GetConfig() map[string]string {
if x != nil {
return x.Config
}
return nil
}
func (x *ApplicationSpec) GetRawConfig() string {
if x != nil {
return x.RawConfig
}
return ""
}
type ApplicationFull struct {
state protoimpl.MessageState `protogen:"open.v1"`
Metadata *ApplicationMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
Spec *ApplicationSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
Id *ApplicationId `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ApplicationFull) Reset() {
*x = ApplicationFull{}
mi := &file_applications_v1_applications_v1_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ApplicationFull) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ApplicationFull) ProtoMessage() {}
func (x *ApplicationFull) ProtoReflect() protoreflect.Message {
mi := &file_applications_v1_applications_v1_proto_msgTypes[10]
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 ApplicationFull.ProtoReflect.Descriptor instead.
func (*ApplicationFull) Descriptor() ([]byte, []int) {
return file_applications_v1_applications_v1_proto_rawDescGZIP(), []int{10}
}
func (x *ApplicationFull) GetMetadata() *ApplicationMetadata {
if x != nil {
return x.Metadata
}
return nil
}
func (x *ApplicationFull) GetSpec() *ApplicationSpec {
if x != nil {
return x.Spec
}
return nil
}
func (x *ApplicationFull) GetId() *ApplicationId {
if x != nil {
return x.Id
}
return nil
}
var File_applications_v1_applications_v1_proto protoreflect.FileDescriptor
const file_applications_v1_applications_v1_proto_rawDesc = "" +
"\n" +
"%applications/v1/applications_v1.proto\x12\fapplications\x1a\x1bgoogle/protobuf/empty.proto\"\x1d\n" +
"\aOwnerId\x12\x12\n" +
"\x04uuid\x18\x01 \x01(\tR\x04uuid\"\x1d\n" +
"\x05Token\x12\x14\n" +
"\x05token\x18\x01 \x01(\tR\x05token\"\xde\x01\n" +
"\rCreateOptions\x12=\n" +
"\bmetadata\x18\x01 \x01(\v2!.applications.ApplicationMetadataR\bmetadata\x121\n" +
"\x04spec\x18\x02 \x01(\v2\x1d.applications.ApplicationSpecR\x04spec\x120\n" +
"\bowner_id\x18\x03 \x01(\v2\x15.applications.OwnerIdR\aownerId\x12)\n" +
"\x05token\x18\x04 \x01(\v2\x13.applications.TokenR\x05token\"\x8b\x02\n" +
"\rUpdateOptions\x12+\n" +
"\x02id\x18\x01 \x01(\v2\x1b.applications.ApplicationIdR\x02id\x12=\n" +
"\bmetadata\x18\x02 \x01(\v2!.applications.ApplicationMetadataR\bmetadata\x121\n" +
"\x04spec\x18\x03 \x01(\v2\x1d.applications.ApplicationSpecR\x04spec\x120\n" +
"\bowner_id\x18\x04 \x01(\v2\x15.applications.OwnerIdR\aownerId\x12)\n" +
"\x05token\x18\x05 \x01(\v2\x13.applications.TokenR\x05token\"\xd8\x01\n" +
"\rDeleteOptions\x12+\n" +
"\x02id\x18\x01 \x01(\v2\x1b.applications.ApplicationIdR\x02id\x12=\n" +
"\bmetadata\x18\x02 \x01(\v2!.applications.ApplicationMetadataR\bmetadata\x120\n" +
"\bowner_id\x18\x03 \x01(\v2\x15.applications.OwnerIdR\aownerId\x12)\n" +
"\x05token\x18\x04 \x01(\v2\x13.applications.TokenR\x05token\"\xd5\x01\n" +
"\n" +
"GetOptions\x12+\n" +
"\x02id\x18\x01 \x01(\v2\x1b.applications.ApplicationIdR\x02id\x12=\n" +
"\bmetadata\x18\x02 \x01(\v2!.applications.ApplicationMetadataR\bmetadata\x120\n" +
"\bowner_id\x18\x03 \x01(\v2\x15.applications.OwnerIdR\aownerId\x12)\n" +
"\x05token\x18\x04 \x01(\v2\x13.applications.TokenR\x05token\"\xa9\x01\n" +
"\vListOptions\x12=\n" +
"\bmetadata\x18\x01 \x01(\v2!.applications.ApplicationMetadataR\bmetadata\x120\n" +
"\bowner_id\x18\x02 \x01(\v2\x15.applications.OwnerIdR\aownerId\x12)\n" +
"\x05token\x18\x03 \x01(\v2\x13.applications.TokenR\x05token\"#\n" +
"\rApplicationId\x12\x12\n" +
"\x04uuid\x18\x01 \x01(\tR\x04uuid\"K\n" +
"\x13ApplicationMetadata\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12 \n" +
"\vdescription\x18\x02 \x01(\tR\vdescription\"\x91\x02\n" +
"\x0fApplicationSpec\x12 \n" +
"\vapplication\x18\x01 \x01(\tR\vapplication\x12\x18\n" +
"\aversion\x18\x02 \x01(\tR\aversion\x12%\n" +
"\x0eenvironemnt_id\x18\x03 \x01(\tR\renvironemntId\x12A\n" +
"\x06config\x18\x04 \x03(\v2).applications.ApplicationSpec.ConfigEntryR\x06config\x12\x1d\n" +
"\n" +
"raw_config\x18\x05 \x01(\tR\trawConfig\x1a9\n" +
"\vConfigEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xb0\x01\n" +
"\x0fApplicationFull\x12=\n" +
"\bmetadata\x18\x01 \x01(\v2!.applications.ApplicationMetadataR\bmetadata\x121\n" +
"\x04spec\x18\x02 \x01(\v2\x1d.applications.ApplicationSpecR\x04spec\x12+\n" +
"\x02id\x18\x03 \x01(\v2\x1b.applications.ApplicationIdR\x02id2\xe7\x02\n" +
"\fApplications\x12F\n" +
"\x06Create\x12\x1b.applications.CreateOptions\x1a\x1d.applications.ApplicationFull\"\x00\x12F\n" +
"\x06Update\x12\x1b.applications.UpdateOptions\x1a\x1d.applications.ApplicationFull\"\x00\x12?\n" +
"\x06Delete\x12\x1b.applications.DeleteOptions\x1a\x16.google.protobuf.Empty\"\x00\x12@\n" +
"\x03Get\x12\x18.applications.GetOptions\x1a\x1d.applications.ApplicationFull\"\x00\x12D\n" +
"\x04List\x12\x19.applications.ListOptions\x1a\x1d.applications.ApplicationFull\"\x000\x01BJZHgitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/applicationsb\x06proto3"
var (
file_applications_v1_applications_v1_proto_rawDescOnce sync.Once
file_applications_v1_applications_v1_proto_rawDescData []byte
)
func file_applications_v1_applications_v1_proto_rawDescGZIP() []byte {
file_applications_v1_applications_v1_proto_rawDescOnce.Do(func() {
file_applications_v1_applications_v1_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_applications_v1_applications_v1_proto_rawDesc), len(file_applications_v1_applications_v1_proto_rawDesc)))
})
return file_applications_v1_applications_v1_proto_rawDescData
}
var file_applications_v1_applications_v1_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_applications_v1_applications_v1_proto_goTypes = []any{
(*OwnerId)(nil), // 0: applications.OwnerId
(*Token)(nil), // 1: applications.Token
(*CreateOptions)(nil), // 2: applications.CreateOptions
(*UpdateOptions)(nil), // 3: applications.UpdateOptions
(*DeleteOptions)(nil), // 4: applications.DeleteOptions
(*GetOptions)(nil), // 5: applications.GetOptions
(*ListOptions)(nil), // 6: applications.ListOptions
(*ApplicationId)(nil), // 7: applications.ApplicationId
(*ApplicationMetadata)(nil), // 8: applications.ApplicationMetadata
(*ApplicationSpec)(nil), // 9: applications.ApplicationSpec
(*ApplicationFull)(nil), // 10: applications.ApplicationFull
nil, // 11: applications.ApplicationSpec.ConfigEntry
(*emptypb.Empty)(nil), // 12: google.protobuf.Empty
}
var file_applications_v1_applications_v1_proto_depIdxs = []int32{
8, // 0: applications.CreateOptions.metadata:type_name -> applications.ApplicationMetadata
9, // 1: applications.CreateOptions.spec:type_name -> applications.ApplicationSpec
0, // 2: applications.CreateOptions.owner_id:type_name -> applications.OwnerId
1, // 3: applications.CreateOptions.token:type_name -> applications.Token
7, // 4: applications.UpdateOptions.id:type_name -> applications.ApplicationId
8, // 5: applications.UpdateOptions.metadata:type_name -> applications.ApplicationMetadata
9, // 6: applications.UpdateOptions.spec:type_name -> applications.ApplicationSpec
0, // 7: applications.UpdateOptions.owner_id:type_name -> applications.OwnerId
1, // 8: applications.UpdateOptions.token:type_name -> applications.Token
7, // 9: applications.DeleteOptions.id:type_name -> applications.ApplicationId
8, // 10: applications.DeleteOptions.metadata:type_name -> applications.ApplicationMetadata
0, // 11: applications.DeleteOptions.owner_id:type_name -> applications.OwnerId
1, // 12: applications.DeleteOptions.token:type_name -> applications.Token
7, // 13: applications.GetOptions.id:type_name -> applications.ApplicationId
8, // 14: applications.GetOptions.metadata:type_name -> applications.ApplicationMetadata
0, // 15: applications.GetOptions.owner_id:type_name -> applications.OwnerId
1, // 16: applications.GetOptions.token:type_name -> applications.Token
8, // 17: applications.ListOptions.metadata:type_name -> applications.ApplicationMetadata
0, // 18: applications.ListOptions.owner_id:type_name -> applications.OwnerId
1, // 19: applications.ListOptions.token:type_name -> applications.Token
11, // 20: applications.ApplicationSpec.config:type_name -> applications.ApplicationSpec.ConfigEntry
8, // 21: applications.ApplicationFull.metadata:type_name -> applications.ApplicationMetadata
9, // 22: applications.ApplicationFull.spec:type_name -> applications.ApplicationSpec
7, // 23: applications.ApplicationFull.id:type_name -> applications.ApplicationId
2, // 24: applications.Applications.Create:input_type -> applications.CreateOptions
3, // 25: applications.Applications.Update:input_type -> applications.UpdateOptions
4, // 26: applications.Applications.Delete:input_type -> applications.DeleteOptions
5, // 27: applications.Applications.Get:input_type -> applications.GetOptions
6, // 28: applications.Applications.List:input_type -> applications.ListOptions
10, // 29: applications.Applications.Create:output_type -> applications.ApplicationFull
10, // 30: applications.Applications.Update:output_type -> applications.ApplicationFull
12, // 31: applications.Applications.Delete:output_type -> google.protobuf.Empty
10, // 32: applications.Applications.Get:output_type -> applications.ApplicationFull
10, // 33: applications.Applications.List:output_type -> applications.ApplicationFull
29, // [29:34] is the sub-list for method output_type
24, // [24:29] is the sub-list for method input_type
24, // [24:24] is the sub-list for extension type_name
24, // [24:24] is the sub-list for extension extendee
0, // [0:24] is the sub-list for field type_name
}
func init() { file_applications_v1_applications_v1_proto_init() }
func file_applications_v1_applications_v1_proto_init() {
if File_applications_v1_applications_v1_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_applications_v1_applications_v1_proto_rawDesc), len(file_applications_v1_applications_v1_proto_rawDesc)),
NumEnums: 0,
NumMessages: 12,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_applications_v1_applications_v1_proto_goTypes,
DependencyIndexes: file_applications_v1_applications_v1_proto_depIdxs,
MessageInfos: file_applications_v1_applications_v1_proto_msgTypes,
}.Build()
File_applications_v1_applications_v1_proto = out.File
file_applications_v1_applications_v1_proto_goTypes = nil
file_applications_v1_applications_v1_proto_depIdxs = nil
}

View File

@@ -0,0 +1,284 @@
/// This file has messages for describing applications
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc (unknown)
// source: applications/v1/applications_v1.proto
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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Applications_Create_FullMethodName = "/applications.Applications/Create"
Applications_Update_FullMethodName = "/applications.Applications/Update"
Applications_Delete_FullMethodName = "/applications.Applications/Delete"
Applications_Get_FullMethodName = "/applications.Applications/Get"
Applications_List_FullMethodName = "/applications.Applications/List"
)
// 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.
//
// *
// Service for handling applications
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) (grpc.ServerStreamingClient[ApplicationFull], 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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ApplicationFull)
err := c.cc.Invoke(ctx, Applications_Create_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *applicationsClient) Update(ctx context.Context, in *UpdateOptions, opts ...grpc.CallOption) (*ApplicationFull, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ApplicationFull)
err := c.cc.Invoke(ctx, Applications_Update_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *applicationsClient) Delete(ctx context.Context, in *DeleteOptions, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Applications_Delete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *applicationsClient) Get(ctx context.Context, in *GetOptions, opts ...grpc.CallOption) (*ApplicationFull, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ApplicationFull)
err := c.cc.Invoke(ctx, Applications_Get_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *applicationsClient) List(ctx context.Context, in *ListOptions, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ApplicationFull], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &Applications_ServiceDesc.Streams[0], Applications_List_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[ListOptions, ApplicationFull]{ClientStream: 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
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Applications_ListClient = grpc.ServerStreamingClient[ApplicationFull]
// ApplicationsServer is the server API for Applications service.
// All implementations should embed UnimplementedApplicationsServer
// for forward compatibility.
//
// *
// Service for handling applications
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, grpc.ServerStreamingServer[ApplicationFull]) error
}
// UnimplementedApplicationsServer 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 UnimplementedApplicationsServer struct{}
func (UnimplementedApplicationsServer) Create(context.Context, *CreateOptions) (*ApplicationFull, error) {
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedApplicationsServer) Update(context.Context, *UpdateOptions) (*ApplicationFull, error) {
return nil, status.Error(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedApplicationsServer) Delete(context.Context, *DeleteOptions) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedApplicationsServer) Get(context.Context, *GetOptions) (*ApplicationFull, error) {
return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedApplicationsServer) List(*ListOptions, grpc.ServerStreamingServer[ApplicationFull]) error {
return status.Error(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedApplicationsServer) testEmbeddedByValue() {}
// 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) {
// If the following call panics, it indicates UnimplementedApplicationsServer 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(&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_Create_FullMethodName,
}
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_Update_FullMethodName,
}
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_Delete_FullMethodName,
}
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_Get_FullMethodName,
}
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, &grpc.GenericServerStream[ListOptions, ApplicationFull]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Applications_ListServer = grpc.ServerStreamingServer[ApplicationFull]
// 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/v1/applications_v1.proto",
}

187
pkg/email/v1/email_v1.pb.go Normal file
View File

@@ -0,0 +1,187 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: email/v1/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"
unsafe "unsafe"
)
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 `protogen:"open.v1"`
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *RequestValidation) Reset() {
*x = RequestValidation{}
mi := &file_email_v1_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_v1_email_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 RequestValidation.ProtoReflect.Descriptor instead.
func (*RequestValidation) Descriptor() ([]byte, []int) {
return file_email_v1_email_v1_proto_rawDescGZIP(), []int{0}
}
func (x *RequestValidation) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
type ConfirmValidation struct {
state protoimpl.MessageState `protogen:"open.v1"`
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"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ConfirmValidation) Reset() {
*x = ConfirmValidation{}
mi := &file_email_v1_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_v1_email_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 ConfirmValidation.ProtoReflect.Descriptor instead.
func (*ConfirmValidation) Descriptor() ([]byte, []int) {
return file_email_v1_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_v1_email_v1_proto protoreflect.FileDescriptor
const file_email_v1_email_v1_proto_rawDesc = "" +
"\n" +
"\x17email/v1/email_v1.proto\x12\x05email\x1a\x1bgoogle/protobuf/empty.proto\",\n" +
"\x11RequestValidation\x12\x17\n" +
"\auser_id\x18\x01 \x01(\tR\x06userId\"@\n" +
"\x11ConfirmValidation\x12\x17\n" +
"\auser_id\x18\x01 \x01(\tR\x06userId\x12\x12\n" +
"\x04code\x18\x02 \x01(\x05R\x04code2\x99\x01\n" +
"\x0fEmailValidation\x12A\n" +
"\vSendRequest\x12\x18.email.RequestValidation\x1a\x16.google.protobuf.Empty\"\x00\x12C\n" +
"\rValidateEmail\x12\x18.email.ConfirmValidation\x1a\x16.google.protobuf.Empty\"\x00BCZAgitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/emailb\x06proto3"
var (
file_email_v1_email_v1_proto_rawDescOnce sync.Once
file_email_v1_email_v1_proto_rawDescData []byte
)
func file_email_v1_email_v1_proto_rawDescGZIP() []byte {
file_email_v1_email_v1_proto_rawDescOnce.Do(func() {
file_email_v1_email_v1_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_email_v1_email_v1_proto_rawDesc), len(file_email_v1_email_v1_proto_rawDesc)))
})
return file_email_v1_email_v1_proto_rawDescData
}
var file_email_v1_email_v1_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_email_v1_email_v1_proto_goTypes = []any{
(*RequestValidation)(nil), // 0: email.RequestValidation
(*ConfirmValidation)(nil), // 1: email.ConfirmValidation
(*emptypb.Empty)(nil), // 2: google.protobuf.Empty
}
var file_email_v1_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_v1_email_v1_proto_init() }
func file_email_v1_email_v1_proto_init() {
if File_email_v1_email_v1_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_email_v1_email_v1_proto_rawDesc), len(file_email_v1_email_v1_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_email_v1_email_v1_proto_goTypes,
DependencyIndexes: file_email_v1_email_v1_proto_depIdxs,
MessageInfos: file_email_v1_email_v1_proto_msgTypes,
}.Build()
File_email_v1_email_v1_proto = out.File
file_email_v1_email_v1_proto_goTypes = nil
file_email_v1_email_v1_proto_depIdxs = nil
}

View File

@@ -0,0 +1,162 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc (unknown)
// source: email/v1/email_v1.proto
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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
EmailValidation_SendRequest_FullMethodName = "/email.EmailValidation/SendRequest"
EmailValidation_ValidateEmail_FullMethodName = "/email.EmailValidation/ValidateEmail"
)
// 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.
//
// A service that should handle email validation
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, EmailValidation_SendRequest_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *emailValidationClient) ValidateEmail(ctx context.Context, in *ConfirmValidation, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, EmailValidation_ValidateEmail_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// EmailValidationServer is the server API for EmailValidation service.
// All implementations should embed UnimplementedEmailValidationServer
// for forward compatibility.
//
// A service that should handle email validation
type EmailValidationServer interface {
SendRequest(context.Context, *RequestValidation) (*emptypb.Empty, error)
ValidateEmail(context.Context, *ConfirmValidation) (*emptypb.Empty, error)
}
// UnimplementedEmailValidationServer 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 UnimplementedEmailValidationServer struct{}
func (UnimplementedEmailValidationServer) SendRequest(context.Context, *RequestValidation) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method SendRequest not implemented")
}
func (UnimplementedEmailValidationServer) ValidateEmail(context.Context, *ConfirmValidation) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method ValidateEmail not implemented")
}
func (UnimplementedEmailValidationServer) testEmbeddedByValue() {}
// 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) {
// If the following call panics, it indicates UnimplementedEmailValidationServer 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(&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: EmailValidation_SendRequest_FullMethodName,
}
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: EmailValidation_ValidateEmail_FullMethodName,
}
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/v1/email_v1.proto",
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,284 @@
/// This file has messages for describing environments
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc (unknown)
// source: environments/v1/environments_v1.proto
package environments
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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Environments_Create_FullMethodName = "/environments.Environments/Create"
Environments_Update_FullMethodName = "/environments.Environments/Update"
Environments_Delete_FullMethodName = "/environments.Environments/Delete"
Environments_Get_FullMethodName = "/environments.Environments/Get"
Environments_List_FullMethodName = "/environments.Environments/List"
)
// EnvironmentsClient is the client API for Environments 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 EnvironmentsClient interface {
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) (grpc.ServerStreamingClient[EnvironmentFull], error)
}
type environmentsClient struct {
cc grpc.ClientConnInterface
}
func NewEnvironmentsClient(cc grpc.ClientConnInterface) EnvironmentsClient {
return &environmentsClient{cc}
}
func (c *environmentsClient) Create(ctx context.Context, in *CreateOptions, opts ...grpc.CallOption) (*EnvironmentFull, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(EnvironmentFull)
err := c.cc.Invoke(ctx, Environments_Create_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *environmentsClient) Update(ctx context.Context, in *UpdateOptions, opts ...grpc.CallOption) (*EnvironmentFull, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(EnvironmentFull)
err := c.cc.Invoke(ctx, Environments_Update_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *environmentsClient) Delete(ctx context.Context, in *DeleteOptions, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Environments_Delete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *environmentsClient) Get(ctx context.Context, in *GetOptions, opts ...grpc.CallOption) (*EnvironmentFull, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(EnvironmentFull)
err := c.cc.Invoke(ctx, Environments_Get_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *environmentsClient) List(ctx context.Context, in *ListOptions, opts ...grpc.CallOption) (grpc.ServerStreamingClient[EnvironmentFull], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &Environments_ServiceDesc.Streams[0], Environments_List_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[ListOptions, EnvironmentFull]{ClientStream: 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
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Environments_ListClient = grpc.ServerStreamingClient[EnvironmentFull]
// EnvironmentsServer is the server API for Environments service.
// All implementations should embed UnimplementedEnvironmentsServer
// for forward compatibility.
//
// *
// Service for handling environments
type EnvironmentsServer interface {
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, grpc.ServerStreamingServer[EnvironmentFull]) error
}
// UnimplementedEnvironmentsServer 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 UnimplementedEnvironmentsServer struct{}
func (UnimplementedEnvironmentsServer) Create(context.Context, *CreateOptions) (*EnvironmentFull, error) {
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedEnvironmentsServer) Update(context.Context, *UpdateOptions) (*EnvironmentFull, error) {
return nil, status.Error(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedEnvironmentsServer) Delete(context.Context, *DeleteOptions) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedEnvironmentsServer) Get(context.Context, *GetOptions) (*EnvironmentFull, error) {
return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedEnvironmentsServer) List(*ListOptions, grpc.ServerStreamingServer[EnvironmentFull]) error {
return status.Error(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedEnvironmentsServer) testEmbeddedByValue() {}
// UnsafeEnvironmentsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EnvironmentsServer will
// result in compilation errors.
type UnsafeEnvironmentsServer interface {
mustEmbedUnimplementedEnvironmentsServer()
}
func RegisterEnvironmentsServer(s grpc.ServiceRegistrar, srv EnvironmentsServer) {
// If the following call panics, it indicates UnimplementedEnvironmentsServer 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(&Environments_ServiceDesc, srv)
}
func _Environments_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.(EnvironmentsServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Environments_Create_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
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(UpdateOptions)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EnvironmentsServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Environments_Update_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
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(DeleteOptions)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EnvironmentsServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Environments_Delete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
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(GetOptions)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EnvironmentsServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Environments_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
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(ListOptions)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(EnvironmentsServer).List(m, &grpc.GenericServerStream[ListOptions, EnvironmentFull]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Environments_ListServer = grpc.ServerStreamingServer[EnvironmentFull]
// Environments_ServiceDesc is the grpc.ServiceDesc for Environments service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Environments_ServiceDesc = grpc.ServiceDesc{
ServiceName: "environments.Environments",
HandlerType: (*EnvironmentsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _Environments_Create_Handler,
},
{
MethodName: "Update",
Handler: _Environments_Update_Handler,
},
{
MethodName: "Delete",
Handler: _Environments_Delete_Handler,
},
{
MethodName: "Get",
Handler: _Environments_Get_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "List",
Handler: _Environments_List_Handler,
ServerStreams: true,
},
},
Metadata: "environments/v1/environments_v1.proto",
}