golang.org/x/build@v0.0.0-20240506185731-218518f32b70/maintner/maintnerd/apipb/api_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  
     3  package apipb
     4  
     5  import (
     6  	context "context"
     7  
     8  	grpc "google.golang.org/grpc"
     9  	codes "google.golang.org/grpc/codes"
    10  	status "google.golang.org/grpc/status"
    11  )
    12  
    13  // This is a compile-time assertion to ensure that this generated file
    14  // is compatible with the grpc package it is being compiled against.
    15  // Requires gRPC-Go v1.32.0 or later.
    16  const _ = grpc.SupportPackageIsVersion7
    17  
    18  // MaintnerServiceClient is the client API for MaintnerService service.
    19  //
    20  // 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.
    21  type MaintnerServiceClient interface {
    22  	// HasAncestor reports whether one commit contains another commit
    23  	// in its git history.
    24  	HasAncestor(ctx context.Context, in *HasAncestorRequest, opts ...grpc.CallOption) (*HasAncestorResponse, error)
    25  	// GetRef returns information about a git ref.
    26  	GetRef(ctx context.Context, in *GetRefRequest, opts ...grpc.CallOption) (*GetRefResponse, error)
    27  	// GoFindTryWork finds trybot work for the coordinator to build & test.
    28  	GoFindTryWork(ctx context.Context, in *GoFindTryWorkRequest, opts ...grpc.CallOption) (*GoFindTryWorkResponse, error)
    29  	// ListGoReleases lists Go releases sorted by version with latest first.
    30  	//
    31  	// A release is considered to exist for each git tag named "goX", "goX.Y", or
    32  	// "goX.Y.Z", as long as it has a corresponding "release-branch.goX" or
    33  	// "release-branch.goX.Y" release branch.
    34  	//
    35  	// ListGoReleases returns only the latest patch versions of releases which
    36  	// are considered supported per policy. For example, Go 1.12.6 and 1.11.11.
    37  	// The response is guaranteed to have two versions, otherwise an error
    38  	// is returned.
    39  	ListGoReleases(ctx context.Context, in *ListGoReleasesRequest, opts ...grpc.CallOption) (*ListGoReleasesResponse, error)
    40  	// GetDashboard returns the information for the build.golang.org
    41  	// dashboard. It does not (at least currently)
    42  	// contain any pass/fail information; it only contains information on the branches
    43  	// and commits themselves.
    44  	GetDashboard(ctx context.Context, in *DashboardRequest, opts ...grpc.CallOption) (*DashboardResponse, error)
    45  }
    46  
    47  type maintnerServiceClient struct {
    48  	cc grpc.ClientConnInterface
    49  }
    50  
    51  func NewMaintnerServiceClient(cc grpc.ClientConnInterface) MaintnerServiceClient {
    52  	return &maintnerServiceClient{cc}
    53  }
    54  
    55  func (c *maintnerServiceClient) HasAncestor(ctx context.Context, in *HasAncestorRequest, opts ...grpc.CallOption) (*HasAncestorResponse, error) {
    56  	out := new(HasAncestorResponse)
    57  	err := c.cc.Invoke(ctx, "/apipb.MaintnerService/HasAncestor", in, out, opts...)
    58  	if err != nil {
    59  		return nil, err
    60  	}
    61  	return out, nil
    62  }
    63  
    64  func (c *maintnerServiceClient) GetRef(ctx context.Context, in *GetRefRequest, opts ...grpc.CallOption) (*GetRefResponse, error) {
    65  	out := new(GetRefResponse)
    66  	err := c.cc.Invoke(ctx, "/apipb.MaintnerService/GetRef", in, out, opts...)
    67  	if err != nil {
    68  		return nil, err
    69  	}
    70  	return out, nil
    71  }
    72  
    73  func (c *maintnerServiceClient) GoFindTryWork(ctx context.Context, in *GoFindTryWorkRequest, opts ...grpc.CallOption) (*GoFindTryWorkResponse, error) {
    74  	out := new(GoFindTryWorkResponse)
    75  	err := c.cc.Invoke(ctx, "/apipb.MaintnerService/GoFindTryWork", in, out, opts...)
    76  	if err != nil {
    77  		return nil, err
    78  	}
    79  	return out, nil
    80  }
    81  
    82  func (c *maintnerServiceClient) ListGoReleases(ctx context.Context, in *ListGoReleasesRequest, opts ...grpc.CallOption) (*ListGoReleasesResponse, error) {
    83  	out := new(ListGoReleasesResponse)
    84  	err := c.cc.Invoke(ctx, "/apipb.MaintnerService/ListGoReleases", in, out, opts...)
    85  	if err != nil {
    86  		return nil, err
    87  	}
    88  	return out, nil
    89  }
    90  
    91  func (c *maintnerServiceClient) GetDashboard(ctx context.Context, in *DashboardRequest, opts ...grpc.CallOption) (*DashboardResponse, error) {
    92  	out := new(DashboardResponse)
    93  	err := c.cc.Invoke(ctx, "/apipb.MaintnerService/GetDashboard", in, out, opts...)
    94  	if err != nil {
    95  		return nil, err
    96  	}
    97  	return out, nil
    98  }
    99  
   100  // MaintnerServiceServer is the server API for MaintnerService service.
   101  // All implementations must embed UnimplementedMaintnerServiceServer
   102  // for forward compatibility
   103  type MaintnerServiceServer interface {
   104  	// HasAncestor reports whether one commit contains another commit
   105  	// in its git history.
   106  	HasAncestor(context.Context, *HasAncestorRequest) (*HasAncestorResponse, error)
   107  	// GetRef returns information about a git ref.
   108  	GetRef(context.Context, *GetRefRequest) (*GetRefResponse, error)
   109  	// GoFindTryWork finds trybot work for the coordinator to build & test.
   110  	GoFindTryWork(context.Context, *GoFindTryWorkRequest) (*GoFindTryWorkResponse, error)
   111  	// ListGoReleases lists Go releases sorted by version with latest first.
   112  	//
   113  	// A release is considered to exist for each git tag named "goX", "goX.Y", or
   114  	// "goX.Y.Z", as long as it has a corresponding "release-branch.goX" or
   115  	// "release-branch.goX.Y" release branch.
   116  	//
   117  	// ListGoReleases returns only the latest patch versions of releases which
   118  	// are considered supported per policy. For example, Go 1.12.6 and 1.11.11.
   119  	// The response is guaranteed to have two versions, otherwise an error
   120  	// is returned.
   121  	ListGoReleases(context.Context, *ListGoReleasesRequest) (*ListGoReleasesResponse, error)
   122  	// GetDashboard returns the information for the build.golang.org
   123  	// dashboard. It does not (at least currently)
   124  	// contain any pass/fail information; it only contains information on the branches
   125  	// and commits themselves.
   126  	GetDashboard(context.Context, *DashboardRequest) (*DashboardResponse, error)
   127  	mustEmbedUnimplementedMaintnerServiceServer()
   128  }
   129  
   130  // UnimplementedMaintnerServiceServer must be embedded to have forward compatible implementations.
   131  type UnimplementedMaintnerServiceServer struct {
   132  }
   133  
   134  func (UnimplementedMaintnerServiceServer) HasAncestor(context.Context, *HasAncestorRequest) (*HasAncestorResponse, error) {
   135  	return nil, status.Errorf(codes.Unimplemented, "method HasAncestor not implemented")
   136  }
   137  func (UnimplementedMaintnerServiceServer) GetRef(context.Context, *GetRefRequest) (*GetRefResponse, error) {
   138  	return nil, status.Errorf(codes.Unimplemented, "method GetRef not implemented")
   139  }
   140  func (UnimplementedMaintnerServiceServer) GoFindTryWork(context.Context, *GoFindTryWorkRequest) (*GoFindTryWorkResponse, error) {
   141  	return nil, status.Errorf(codes.Unimplemented, "method GoFindTryWork not implemented")
   142  }
   143  func (UnimplementedMaintnerServiceServer) ListGoReleases(context.Context, *ListGoReleasesRequest) (*ListGoReleasesResponse, error) {
   144  	return nil, status.Errorf(codes.Unimplemented, "method ListGoReleases not implemented")
   145  }
   146  func (UnimplementedMaintnerServiceServer) GetDashboard(context.Context, *DashboardRequest) (*DashboardResponse, error) {
   147  	return nil, status.Errorf(codes.Unimplemented, "method GetDashboard not implemented")
   148  }
   149  func (UnimplementedMaintnerServiceServer) mustEmbedUnimplementedMaintnerServiceServer() {}
   150  
   151  // UnsafeMaintnerServiceServer may be embedded to opt out of forward compatibility for this service.
   152  // Use of this interface is not recommended, as added methods to MaintnerServiceServer will
   153  // result in compilation errors.
   154  type UnsafeMaintnerServiceServer interface {
   155  	mustEmbedUnimplementedMaintnerServiceServer()
   156  }
   157  
   158  func RegisterMaintnerServiceServer(s grpc.ServiceRegistrar, srv MaintnerServiceServer) {
   159  	s.RegisterService(&MaintnerService_ServiceDesc, srv)
   160  }
   161  
   162  func _MaintnerService_HasAncestor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   163  	in := new(HasAncestorRequest)
   164  	if err := dec(in); err != nil {
   165  		return nil, err
   166  	}
   167  	if interceptor == nil {
   168  		return srv.(MaintnerServiceServer).HasAncestor(ctx, in)
   169  	}
   170  	info := &grpc.UnaryServerInfo{
   171  		Server:     srv,
   172  		FullMethod: "/apipb.MaintnerService/HasAncestor",
   173  	}
   174  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   175  		return srv.(MaintnerServiceServer).HasAncestor(ctx, req.(*HasAncestorRequest))
   176  	}
   177  	return interceptor(ctx, in, info, handler)
   178  }
   179  
   180  func _MaintnerService_GetRef_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   181  	in := new(GetRefRequest)
   182  	if err := dec(in); err != nil {
   183  		return nil, err
   184  	}
   185  	if interceptor == nil {
   186  		return srv.(MaintnerServiceServer).GetRef(ctx, in)
   187  	}
   188  	info := &grpc.UnaryServerInfo{
   189  		Server:     srv,
   190  		FullMethod: "/apipb.MaintnerService/GetRef",
   191  	}
   192  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   193  		return srv.(MaintnerServiceServer).GetRef(ctx, req.(*GetRefRequest))
   194  	}
   195  	return interceptor(ctx, in, info, handler)
   196  }
   197  
   198  func _MaintnerService_GoFindTryWork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   199  	in := new(GoFindTryWorkRequest)
   200  	if err := dec(in); err != nil {
   201  		return nil, err
   202  	}
   203  	if interceptor == nil {
   204  		return srv.(MaintnerServiceServer).GoFindTryWork(ctx, in)
   205  	}
   206  	info := &grpc.UnaryServerInfo{
   207  		Server:     srv,
   208  		FullMethod: "/apipb.MaintnerService/GoFindTryWork",
   209  	}
   210  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   211  		return srv.(MaintnerServiceServer).GoFindTryWork(ctx, req.(*GoFindTryWorkRequest))
   212  	}
   213  	return interceptor(ctx, in, info, handler)
   214  }
   215  
   216  func _MaintnerService_ListGoReleases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   217  	in := new(ListGoReleasesRequest)
   218  	if err := dec(in); err != nil {
   219  		return nil, err
   220  	}
   221  	if interceptor == nil {
   222  		return srv.(MaintnerServiceServer).ListGoReleases(ctx, in)
   223  	}
   224  	info := &grpc.UnaryServerInfo{
   225  		Server:     srv,
   226  		FullMethod: "/apipb.MaintnerService/ListGoReleases",
   227  	}
   228  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   229  		return srv.(MaintnerServiceServer).ListGoReleases(ctx, req.(*ListGoReleasesRequest))
   230  	}
   231  	return interceptor(ctx, in, info, handler)
   232  }
   233  
   234  func _MaintnerService_GetDashboard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   235  	in := new(DashboardRequest)
   236  	if err := dec(in); err != nil {
   237  		return nil, err
   238  	}
   239  	if interceptor == nil {
   240  		return srv.(MaintnerServiceServer).GetDashboard(ctx, in)
   241  	}
   242  	info := &grpc.UnaryServerInfo{
   243  		Server:     srv,
   244  		FullMethod: "/apipb.MaintnerService/GetDashboard",
   245  	}
   246  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   247  		return srv.(MaintnerServiceServer).GetDashboard(ctx, req.(*DashboardRequest))
   248  	}
   249  	return interceptor(ctx, in, info, handler)
   250  }
   251  
   252  // MaintnerService_ServiceDesc is the grpc.ServiceDesc for MaintnerService service.
   253  // It's only intended for direct use with grpc.RegisterService,
   254  // and not to be introspected or modified (even as a copy)
   255  var MaintnerService_ServiceDesc = grpc.ServiceDesc{
   256  	ServiceName: "apipb.MaintnerService",
   257  	HandlerType: (*MaintnerServiceServer)(nil),
   258  	Methods: []grpc.MethodDesc{
   259  		{
   260  			MethodName: "HasAncestor",
   261  			Handler:    _MaintnerService_HasAncestor_Handler,
   262  		},
   263  		{
   264  			MethodName: "GetRef",
   265  			Handler:    _MaintnerService_GetRef_Handler,
   266  		},
   267  		{
   268  			MethodName: "GoFindTryWork",
   269  			Handler:    _MaintnerService_GoFindTryWork_Handler,
   270  		},
   271  		{
   272  			MethodName: "ListGoReleases",
   273  			Handler:    _MaintnerService_ListGoReleases_Handler,
   274  		},
   275  		{
   276  			MethodName: "GetDashboard",
   277  			Handler:    _MaintnerService_GetDashboard_Handler,
   278  		},
   279  	},
   280  	Streams:  []grpc.StreamDesc{},
   281  	Metadata: "api.proto",
   282  }