Commit: Bulk unfinished work
This commit is contained in:
532
gen/mandant/v1/mandant.pb.go
Normal file
532
gen/mandant/v1/mandant.pb.go
Normal file
@@ -0,0 +1,532 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.10
|
||||
// protoc (unknown)
|
||||
// source: mandant/v1/mandant.proto
|
||||
|
||||
package mandantv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
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 GetCurrentTenantRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetCurrentTenantRequest) Reset() {
|
||||
*x = GetCurrentTenantRequest{}
|
||||
mi := &file_mandant_v1_mandant_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetCurrentTenantRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetCurrentTenantRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetCurrentTenantRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mandant_v1_mandant_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 GetCurrentTenantRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetCurrentTenantRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mandant_v1_mandant_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type GetTenantRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetTenantRequest) Reset() {
|
||||
*x = GetTenantRequest{}
|
||||
mi := &file_mandant_v1_mandant_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetTenantRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetTenantRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetTenantRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mandant_v1_mandant_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 GetTenantRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetTenantRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mandant_v1_mandant_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetTenantRequest) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetTenantResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Plan string `protobuf:"bytes,3,opt,name=plan,proto3" json:"plan,omitempty"`
|
||||
Logo string `protobuf:"bytes,4,opt,name=logo,proto3" json:"logo,omitempty"`
|
||||
Color string `protobuf:"bytes,5,opt,name=color,proto3" json:"color,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetTenantResponse) Reset() {
|
||||
*x = GetTenantResponse{}
|
||||
mi := &file_mandant_v1_mandant_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetTenantResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetTenantResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetTenantResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mandant_v1_mandant_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 GetTenantResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetTenantResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mandant_v1_mandant_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetTenantResponse) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetTenantResponse) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetTenantResponse) GetPlan() string {
|
||||
if x != nil {
|
||||
return x.Plan
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetTenantResponse) GetLogo() string {
|
||||
if x != nil {
|
||||
return x.Logo
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetTenantResponse) GetColor() string {
|
||||
if x != nil {
|
||||
return x.Color
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ListTenantRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
|
||||
PerPage int32 `protobuf:"varint,2,opt,name=per_page,json=perPage,proto3" json:"per_page,omitempty"`
|
||||
OrberBy string `protobuf:"bytes,3,opt,name=orber_by,json=orberBy,proto3" json:"orber_by,omitempty"`
|
||||
Asc bool `protobuf:"varint,4,opt,name=asc,proto3" json:"asc,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListTenantRequest) Reset() {
|
||||
*x = ListTenantRequest{}
|
||||
mi := &file_mandant_v1_mandant_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListTenantRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListTenantRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListTenantRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mandant_v1_mandant_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 ListTenantRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListTenantRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mandant_v1_mandant_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *ListTenantRequest) GetPage() int32 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListTenantRequest) GetPerPage() int32 {
|
||||
if x != nil {
|
||||
return x.PerPage
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListTenantRequest) GetOrberBy() string {
|
||||
if x != nil {
|
||||
return x.OrberBy
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListTenantRequest) GetAsc() bool {
|
||||
if x != nil {
|
||||
return x.Asc
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type Metadata struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
TotalCount int32 `protobuf:"varint,1,opt,name=totalCount,proto3" json:"totalCount,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Metadata) Reset() {
|
||||
*x = Metadata{}
|
||||
mi := &file_mandant_v1_mandant_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Metadata) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Metadata) ProtoMessage() {}
|
||||
|
||||
func (x *Metadata) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mandant_v1_mandant_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 Metadata.ProtoReflect.Descriptor instead.
|
||||
func (*Metadata) Descriptor() ([]byte, []int) {
|
||||
return file_mandant_v1_mandant_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *Metadata) GetTotalCount() int32 {
|
||||
if x != nil {
|
||||
return x.TotalCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListProjectsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Data []*GetTenantResponse `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
|
||||
Meta *Metadata `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListProjectsResponse) Reset() {
|
||||
*x = ListProjectsResponse{}
|
||||
mi := &file_mandant_v1_mandant_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListProjectsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListProjectsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListProjectsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mandant_v1_mandant_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 ListProjectsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListProjectsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mandant_v1_mandant_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ListProjectsResponse) GetData() []*GetTenantResponse {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ListProjectsResponse) GetMeta() *Metadata {
|
||||
if x != nil {
|
||||
return x.Meta
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SetCurrentTenantRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
TenantId int64 `protobuf:"varint,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SetCurrentTenantRequest) Reset() {
|
||||
*x = SetCurrentTenantRequest{}
|
||||
mi := &file_mandant_v1_mandant_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SetCurrentTenantRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SetCurrentTenantRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SetCurrentTenantRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mandant_v1_mandant_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 SetCurrentTenantRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SetCurrentTenantRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mandant_v1_mandant_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *SetCurrentTenantRequest) GetTenantId() int64 {
|
||||
if x != nil {
|
||||
return x.TenantId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SetCurrentTenantResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SetCurrentTenantResponse) Reset() {
|
||||
*x = SetCurrentTenantResponse{}
|
||||
mi := &file_mandant_v1_mandant_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SetCurrentTenantResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SetCurrentTenantResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SetCurrentTenantResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mandant_v1_mandant_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 SetCurrentTenantResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SetCurrentTenantResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mandant_v1_mandant_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *SetCurrentTenantResponse) GetSuccess() bool {
|
||||
if x != nil {
|
||||
return x.Success
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_mandant_v1_mandant_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_mandant_v1_mandant_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x18mandant/v1/mandant.proto\x12\n" +
|
||||
"mandant.v1\"\x19\n" +
|
||||
"\x17GetCurrentTenantRequest\"\"\n" +
|
||||
"\x10GetTenantRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\"u\n" +
|
||||
"\x11GetTenantResponse\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" +
|
||||
"\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n" +
|
||||
"\x04plan\x18\x03 \x01(\tR\x04plan\x12\x12\n" +
|
||||
"\x04logo\x18\x04 \x01(\tR\x04logo\x12\x14\n" +
|
||||
"\x05color\x18\x05 \x01(\tR\x05color\"o\n" +
|
||||
"\x11ListTenantRequest\x12\x12\n" +
|
||||
"\x04page\x18\x01 \x01(\x05R\x04page\x12\x19\n" +
|
||||
"\bper_page\x18\x02 \x01(\x05R\aperPage\x12\x19\n" +
|
||||
"\borber_by\x18\x03 \x01(\tR\aorberBy\x12\x10\n" +
|
||||
"\x03asc\x18\x04 \x01(\bR\x03asc\"*\n" +
|
||||
"\bMetadata\x12\x1e\n" +
|
||||
"\n" +
|
||||
"totalCount\x18\x01 \x01(\x05R\n" +
|
||||
"totalCount\"s\n" +
|
||||
"\x14ListProjectsResponse\x121\n" +
|
||||
"\x04data\x18\x01 \x03(\v2\x1d.mandant.v1.GetTenantResponseR\x04data\x12(\n" +
|
||||
"\x04meta\x18\x02 \x01(\v2\x14.mandant.v1.MetadataR\x04meta\"6\n" +
|
||||
"\x17SetCurrentTenantRequest\x12\x1b\n" +
|
||||
"\ttenant_id\x18\x01 \x01(\x03R\btenantId\"4\n" +
|
||||
"\x18SetCurrentTenantResponse\x12\x18\n" +
|
||||
"\asuccess\x18\x01 \x01(\bR\asuccess2\x99\x02\n" +
|
||||
"\x0eMandantService\x12V\n" +
|
||||
"\x10GetCurrentTenant\x12#.mandant.v1.GetCurrentTenantRequest\x1a\x1d.mandant.v1.GetTenantResponse\x12P\n" +
|
||||
"\rGetAllTenants\x12\x1d.mandant.v1.ListTenantRequest\x1a .mandant.v1.ListProjectsResponse\x12]\n" +
|
||||
"\x10SetCurrentTenant\x12#.mandant.v1.SetCurrentTenantRequest\x1a$.mandant.v1.SetCurrentTenantResponseB\x9c\x01\n" +
|
||||
"\x0ecom.mandant.v1B\fMandantProtoP\x01Z3git.kocoder.xyz/kocoded/vt/gen/mandant/v1;mandantv1\xa2\x02\x03MXX\xaa\x02\n" +
|
||||
"Mandant.V1\xca\x02\n" +
|
||||
"Mandant\\V1\xe2\x02\x16Mandant\\V1\\GPBMetadata\xea\x02\vMandant::V1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_mandant_v1_mandant_proto_rawDescOnce sync.Once
|
||||
file_mandant_v1_mandant_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_mandant_v1_mandant_proto_rawDescGZIP() []byte {
|
||||
file_mandant_v1_mandant_proto_rawDescOnce.Do(func() {
|
||||
file_mandant_v1_mandant_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_mandant_v1_mandant_proto_rawDesc), len(file_mandant_v1_mandant_proto_rawDesc)))
|
||||
})
|
||||
return file_mandant_v1_mandant_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_mandant_v1_mandant_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_mandant_v1_mandant_proto_goTypes = []any{
|
||||
(*GetCurrentTenantRequest)(nil), // 0: mandant.v1.GetCurrentTenantRequest
|
||||
(*GetTenantRequest)(nil), // 1: mandant.v1.GetTenantRequest
|
||||
(*GetTenantResponse)(nil), // 2: mandant.v1.GetTenantResponse
|
||||
(*ListTenantRequest)(nil), // 3: mandant.v1.ListTenantRequest
|
||||
(*Metadata)(nil), // 4: mandant.v1.Metadata
|
||||
(*ListProjectsResponse)(nil), // 5: mandant.v1.ListProjectsResponse
|
||||
(*SetCurrentTenantRequest)(nil), // 6: mandant.v1.SetCurrentTenantRequest
|
||||
(*SetCurrentTenantResponse)(nil), // 7: mandant.v1.SetCurrentTenantResponse
|
||||
}
|
||||
var file_mandant_v1_mandant_proto_depIdxs = []int32{
|
||||
2, // 0: mandant.v1.ListProjectsResponse.data:type_name -> mandant.v1.GetTenantResponse
|
||||
4, // 1: mandant.v1.ListProjectsResponse.meta:type_name -> mandant.v1.Metadata
|
||||
0, // 2: mandant.v1.MandantService.GetCurrentTenant:input_type -> mandant.v1.GetCurrentTenantRequest
|
||||
3, // 3: mandant.v1.MandantService.GetAllTenants:input_type -> mandant.v1.ListTenantRequest
|
||||
6, // 4: mandant.v1.MandantService.SetCurrentTenant:input_type -> mandant.v1.SetCurrentTenantRequest
|
||||
2, // 5: mandant.v1.MandantService.GetCurrentTenant:output_type -> mandant.v1.GetTenantResponse
|
||||
5, // 6: mandant.v1.MandantService.GetAllTenants:output_type -> mandant.v1.ListProjectsResponse
|
||||
7, // 7: mandant.v1.MandantService.SetCurrentTenant:output_type -> mandant.v1.SetCurrentTenantResponse
|
||||
5, // [5:8] is the sub-list for method output_type
|
||||
2, // [2:5] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_mandant_v1_mandant_proto_init() }
|
||||
func file_mandant_v1_mandant_proto_init() {
|
||||
if File_mandant_v1_mandant_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_mandant_v1_mandant_proto_rawDesc), len(file_mandant_v1_mandant_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 8,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_mandant_v1_mandant_proto_goTypes,
|
||||
DependencyIndexes: file_mandant_v1_mandant_proto_depIdxs,
|
||||
MessageInfos: file_mandant_v1_mandant_proto_msgTypes,
|
||||
}.Build()
|
||||
File_mandant_v1_mandant_proto = out.File
|
||||
file_mandant_v1_mandant_proto_goTypes = nil
|
||||
file_mandant_v1_mandant_proto_depIdxs = nil
|
||||
}
|
||||
179
gen/mandant/v1/mandantv1connect/mandant.connect.go
Normal file
179
gen/mandant/v1/mandantv1connect/mandant.connect.go
Normal file
@@ -0,0 +1,179 @@
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: mandant/v1/mandant.proto
|
||||
|
||||
package mandantv1connect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1 "git.kocoder.xyz/kocoded/vt/gen/mandant/v1"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// MandantServiceName is the fully-qualified name of the MandantService service.
|
||||
MandantServiceName = "mandant.v1.MandantService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// MandantServiceGetCurrentTenantProcedure is the fully-qualified name of the MandantService's
|
||||
// GetCurrentTenant RPC.
|
||||
MandantServiceGetCurrentTenantProcedure = "/mandant.v1.MandantService/GetCurrentTenant"
|
||||
// MandantServiceGetAllTenantsProcedure is the fully-qualified name of the MandantService's
|
||||
// GetAllTenants RPC.
|
||||
MandantServiceGetAllTenantsProcedure = "/mandant.v1.MandantService/GetAllTenants"
|
||||
// MandantServiceSetCurrentTenantProcedure is the fully-qualified name of the MandantService's
|
||||
// SetCurrentTenant RPC.
|
||||
MandantServiceSetCurrentTenantProcedure = "/mandant.v1.MandantService/SetCurrentTenant"
|
||||
)
|
||||
|
||||
// MandantServiceClient is a client for the mandant.v1.MandantService service.
|
||||
type MandantServiceClient interface {
|
||||
GetCurrentTenant(context.Context, *v1.GetCurrentTenantRequest) (*v1.GetTenantResponse, error)
|
||||
GetAllTenants(context.Context, *v1.ListTenantRequest) (*v1.ListProjectsResponse, error)
|
||||
SetCurrentTenant(context.Context, *v1.SetCurrentTenantRequest) (*v1.SetCurrentTenantResponse, error)
|
||||
}
|
||||
|
||||
// NewMandantServiceClient constructs a client for the mandant.v1.MandantService service. By
|
||||
// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses,
|
||||
// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
|
||||
// connect.WithGRPC() or connect.WithGRPCWeb() options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewMandantServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) MandantServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
mandantServiceMethods := v1.File_mandant_v1_mandant_proto.Services().ByName("MandantService").Methods()
|
||||
return &mandantServiceClient{
|
||||
getCurrentTenant: connect.NewClient[v1.GetCurrentTenantRequest, v1.GetTenantResponse](
|
||||
httpClient,
|
||||
baseURL+MandantServiceGetCurrentTenantProcedure,
|
||||
connect.WithSchema(mandantServiceMethods.ByName("GetCurrentTenant")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
getAllTenants: connect.NewClient[v1.ListTenantRequest, v1.ListProjectsResponse](
|
||||
httpClient,
|
||||
baseURL+MandantServiceGetAllTenantsProcedure,
|
||||
connect.WithSchema(mandantServiceMethods.ByName("GetAllTenants")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
setCurrentTenant: connect.NewClient[v1.SetCurrentTenantRequest, v1.SetCurrentTenantResponse](
|
||||
httpClient,
|
||||
baseURL+MandantServiceSetCurrentTenantProcedure,
|
||||
connect.WithSchema(mandantServiceMethods.ByName("SetCurrentTenant")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// mandantServiceClient implements MandantServiceClient.
|
||||
type mandantServiceClient struct {
|
||||
getCurrentTenant *connect.Client[v1.GetCurrentTenantRequest, v1.GetTenantResponse]
|
||||
getAllTenants *connect.Client[v1.ListTenantRequest, v1.ListProjectsResponse]
|
||||
setCurrentTenant *connect.Client[v1.SetCurrentTenantRequest, v1.SetCurrentTenantResponse]
|
||||
}
|
||||
|
||||
// GetCurrentTenant calls mandant.v1.MandantService.GetCurrentTenant.
|
||||
func (c *mandantServiceClient) GetCurrentTenant(ctx context.Context, req *v1.GetCurrentTenantRequest) (*v1.GetTenantResponse, error) {
|
||||
response, err := c.getCurrentTenant.CallUnary(ctx, connect.NewRequest(req))
|
||||
if response != nil {
|
||||
return response.Msg, err
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// GetAllTenants calls mandant.v1.MandantService.GetAllTenants.
|
||||
func (c *mandantServiceClient) GetAllTenants(ctx context.Context, req *v1.ListTenantRequest) (*v1.ListProjectsResponse, error) {
|
||||
response, err := c.getAllTenants.CallUnary(ctx, connect.NewRequest(req))
|
||||
if response != nil {
|
||||
return response.Msg, err
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// SetCurrentTenant calls mandant.v1.MandantService.SetCurrentTenant.
|
||||
func (c *mandantServiceClient) SetCurrentTenant(ctx context.Context, req *v1.SetCurrentTenantRequest) (*v1.SetCurrentTenantResponse, error) {
|
||||
response, err := c.setCurrentTenant.CallUnary(ctx, connect.NewRequest(req))
|
||||
if response != nil {
|
||||
return response.Msg, err
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// MandantServiceHandler is an implementation of the mandant.v1.MandantService service.
|
||||
type MandantServiceHandler interface {
|
||||
GetCurrentTenant(context.Context, *v1.GetCurrentTenantRequest) (*v1.GetTenantResponse, error)
|
||||
GetAllTenants(context.Context, *v1.ListTenantRequest) (*v1.ListProjectsResponse, error)
|
||||
SetCurrentTenant(context.Context, *v1.SetCurrentTenantRequest) (*v1.SetCurrentTenantResponse, error)
|
||||
}
|
||||
|
||||
// NewMandantServiceHandler builds an HTTP handler from the service implementation. It returns the
|
||||
// path on which to mount the handler and the handler itself.
|
||||
//
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewMandantServiceHandler(svc MandantServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
mandantServiceMethods := v1.File_mandant_v1_mandant_proto.Services().ByName("MandantService").Methods()
|
||||
mandantServiceGetCurrentTenantHandler := connect.NewUnaryHandlerSimple(
|
||||
MandantServiceGetCurrentTenantProcedure,
|
||||
svc.GetCurrentTenant,
|
||||
connect.WithSchema(mandantServiceMethods.ByName("GetCurrentTenant")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
mandantServiceGetAllTenantsHandler := connect.NewUnaryHandlerSimple(
|
||||
MandantServiceGetAllTenantsProcedure,
|
||||
svc.GetAllTenants,
|
||||
connect.WithSchema(mandantServiceMethods.ByName("GetAllTenants")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
mandantServiceSetCurrentTenantHandler := connect.NewUnaryHandlerSimple(
|
||||
MandantServiceSetCurrentTenantProcedure,
|
||||
svc.SetCurrentTenant,
|
||||
connect.WithSchema(mandantServiceMethods.ByName("SetCurrentTenant")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/mandant.v1.MandantService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case MandantServiceGetCurrentTenantProcedure:
|
||||
mandantServiceGetCurrentTenantHandler.ServeHTTP(w, r)
|
||||
case MandantServiceGetAllTenantsProcedure:
|
||||
mandantServiceGetAllTenantsHandler.ServeHTTP(w, r)
|
||||
case MandantServiceSetCurrentTenantProcedure:
|
||||
mandantServiceSetCurrentTenantHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedMandantServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedMandantServiceHandler struct{}
|
||||
|
||||
func (UnimplementedMandantServiceHandler) GetCurrentTenant(context.Context, *v1.GetCurrentTenantRequest) (*v1.GetTenantResponse, error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mandant.v1.MandantService.GetCurrentTenant is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMandantServiceHandler) GetAllTenants(context.Context, *v1.ListTenantRequest) (*v1.ListProjectsResponse, error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mandant.v1.MandantService.GetAllTenants is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMandantServiceHandler) SetCurrentTenant(context.Context, *v1.SetCurrentTenantRequest) (*v1.SetCurrentTenantResponse, error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mandant.v1.MandantService.SetCurrentTenant is not implemented"))
|
||||
}
|
||||
Reference in New Issue
Block a user