mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-05 05:36:50 +08:00
382 lines
14 KiB
Go
382 lines
14 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: namespace.proto
|
|
|
|
package api
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
proto "github.com/golang/protobuf/proto"
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
math "math"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
type ListNamespacesRequest struct {
|
|
PageSize int32 `protobuf:"varint,1,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
|
|
Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
|
|
Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ListNamespacesRequest) Reset() { *m = ListNamespacesRequest{} }
|
|
func (m *ListNamespacesRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ListNamespacesRequest) ProtoMessage() {}
|
|
func (*ListNamespacesRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ecb1e126f615f5dd, []int{0}
|
|
}
|
|
|
|
func (m *ListNamespacesRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ListNamespacesRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *ListNamespacesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ListNamespacesRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *ListNamespacesRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ListNamespacesRequest.Merge(m, src)
|
|
}
|
|
func (m *ListNamespacesRequest) XXX_Size() int {
|
|
return xxx_messageInfo_ListNamespacesRequest.Size(m)
|
|
}
|
|
func (m *ListNamespacesRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ListNamespacesRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ListNamespacesRequest proto.InternalMessageInfo
|
|
|
|
func (m *ListNamespacesRequest) GetPageSize() int32 {
|
|
if m != nil {
|
|
return m.PageSize
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ListNamespacesRequest) GetPage() int32 {
|
|
if m != nil {
|
|
return m.Page
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ListNamespacesRequest) GetQuery() string {
|
|
if m != nil {
|
|
return m.Query
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListNamespacesResponse struct {
|
|
Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
|
|
Namespaces []*Namespace `protobuf:"bytes,2,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
|
|
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
|
|
Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"`
|
|
TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ListNamespacesResponse) Reset() { *m = ListNamespacesResponse{} }
|
|
func (m *ListNamespacesResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*ListNamespacesResponse) ProtoMessage() {}
|
|
func (*ListNamespacesResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ecb1e126f615f5dd, []int{1}
|
|
}
|
|
|
|
func (m *ListNamespacesResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ListNamespacesResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *ListNamespacesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ListNamespacesResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *ListNamespacesResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ListNamespacesResponse.Merge(m, src)
|
|
}
|
|
func (m *ListNamespacesResponse) XXX_Size() int {
|
|
return xxx_messageInfo_ListNamespacesResponse.Size(m)
|
|
}
|
|
func (m *ListNamespacesResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ListNamespacesResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ListNamespacesResponse proto.InternalMessageInfo
|
|
|
|
func (m *ListNamespacesResponse) GetCount() int32 {
|
|
if m != nil {
|
|
return m.Count
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ListNamespacesResponse) GetNamespaces() []*Namespace {
|
|
if m != nil {
|
|
return m.Namespaces
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ListNamespacesResponse) GetPage() int32 {
|
|
if m != nil {
|
|
return m.Page
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ListNamespacesResponse) GetPages() int32 {
|
|
if m != nil {
|
|
return m.Pages
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ListNamespacesResponse) GetTotalCount() int32 {
|
|
if m != nil {
|
|
return m.TotalCount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type CreateNamespaceRequest struct {
|
|
Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CreateNamespaceRequest) Reset() { *m = CreateNamespaceRequest{} }
|
|
func (m *CreateNamespaceRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*CreateNamespaceRequest) ProtoMessage() {}
|
|
func (*CreateNamespaceRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ecb1e126f615f5dd, []int{2}
|
|
}
|
|
|
|
func (m *CreateNamespaceRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_CreateNamespaceRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *CreateNamespaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_CreateNamespaceRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *CreateNamespaceRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CreateNamespaceRequest.Merge(m, src)
|
|
}
|
|
func (m *CreateNamespaceRequest) XXX_Size() int {
|
|
return xxx_messageInfo_CreateNamespaceRequest.Size(m)
|
|
}
|
|
func (m *CreateNamespaceRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CreateNamespaceRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CreateNamespaceRequest proto.InternalMessageInfo
|
|
|
|
func (m *CreateNamespaceRequest) GetNamespace() *Namespace {
|
|
if m != nil {
|
|
return m.Namespace
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Namespace struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Namespace) Reset() { *m = Namespace{} }
|
|
func (m *Namespace) String() string { return proto.CompactTextString(m) }
|
|
func (*Namespace) ProtoMessage() {}
|
|
func (*Namespace) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ecb1e126f615f5dd, []int{3}
|
|
}
|
|
|
|
func (m *Namespace) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_Namespace.Unmarshal(m, b)
|
|
}
|
|
func (m *Namespace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_Namespace.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *Namespace) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Namespace.Merge(m, src)
|
|
}
|
|
func (m *Namespace) XXX_Size() int {
|
|
return xxx_messageInfo_Namespace.Size(m)
|
|
}
|
|
func (m *Namespace) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Namespace.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Namespace proto.InternalMessageInfo
|
|
|
|
func (m *Namespace) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*ListNamespacesRequest)(nil), "api.ListNamespacesRequest")
|
|
proto.RegisterType((*ListNamespacesResponse)(nil), "api.ListNamespacesResponse")
|
|
proto.RegisterType((*CreateNamespaceRequest)(nil), "api.CreateNamespaceRequest")
|
|
proto.RegisterType((*Namespace)(nil), "api.Namespace")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("namespace.proto", fileDescriptor_ecb1e126f615f5dd) }
|
|
|
|
var fileDescriptor_ecb1e126f615f5dd = []byte{
|
|
// 341 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xcb, 0x4a, 0xc3, 0x40,
|
|
0x14, 0x25, 0x4d, 0x2b, 0xe6, 0x0a, 0xad, 0x0c, 0x5a, 0x42, 0x14, 0x0d, 0x03, 0x42, 0x41, 0x49,
|
|
0x68, 0xdd, 0xb9, 0x2d, 0xb8, 0x12, 0x17, 0xe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x5b, 0xd4, 0xda, 0xaa, 0xf0, 0x7b, 0xe8, 0x0e,
|
|
0x0b, 0x14, 0x16, 0x37, 0x44, 0x6b, 0x2b, 0x6e, 0x20, 0x70, 0x8c, 0xa4, 0xf6, 0xaf, 0xa4, 0xcd,
|
|
0x00, 0xbf, 0x84, 0xc0, 0xd5, 0x4b, 0x79, 0x65, 0x87, 0xb6, 0x82, 0x8c, 0xe2, 0xc1, 0xb7, 0x07,
|
|
0xc7, 0x6e, 0x62, 0x84, 0xc5, 0x4a, 0x4e, 0x90, 0xcd, 0xa0, 0xbd, 0xeb, 0x13, 0x8b, 0x88, 0xa2,
|
|
0xf6, 0x71, 0xa2, 0xb3, 0xda, 0x5e, 0x65, 0x2c, 0x8f, 0xdf, 0x3e, 0xbf, 0xde, 0x1b, 0x11, 0x0b,
|
|
0xcb, 0x27, 0x37, 0xe9, 0xaa, 0x3f, 0x46, 0x2b, 0xfa, 0xe9, 0x96, 0x69, 0x33, 0xe8, 0xec, 0x9d,
|
|
0xca, 0x2a, 0xc4, 0x7a, 0x03, 0xa2, 0xbd, 0x6b, 0xf9, 0x35, 0x31, 0x5c, 0xf1, 0x7f, 0x19, 0xee,
|
|
0x36, 0x7e, 0x8c, 0x0f, 0xe8, 0x47, 0xbb, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0x92, 0x90, 0x1e,
|
|
0xf0, 0x9e, 0x02, 0x00, 0x00,
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// 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.SupportPackageIsVersion4
|
|
|
|
// NamespaceServiceClient is the client API for NamespaceService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type NamespaceServiceClient interface {
|
|
ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error)
|
|
CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*Namespace, error)
|
|
}
|
|
|
|
type namespaceServiceClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewNamespaceServiceClient(cc *grpc.ClientConn) NamespaceServiceClient {
|
|
return &namespaceServiceClient{cc}
|
|
}
|
|
|
|
func (c *namespaceServiceClient) ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) {
|
|
out := new(ListNamespacesResponse)
|
|
err := c.cc.Invoke(ctx, "/api.NamespaceService/ListNamespaces", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *namespaceServiceClient) CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*Namespace, error) {
|
|
out := new(Namespace)
|
|
err := c.cc.Invoke(ctx, "/api.NamespaceService/CreateNamespace", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// NamespaceServiceServer is the server API for NamespaceService service.
|
|
type NamespaceServiceServer interface {
|
|
ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error)
|
|
CreateNamespace(context.Context, *CreateNamespaceRequest) (*Namespace, error)
|
|
}
|
|
|
|
// UnimplementedNamespaceServiceServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedNamespaceServiceServer struct {
|
|
}
|
|
|
|
func (*UnimplementedNamespaceServiceServer) ListNamespaces(ctx context.Context, req *ListNamespacesRequest) (*ListNamespacesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListNamespaces not implemented")
|
|
}
|
|
func (*UnimplementedNamespaceServiceServer) CreateNamespace(ctx context.Context, req *CreateNamespaceRequest) (*Namespace, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateNamespace not implemented")
|
|
}
|
|
|
|
func RegisterNamespaceServiceServer(s *grpc.Server, srv NamespaceServiceServer) {
|
|
s.RegisterService(&_NamespaceService_serviceDesc, srv)
|
|
}
|
|
|
|
func _NamespaceService_ListNamespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListNamespacesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(NamespaceServiceServer).ListNamespaces(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.NamespaceService/ListNamespaces",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(NamespaceServiceServer).ListNamespaces(ctx, req.(*ListNamespacesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _NamespaceService_CreateNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateNamespaceRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(NamespaceServiceServer).CreateNamespace(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.NamespaceService/CreateNamespace",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(NamespaceServiceServer).CreateNamespace(ctx, req.(*CreateNamespaceRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _NamespaceService_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "api.NamespaceService",
|
|
HandlerType: (*NamespaceServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "ListNamespaces",
|
|
Handler: _NamespaceService_ListNamespaces_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateNamespace",
|
|
Handler: _NamespaceService_CreateNamespace_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "namespace.proto",
|
|
}
|