resourcepb

package
v0.0.4-0...-de66a47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthResource        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowResource          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupResource = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Resource_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "resource.Resource",
	HandlerType: (*ResourceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateIndex",
			Handler:    _Resource_CreateIndex_Handler,
		},
		{
			MethodName: "DeleteIndex",
			Handler:    _Resource_DeleteIndex_Handler,
		},
		{
			MethodName: "GetClaim",
			Handler:    _Resource_GetClaim_Handler,
		},
		{
			MethodName: "Claim",
			Handler:    _Resource_Claim_Handler,
		},
		{
			MethodName: "DeleteClaim",
			Handler:    _Resource_DeleteClaim_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "WatchClaim",
			Handler:       _Resource_WatchClaim_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "pkg/proto/resourcepb/resource.proto",
}

Resource_ServiceDesc is the grpc.ServiceDesc for Resource service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var StatusCode_name = map[int32]string{
	0: "Valid",
	1: "InValid",
	2: "Unknown",
}
View Source
var StatusCode_value = map[string]int32{
	"Valid":   0,
	"InValid": 1,
	"Unknown": 2,
}

Functions

func RegisterResourceServer

func RegisterResourceServer(s grpc.ServiceRegistrar, srv ResourceServer)

Types

type ClaimRequest

type ClaimRequest struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Spec                 string   `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
	ExpiryTime           string   `protobuf:"bytes,3,opt,name=expiryTime,proto3" json:"expiryTime,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ClaimRequest) Descriptor

func (*ClaimRequest) Descriptor() ([]byte, []int)

func (*ClaimRequest) GetExpiryTime

func (m *ClaimRequest) GetExpiryTime() string

func (*ClaimRequest) GetHeader

func (m *ClaimRequest) GetHeader() *Header

func (*ClaimRequest) GetSpec

func (m *ClaimRequest) GetSpec() string

func (*ClaimRequest) Marshal

func (m *ClaimRequest) Marshal() (dAtA []byte, err error)

func (*ClaimRequest) MarshalTo

func (m *ClaimRequest) MarshalTo(dAtA []byte) (int, error)

func (*ClaimRequest) MarshalToSizedBuffer

func (m *ClaimRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClaimRequest) ProtoMessage

func (*ClaimRequest) ProtoMessage()

func (*ClaimRequest) Reset

func (m *ClaimRequest) Reset()

func (*ClaimRequest) Size

func (m *ClaimRequest) Size() (n int)

func (*ClaimRequest) String

func (m *ClaimRequest) String() string

func (*ClaimRequest) Unmarshal

func (m *ClaimRequest) Unmarshal(dAtA []byte) error

func (*ClaimRequest) XXX_DiscardUnknown

func (m *ClaimRequest) XXX_DiscardUnknown()

func (*ClaimRequest) XXX_Marshal

func (m *ClaimRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClaimRequest) XXX_Merge

func (m *ClaimRequest) XXX_Merge(src proto.Message)

func (*ClaimRequest) XXX_Size

func (m *ClaimRequest) XXX_Size() int

func (*ClaimRequest) XXX_Unmarshal

func (m *ClaimRequest) XXX_Unmarshal(b []byte) error

type ClaimResponse

type ClaimResponse struct {
	Header               *Header    `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Spec                 string     `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
	Status               string     `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
	StatusCode           StatusCode `protobuf:"varint,4,opt,name=statusCode,proto3,enum=resource.StatusCode" json:"statusCode,omitempty"`
	ExpiryTime           string     `protobuf:"bytes,5,opt,name=expiryTime,proto3" json:"expiryTime,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*ClaimResponse) Descriptor

func (*ClaimResponse) Descriptor() ([]byte, []int)

func (*ClaimResponse) GetExpiryTime

func (m *ClaimResponse) GetExpiryTime() string

func (*ClaimResponse) GetHeader

func (m *ClaimResponse) GetHeader() *Header

func (*ClaimResponse) GetSpec

func (m *ClaimResponse) GetSpec() string

func (*ClaimResponse) GetStatus

func (m *ClaimResponse) GetStatus() string

func (*ClaimResponse) GetStatusCode

func (m *ClaimResponse) GetStatusCode() StatusCode

func (*ClaimResponse) Marshal

func (m *ClaimResponse) Marshal() (dAtA []byte, err error)

func (*ClaimResponse) MarshalTo

func (m *ClaimResponse) MarshalTo(dAtA []byte) (int, error)

func (*ClaimResponse) MarshalToSizedBuffer

func (m *ClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClaimResponse) ProtoMessage

func (*ClaimResponse) ProtoMessage()

func (*ClaimResponse) Reset

func (m *ClaimResponse) Reset()

func (*ClaimResponse) Size

func (m *ClaimResponse) Size() (n int)

func (*ClaimResponse) String

func (m *ClaimResponse) String() string

func (*ClaimResponse) Unmarshal

func (m *ClaimResponse) Unmarshal(dAtA []byte) error

func (*ClaimResponse) XXX_DiscardUnknown

func (m *ClaimResponse) XXX_DiscardUnknown()

func (*ClaimResponse) XXX_Marshal

func (m *ClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClaimResponse) XXX_Merge

func (m *ClaimResponse) XXX_Merge(src proto.Message)

func (*ClaimResponse) XXX_Size

func (m *ClaimResponse) XXX_Size() int

func (*ClaimResponse) XXX_Unmarshal

func (m *ClaimResponse) XXX_Unmarshal(b []byte) error

type EmptyResponse

type EmptyResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*EmptyResponse) Descriptor

func (*EmptyResponse) Descriptor() ([]byte, []int)

func (*EmptyResponse) Marshal

func (m *EmptyResponse) Marshal() (dAtA []byte, err error)

func (*EmptyResponse) MarshalTo

func (m *EmptyResponse) MarshalTo(dAtA []byte) (int, error)

func (*EmptyResponse) MarshalToSizedBuffer

func (m *EmptyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EmptyResponse) ProtoMessage

func (*EmptyResponse) ProtoMessage()

func (*EmptyResponse) Reset

func (m *EmptyResponse) Reset()

func (*EmptyResponse) Size

func (m *EmptyResponse) Size() (n int)

func (*EmptyResponse) String

func (m *EmptyResponse) String() string

func (*EmptyResponse) Unmarshal

func (m *EmptyResponse) Unmarshal(dAtA []byte) error

func (*EmptyResponse) XXX_DiscardUnknown

func (m *EmptyResponse) XXX_DiscardUnknown()

func (*EmptyResponse) XXX_Marshal

func (m *EmptyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EmptyResponse) XXX_Merge

func (m *EmptyResponse) XXX_Merge(src proto.Message)

func (*EmptyResponse) XXX_Size

func (m *EmptyResponse) XXX_Size() int

func (*EmptyResponse) XXX_Unmarshal

func (m *EmptyResponse) XXX_Unmarshal(b []byte) error

type GVK

type GVK struct {
	Group                string   `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
	Version              string   `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	Kind                 string   `protobuf:"bytes,3,opt,name=kind,proto3" json:"kind,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GVK) Descriptor

func (*GVK) Descriptor() ([]byte, []int)

func (*GVK) GetGroup

func (m *GVK) GetGroup() string

func (*GVK) GetKind

func (m *GVK) GetKind() string

func (*GVK) GetVersion

func (m *GVK) GetVersion() string

func (*GVK) Marshal

func (m *GVK) Marshal() (dAtA []byte, err error)

func (*GVK) MarshalTo

func (m *GVK) MarshalTo(dAtA []byte) (int, error)

func (*GVK) MarshalToSizedBuffer

func (m *GVK) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GVK) ProtoMessage

func (*GVK) ProtoMessage()

func (*GVK) Reset

func (m *GVK) Reset()

func (*GVK) Size

func (m *GVK) Size() (n int)

func (*GVK) String

func (m *GVK) String() string

func (*GVK) Unmarshal

func (m *GVK) Unmarshal(dAtA []byte) error

func (*GVK) XXX_DiscardUnknown

func (m *GVK) XXX_DiscardUnknown()

func (*GVK) XXX_Marshal

func (m *GVK) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GVK) XXX_Merge

func (m *GVK) XXX_Merge(src proto.Message)

func (*GVK) XXX_Size

func (m *GVK) XXX_Size() int

func (*GVK) XXX_Unmarshal

func (m *GVK) XXX_Unmarshal(b []byte) error
type Header struct {
	Gvk                  *GVK     `protobuf:"bytes,1,opt,name=gvk,proto3" json:"gvk,omitempty"`
	Nsn                  *NSN     `protobuf:"bytes,2,opt,name=nsn,proto3" json:"nsn,omitempty"`
	OwnerGvk             *GVK     `protobuf:"bytes,3,opt,name=ownerGvk,proto3" json:"ownerGvk,omitempty"`
	OwnerNsn             *NSN     `protobuf:"bytes,4,opt,name=ownerNsn,proto3" json:"ownerNsn,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Header) Descriptor

func (*Header) Descriptor() ([]byte, []int)

func (*Header) GetGvk

func (m *Header) GetGvk() *GVK

func (*Header) GetNsn

func (m *Header) GetNsn() *NSN

func (*Header) GetOwnerGvk

func (m *Header) GetOwnerGvk() *GVK

func (*Header) GetOwnerNsn

func (m *Header) GetOwnerNsn() *NSN

func (*Header) Marshal

func (m *Header) Marshal() (dAtA []byte, err error)

func (*Header) MarshalTo

func (m *Header) MarshalTo(dAtA []byte) (int, error)

func (*Header) MarshalToSizedBuffer

func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) Size

func (m *Header) Size() (n int)

func (*Header) String

func (m *Header) String() string

func (*Header) Unmarshal

func (m *Header) Unmarshal(dAtA []byte) error

func (*Header) XXX_DiscardUnknown

func (m *Header) XXX_DiscardUnknown()

func (*Header) XXX_Marshal

func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Header) XXX_Merge

func (m *Header) XXX_Merge(src proto.Message)

func (*Header) XXX_Size

func (m *Header) XXX_Size() int

func (*Header) XXX_Unmarshal

func (m *Header) XXX_Unmarshal(b []byte) error

type Instance

type Instance struct {
	Nsn                  *NSN     `protobuf:"bytes,1,opt,name=nsn,proto3" json:"nsn,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Instance) Descriptor

func (*Instance) Descriptor() ([]byte, []int)

func (*Instance) GetNsn

func (m *Instance) GetNsn() *NSN

func (*Instance) Marshal

func (m *Instance) Marshal() (dAtA []byte, err error)

func (*Instance) MarshalTo

func (m *Instance) MarshalTo(dAtA []byte) (int, error)

func (*Instance) MarshalToSizedBuffer

func (m *Instance) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Instance) ProtoMessage

func (*Instance) ProtoMessage()

func (*Instance) Reset

func (m *Instance) Reset()

func (*Instance) Size

func (m *Instance) Size() (n int)

func (*Instance) String

func (m *Instance) String() string

func (*Instance) Unmarshal

func (m *Instance) Unmarshal(dAtA []byte) error

func (*Instance) XXX_DiscardUnknown

func (m *Instance) XXX_DiscardUnknown()

func (*Instance) XXX_Marshal

func (m *Instance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Instance) XXX_Merge

func (m *Instance) XXX_Merge(src proto.Message)

func (*Instance) XXX_Size

func (m *Instance) XXX_Size() int

func (*Instance) XXX_Unmarshal

func (m *Instance) XXX_Unmarshal(b []byte) error

type NSN

type NSN struct {
	Namespace            string   `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*NSN) Descriptor

func (*NSN) Descriptor() ([]byte, []int)

func (*NSN) GetName

func (m *NSN) GetName() string

func (*NSN) GetNamespace

func (m *NSN) GetNamespace() string

func (*NSN) Marshal

func (m *NSN) Marshal() (dAtA []byte, err error)

func (*NSN) MarshalTo

func (m *NSN) MarshalTo(dAtA []byte) (int, error)

func (*NSN) MarshalToSizedBuffer

func (m *NSN) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NSN) ProtoMessage

func (*NSN) ProtoMessage()

func (*NSN) Reset

func (m *NSN) Reset()

func (*NSN) Size

func (m *NSN) Size() (n int)

func (*NSN) String

func (m *NSN) String() string

func (*NSN) Unmarshal

func (m *NSN) Unmarshal(dAtA []byte) error

func (*NSN) XXX_DiscardUnknown

func (m *NSN) XXX_DiscardUnknown()

func (*NSN) XXX_Marshal

func (m *NSN) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NSN) XXX_Merge

func (m *NSN) XXX_Merge(src proto.Message)

func (*NSN) XXX_Size

func (m *NSN) XXX_Size() int

func (*NSN) XXX_Unmarshal

func (m *NSN) XXX_Unmarshal(b []byte) error

type ResourceClient

type ResourceClient interface {
	// create an index in the ressource backend
	CreateIndex(ctx context.Context, in *ClaimRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
	DeleteIndex(ctx context.Context, in *ClaimRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
	// services within an index in the resource backend
	GetClaim(ctx context.Context, in *ClaimRequest, opts ...grpc.CallOption) (*ClaimResponse, error)
	Claim(ctx context.Context, in *ClaimRequest, opts ...grpc.CallOption) (*ClaimResponse, error)
	DeleteClaim(ctx context.Context, in *ClaimRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
	WatchClaim(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Resource_WatchClaimClient, error)
}

ResourceClient is the client API for Resource 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.

func NewResourceClient

func NewResourceClient(cc grpc.ClientConnInterface) ResourceClient

type ResourceServer

type ResourceServer interface {
	// create an index in the ressource backend
	CreateIndex(context.Context, *ClaimRequest) (*EmptyResponse, error)
	DeleteIndex(context.Context, *ClaimRequest) (*EmptyResponse, error)
	// services within an index in the resource backend
	GetClaim(context.Context, *ClaimRequest) (*ClaimResponse, error)
	Claim(context.Context, *ClaimRequest) (*ClaimResponse, error)
	DeleteClaim(context.Context, *ClaimRequest) (*EmptyResponse, error)
	WatchClaim(*WatchRequest, Resource_WatchClaimServer) error
	// contains filtered or unexported methods
}

ResourceServer is the server API for Resource service. All implementations must embed UnimplementedResourceServer for forward compatibility

type Resource_WatchClaimClient

type Resource_WatchClaimClient interface {
	Recv() (*WatchResponse, error)
	grpc.ClientStream
}

type Resource_WatchClaimServer

type Resource_WatchClaimServer interface {
	Send(*WatchResponse) error
	grpc.ServerStream
}

type StatusCode

type StatusCode int32
const (
	StatusCode_Valid   StatusCode = 0
	StatusCode_InValid StatusCode = 1
	StatusCode_Unknown StatusCode = 2
)

func (StatusCode) EnumDescriptor

func (StatusCode) EnumDescriptor() ([]byte, []int)

func (StatusCode) String

func (x StatusCode) String() string

type UnimplementedResourceServer

type UnimplementedResourceServer struct {
}

UnimplementedResourceServer must be embedded to have forward compatible implementations.

func (UnimplementedResourceServer) Claim

func (UnimplementedResourceServer) CreateIndex

func (UnimplementedResourceServer) DeleteClaim

func (UnimplementedResourceServer) DeleteIndex

func (UnimplementedResourceServer) GetClaim

func (UnimplementedResourceServer) WatchClaim

type UnsafeResourceServer

type UnsafeResourceServer interface {
	// contains filtered or unexported methods
}

UnsafeResourceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ResourceServer will result in compilation errors.

type WatchRequest

type WatchRequest struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*WatchRequest) Descriptor

func (*WatchRequest) Descriptor() ([]byte, []int)

func (*WatchRequest) GetHeader

func (m *WatchRequest) GetHeader() *Header

func (*WatchRequest) Marshal

func (m *WatchRequest) Marshal() (dAtA []byte, err error)

func (*WatchRequest) MarshalTo

func (m *WatchRequest) MarshalTo(dAtA []byte) (int, error)

func (*WatchRequest) MarshalToSizedBuffer

func (m *WatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*WatchRequest) ProtoMessage

func (*WatchRequest) ProtoMessage()

func (*WatchRequest) Reset

func (m *WatchRequest) Reset()

func (*WatchRequest) Size

func (m *WatchRequest) Size() (n int)

func (*WatchRequest) String

func (m *WatchRequest) String() string

func (*WatchRequest) Unmarshal

func (m *WatchRequest) Unmarshal(dAtA []byte) error

func (*WatchRequest) XXX_DiscardUnknown

func (m *WatchRequest) XXX_DiscardUnknown()

func (*WatchRequest) XXX_Marshal

func (m *WatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WatchRequest) XXX_Merge

func (m *WatchRequest) XXX_Merge(src proto.Message)

func (*WatchRequest) XXX_Size

func (m *WatchRequest) XXX_Size() int

func (*WatchRequest) XXX_Unmarshal

func (m *WatchRequest) XXX_Unmarshal(b []byte) error

type WatchResponse

type WatchResponse struct {
	Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// string spec = 2;
	// string status = 3;
	StatusCode           StatusCode `protobuf:"varint,2,opt,name=statusCode,proto3,enum=resource.StatusCode" json:"statusCode,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*WatchResponse) Descriptor

func (*WatchResponse) Descriptor() ([]byte, []int)

func (*WatchResponse) GetHeader

func (m *WatchResponse) GetHeader() *Header

func (*WatchResponse) GetStatusCode

func (m *WatchResponse) GetStatusCode() StatusCode

func (*WatchResponse) Marshal

func (m *WatchResponse) Marshal() (dAtA []byte, err error)

func (*WatchResponse) MarshalTo

func (m *WatchResponse) MarshalTo(dAtA []byte) (int, error)

func (*WatchResponse) MarshalToSizedBuffer

func (m *WatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*WatchResponse) ProtoMessage

func (*WatchResponse) ProtoMessage()

func (*WatchResponse) Reset

func (m *WatchResponse) Reset()

func (*WatchResponse) Size

func (m *WatchResponse) Size() (n int)

func (*WatchResponse) String

func (m *WatchResponse) String() string

func (*WatchResponse) Unmarshal

func (m *WatchResponse) Unmarshal(dAtA []byte) error

func (*WatchResponse) XXX_DiscardUnknown

func (m *WatchResponse) XXX_DiscardUnknown()

func (*WatchResponse) XXX_Marshal

func (m *WatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WatchResponse) XXX_Merge

func (m *WatchResponse) XXX_Merge(src proto.Message)

func (*WatchResponse) XXX_Size

func (m *WatchResponse) XXX_Size() int

func (*WatchResponse) XXX_Unmarshal

func (m *WatchResponse) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL