Files
threshold/internal/gen/controller/api/services/org_service.pb.go
T

521 lines
20 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.24.0
// protoc v3.12.3
// source: controller/api/services/v1/org_service.proto
package services
import (
context "context"
proto "github.com/golang/protobuf/proto"
_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
scopes "github.com/hashicorp/watchtower/internal/gen/controller/api/resources/scopes"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type GetOrgRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
View string `protobuf:"bytes,2,opt,name=view,proto3" json:"view,omitempty"`
}
func (x *GetOrgRequest) Reset() {
*x = GetOrgRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_controller_api_services_v1_org_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetOrgRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetOrgRequest) ProtoMessage() {}
func (x *GetOrgRequest) ProtoReflect() protoreflect.Message {
mi := &file_controller_api_services_v1_org_service_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetOrgRequest.ProtoReflect.Descriptor instead.
func (*GetOrgRequest) Descriptor() ([]byte, []int) {
return file_controller_api_services_v1_org_service_proto_rawDescGZIP(), []int{0}
}
func (x *GetOrgRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *GetOrgRequest) GetView() string {
if x != nil {
return x.View
}
return ""
}
type GetOrgResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Item *scopes.Org `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
}
func (x *GetOrgResponse) Reset() {
*x = GetOrgResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_controller_api_services_v1_org_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetOrgResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetOrgResponse) ProtoMessage() {}
func (x *GetOrgResponse) ProtoReflect() protoreflect.Message {
mi := &file_controller_api_services_v1_org_service_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetOrgResponse.ProtoReflect.Descriptor instead.
func (*GetOrgResponse) Descriptor() ([]byte, []int) {
return file_controller_api_services_v1_org_service_proto_rawDescGZIP(), []int{1}
}
func (x *GetOrgResponse) GetItem() *scopes.Org {
if x != nil {
return x.Item
}
return nil
}
type ListOrgsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
View string `protobuf:"bytes,1,opt,name=view,proto3" json:"view,omitempty"`
}
func (x *ListOrgsRequest) Reset() {
*x = ListOrgsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_controller_api_services_v1_org_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListOrgsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListOrgsRequest) ProtoMessage() {}
func (x *ListOrgsRequest) ProtoReflect() protoreflect.Message {
mi := &file_controller_api_services_v1_org_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListOrgsRequest.ProtoReflect.Descriptor instead.
func (*ListOrgsRequest) Descriptor() ([]byte, []int) {
return file_controller_api_services_v1_org_service_proto_rawDescGZIP(), []int{2}
}
func (x *ListOrgsRequest) GetView() string {
if x != nil {
return x.View
}
return ""
}
type ListOrgsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Items []*scopes.Org `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
}
func (x *ListOrgsResponse) Reset() {
*x = ListOrgsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_controller_api_services_v1_org_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListOrgsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListOrgsResponse) ProtoMessage() {}
func (x *ListOrgsResponse) ProtoReflect() protoreflect.Message {
mi := &file_controller_api_services_v1_org_service_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListOrgsResponse.ProtoReflect.Descriptor instead.
func (*ListOrgsResponse) Descriptor() ([]byte, []int) {
return file_controller_api_services_v1_org_service_proto_rawDescGZIP(), []int{3}
}
func (x *ListOrgsResponse) GetItems() []*scopes.Org {
if x != nil {
return x.Items
}
return nil
}
var File_controller_api_services_v1_org_service_proto protoreflect.FileDescriptor
var file_controller_api_services_v1_org_service_proto_rawDesc = []byte{
0x0a, 0x2c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67,
0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a,
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c,
0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x22, 0x4d, 0x0a, 0x0e, 0x47, 0x65, 0x74,
0x4f, 0x72, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x69,
0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f,
0x72, 0x67, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x25, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74,
0x4f, 0x72, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x76,
0x69, 0x65, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x22,
0x51, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x63,
0x6f, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x52, 0x05, 0x69, 0x74, 0x65,
0x6d, 0x73, 0x32, 0xae, 0x02, 0x0a, 0x0a, 0x4f, 0x72, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0x92, 0x01, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x12, 0x29, 0x2e, 0x63,
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x0d, 0x2f, 0x76, 0x31,
0x2f, 0x6f, 0x72, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d,
0x92, 0x41, 0x13, 0x12, 0x11, 0x47, 0x65, 0x74, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67,
0x6c, 0x65, 0x20, 0x4f, 0x72, 0x67, 0x12, 0x8a, 0x01, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x4f,
0x72, 0x67, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x4f, 0x72, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23,
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x73,
0x92, 0x41, 0x10, 0x12, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x4f,
0x72, 0x67, 0x73, 0x42, 0x4f, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, 0x63,
0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f,
0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61,
0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x3b, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_controller_api_services_v1_org_service_proto_rawDescOnce sync.Once
file_controller_api_services_v1_org_service_proto_rawDescData = file_controller_api_services_v1_org_service_proto_rawDesc
)
func file_controller_api_services_v1_org_service_proto_rawDescGZIP() []byte {
file_controller_api_services_v1_org_service_proto_rawDescOnce.Do(func() {
file_controller_api_services_v1_org_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_controller_api_services_v1_org_service_proto_rawDescData)
})
return file_controller_api_services_v1_org_service_proto_rawDescData
}
var file_controller_api_services_v1_org_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_controller_api_services_v1_org_service_proto_goTypes = []interface{}{
(*GetOrgRequest)(nil), // 0: controller.api.services.v1.GetOrgRequest
(*GetOrgResponse)(nil), // 1: controller.api.services.v1.GetOrgResponse
(*ListOrgsRequest)(nil), // 2: controller.api.services.v1.ListOrgsRequest
(*ListOrgsResponse)(nil), // 3: controller.api.services.v1.ListOrgsResponse
(*scopes.Org)(nil), // 4: controller.api.resources.scopes.v1.Org
}
var file_controller_api_services_v1_org_service_proto_depIdxs = []int32{
4, // 0: controller.api.services.v1.GetOrgResponse.item:type_name -> controller.api.resources.scopes.v1.Org
4, // 1: controller.api.services.v1.ListOrgsResponse.items:type_name -> controller.api.resources.scopes.v1.Org
0, // 2: controller.api.services.v1.OrgService.GetOrg:input_type -> controller.api.services.v1.GetOrgRequest
2, // 3: controller.api.services.v1.OrgService.ListOrgs:input_type -> controller.api.services.v1.ListOrgsRequest
1, // 4: controller.api.services.v1.OrgService.GetOrg:output_type -> controller.api.services.v1.GetOrgResponse
3, // 5: controller.api.services.v1.OrgService.ListOrgs:output_type -> controller.api.services.v1.ListOrgsResponse
4, // [4:6] is the sub-list for method output_type
2, // [2:4] 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_controller_api_services_v1_org_service_proto_init() }
func file_controller_api_services_v1_org_service_proto_init() {
if File_controller_api_services_v1_org_service_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_controller_api_services_v1_org_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetOrgRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_controller_api_services_v1_org_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetOrgResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_controller_api_services_v1_org_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListOrgsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_controller_api_services_v1_org_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListOrgsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_controller_api_services_v1_org_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_controller_api_services_v1_org_service_proto_goTypes,
DependencyIndexes: file_controller_api_services_v1_org_service_proto_depIdxs,
MessageInfos: file_controller_api_services_v1_org_service_proto_msgTypes,
}.Build()
File_controller_api_services_v1_org_service_proto = out.File
file_controller_api_services_v1_org_service_proto_rawDesc = nil
file_controller_api_services_v1_org_service_proto_goTypes = nil
file_controller_api_services_v1_org_service_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// OrgServiceClient is the client API for OrgService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type OrgServiceClient interface {
// GetOrg returns a stored Org if present. The provided request
// must include the org id for the org being retrieved. If
// that id is missing, malformed or reference a non existing resource an error is returned.
GetOrg(ctx context.Context, in *GetOrgRequest, opts ...grpc.CallOption) (*GetOrgResponse, error)
// ListOrgs returns a list of stored orgs which exist in watchtower.
ListOrgs(ctx context.Context, in *ListOrgsRequest, opts ...grpc.CallOption) (*ListOrgsResponse, error)
}
type orgServiceClient struct {
cc grpc.ClientConnInterface
}
func NewOrgServiceClient(cc grpc.ClientConnInterface) OrgServiceClient {
return &orgServiceClient{cc}
}
func (c *orgServiceClient) GetOrg(ctx context.Context, in *GetOrgRequest, opts ...grpc.CallOption) (*GetOrgResponse, error) {
out := new(GetOrgResponse)
err := c.cc.Invoke(ctx, "/controller.api.services.v1.OrgService/GetOrg", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *orgServiceClient) ListOrgs(ctx context.Context, in *ListOrgsRequest, opts ...grpc.CallOption) (*ListOrgsResponse, error) {
out := new(ListOrgsResponse)
err := c.cc.Invoke(ctx, "/controller.api.services.v1.OrgService/ListOrgs", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// OrgServiceServer is the server API for OrgService service.
type OrgServiceServer interface {
// GetOrg returns a stored Org if present. The provided request
// must include the org id for the org being retrieved. If
// that id is missing, malformed or reference a non existing resource an error is returned.
GetOrg(context.Context, *GetOrgRequest) (*GetOrgResponse, error)
// ListOrgs returns a list of stored orgs which exist in watchtower.
ListOrgs(context.Context, *ListOrgsRequest) (*ListOrgsResponse, error)
}
// UnimplementedOrgServiceServer can be embedded to have forward compatible implementations.
type UnimplementedOrgServiceServer struct {
}
func (*UnimplementedOrgServiceServer) GetOrg(context.Context, *GetOrgRequest) (*GetOrgResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetOrg not implemented")
}
func (*UnimplementedOrgServiceServer) ListOrgs(context.Context, *ListOrgsRequest) (*ListOrgsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListOrgs not implemented")
}
func RegisterOrgServiceServer(s *grpc.Server, srv OrgServiceServer) {
s.RegisterService(&_OrgService_serviceDesc, srv)
}
func _OrgService_GetOrg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetOrgRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrgServiceServer).GetOrg(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/controller.api.services.v1.OrgService/GetOrg",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrgServiceServer).GetOrg(ctx, req.(*GetOrgRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OrgService_ListOrgs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListOrgsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrgServiceServer).ListOrgs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/controller.api.services.v1.OrgService/ListOrgs",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrgServiceServer).ListOrgs(ctx, req.(*ListOrgsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _OrgService_serviceDesc = grpc.ServiceDesc{
ServiceName: "controller.api.services.v1.OrgService",
HandlerType: (*OrgServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetOrg",
Handler: _OrgService_GetOrg_Handler,
},
{
MethodName: "ListOrgs",
Handler: _OrgService_ListOrgs_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "controller/api/services/v1/org_service.proto",
}