262 lines
12 KiB
Go
262 lines
12 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.1
|
|
// - protoc v7.34.1
|
|
// source: galaxy_repository.proto
|
|
|
|
package generated
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// 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 (
|
|
GalaxyRepository_TestConnection_FullMethodName = "/galaxy_repository.v1.GalaxyRepository/TestConnection"
|
|
GalaxyRepository_GetLastDeployTime_FullMethodName = "/galaxy_repository.v1.GalaxyRepository/GetLastDeployTime"
|
|
GalaxyRepository_DiscoverHierarchy_FullMethodName = "/galaxy_repository.v1.GalaxyRepository/DiscoverHierarchy"
|
|
GalaxyRepository_WatchDeployEvents_FullMethodName = "/galaxy_repository.v1.GalaxyRepository/WatchDeployEvents"
|
|
)
|
|
|
|
// GalaxyRepositoryClient is the client API for GalaxyRepository 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.
|
|
//
|
|
// Read-only browse over the AVEVA System Platform Galaxy Repository (ZB SQL
|
|
// database). Lets clients enumerate the deployed object hierarchy and each
|
|
// object's dynamic attributes so they know what tag references to subscribe
|
|
// to via the MxAccessGateway service.
|
|
type GalaxyRepositoryClient interface {
|
|
TestConnection(ctx context.Context, in *TestConnectionRequest, opts ...grpc.CallOption) (*TestConnectionReply, error)
|
|
GetLastDeployTime(ctx context.Context, in *GetLastDeployTimeRequest, opts ...grpc.CallOption) (*GetLastDeployTimeReply, error)
|
|
DiscoverHierarchy(ctx context.Context, in *DiscoverHierarchyRequest, opts ...grpc.CallOption) (*DiscoverHierarchyReply, error)
|
|
// Server-stream of deploy events. The server emits the current state immediately
|
|
// on subscribe (so clients can bootstrap their cache without waiting for the next
|
|
// deploy), then emits one event each time the gateway's hierarchy cache observes
|
|
// a new galaxy.time_of_last_deploy. The sequence field is monotonically
|
|
// increasing per server start; gaps indicate the per-subscriber buffer dropped
|
|
// older events because the client was too slow.
|
|
WatchDeployEvents(ctx context.Context, in *WatchDeployEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DeployEvent], error)
|
|
}
|
|
|
|
type galaxyRepositoryClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewGalaxyRepositoryClient(cc grpc.ClientConnInterface) GalaxyRepositoryClient {
|
|
return &galaxyRepositoryClient{cc}
|
|
}
|
|
|
|
func (c *galaxyRepositoryClient) TestConnection(ctx context.Context, in *TestConnectionRequest, opts ...grpc.CallOption) (*TestConnectionReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(TestConnectionReply)
|
|
err := c.cc.Invoke(ctx, GalaxyRepository_TestConnection_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *galaxyRepositoryClient) GetLastDeployTime(ctx context.Context, in *GetLastDeployTimeRequest, opts ...grpc.CallOption) (*GetLastDeployTimeReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetLastDeployTimeReply)
|
|
err := c.cc.Invoke(ctx, GalaxyRepository_GetLastDeployTime_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *galaxyRepositoryClient) DiscoverHierarchy(ctx context.Context, in *DiscoverHierarchyRequest, opts ...grpc.CallOption) (*DiscoverHierarchyReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(DiscoverHierarchyReply)
|
|
err := c.cc.Invoke(ctx, GalaxyRepository_DiscoverHierarchy_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *galaxyRepositoryClient) WatchDeployEvents(ctx context.Context, in *WatchDeployEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DeployEvent], error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
stream, err := c.cc.NewStream(ctx, &GalaxyRepository_ServiceDesc.Streams[0], GalaxyRepository_WatchDeployEvents_FullMethodName, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &grpc.GenericClientStream[WatchDeployEventsRequest, DeployEvent]{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 GalaxyRepository_WatchDeployEventsClient = grpc.ServerStreamingClient[DeployEvent]
|
|
|
|
// GalaxyRepositoryServer is the server API for GalaxyRepository service.
|
|
// All implementations must embed UnimplementedGalaxyRepositoryServer
|
|
// for forward compatibility.
|
|
//
|
|
// Read-only browse over the AVEVA System Platform Galaxy Repository (ZB SQL
|
|
// database). Lets clients enumerate the deployed object hierarchy and each
|
|
// object's dynamic attributes so they know what tag references to subscribe
|
|
// to via the MxAccessGateway service.
|
|
type GalaxyRepositoryServer interface {
|
|
TestConnection(context.Context, *TestConnectionRequest) (*TestConnectionReply, error)
|
|
GetLastDeployTime(context.Context, *GetLastDeployTimeRequest) (*GetLastDeployTimeReply, error)
|
|
DiscoverHierarchy(context.Context, *DiscoverHierarchyRequest) (*DiscoverHierarchyReply, error)
|
|
// Server-stream of deploy events. The server emits the current state immediately
|
|
// on subscribe (so clients can bootstrap their cache without waiting for the next
|
|
// deploy), then emits one event each time the gateway's hierarchy cache observes
|
|
// a new galaxy.time_of_last_deploy. The sequence field is monotonically
|
|
// increasing per server start; gaps indicate the per-subscriber buffer dropped
|
|
// older events because the client was too slow.
|
|
WatchDeployEvents(*WatchDeployEventsRequest, grpc.ServerStreamingServer[DeployEvent]) error
|
|
mustEmbedUnimplementedGalaxyRepositoryServer()
|
|
}
|
|
|
|
// UnimplementedGalaxyRepositoryServer must 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 UnimplementedGalaxyRepositoryServer struct{}
|
|
|
|
func (UnimplementedGalaxyRepositoryServer) TestConnection(context.Context, *TestConnectionRequest) (*TestConnectionReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method TestConnection not implemented")
|
|
}
|
|
func (UnimplementedGalaxyRepositoryServer) GetLastDeployTime(context.Context, *GetLastDeployTimeRequest) (*GetLastDeployTimeReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetLastDeployTime not implemented")
|
|
}
|
|
func (UnimplementedGalaxyRepositoryServer) DiscoverHierarchy(context.Context, *DiscoverHierarchyRequest) (*DiscoverHierarchyReply, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DiscoverHierarchy not implemented")
|
|
}
|
|
func (UnimplementedGalaxyRepositoryServer) WatchDeployEvents(*WatchDeployEventsRequest, grpc.ServerStreamingServer[DeployEvent]) error {
|
|
return status.Error(codes.Unimplemented, "method WatchDeployEvents not implemented")
|
|
}
|
|
func (UnimplementedGalaxyRepositoryServer) mustEmbedUnimplementedGalaxyRepositoryServer() {}
|
|
func (UnimplementedGalaxyRepositoryServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeGalaxyRepositoryServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to GalaxyRepositoryServer will
|
|
// result in compilation errors.
|
|
type UnsafeGalaxyRepositoryServer interface {
|
|
mustEmbedUnimplementedGalaxyRepositoryServer()
|
|
}
|
|
|
|
func RegisterGalaxyRepositoryServer(s grpc.ServiceRegistrar, srv GalaxyRepositoryServer) {
|
|
// If the following call panics, it indicates UnimplementedGalaxyRepositoryServer 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(&GalaxyRepository_ServiceDesc, srv)
|
|
}
|
|
|
|
func _GalaxyRepository_TestConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(TestConnectionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(GalaxyRepositoryServer).TestConnection(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: GalaxyRepository_TestConnection_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(GalaxyRepositoryServer).TestConnection(ctx, req.(*TestConnectionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _GalaxyRepository_GetLastDeployTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetLastDeployTimeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(GalaxyRepositoryServer).GetLastDeployTime(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: GalaxyRepository_GetLastDeployTime_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(GalaxyRepositoryServer).GetLastDeployTime(ctx, req.(*GetLastDeployTimeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _GalaxyRepository_DiscoverHierarchy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DiscoverHierarchyRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(GalaxyRepositoryServer).DiscoverHierarchy(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: GalaxyRepository_DiscoverHierarchy_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(GalaxyRepositoryServer).DiscoverHierarchy(ctx, req.(*DiscoverHierarchyRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _GalaxyRepository_WatchDeployEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
m := new(WatchDeployEventsRequest)
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
return err
|
|
}
|
|
return srv.(GalaxyRepositoryServer).WatchDeployEvents(m, &grpc.GenericServerStream[WatchDeployEventsRequest, DeployEvent]{ServerStream: stream})
|
|
}
|
|
|
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
|
type GalaxyRepository_WatchDeployEventsServer = grpc.ServerStreamingServer[DeployEvent]
|
|
|
|
// GalaxyRepository_ServiceDesc is the grpc.ServiceDesc for GalaxyRepository service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var GalaxyRepository_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "galaxy_repository.v1.GalaxyRepository",
|
|
HandlerType: (*GalaxyRepositoryServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "TestConnection",
|
|
Handler: _GalaxyRepository_TestConnection_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetLastDeployTime",
|
|
Handler: _GalaxyRepository_GetLastDeployTime_Handler,
|
|
},
|
|
{
|
|
MethodName: "DiscoverHierarchy",
|
|
Handler: _GalaxyRepository_DiscoverHierarchy_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "WatchDeployEvents",
|
|
Handler: _GalaxyRepository_WatchDeployEvents_Handler,
|
|
ServerStreams: true,
|
|
},
|
|
},
|
|
Metadata: "galaxy_repository.proto",
|
|
}
|