blob: 5cc6c680a0da6733bc65688aaf3963bcc8c8295b [file] [log] [blame]
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package api
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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// AndroidServiceClient is the client API for AndroidService 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.
type AndroidServiceClient interface {
// The MarkStable method uprevs Android, verifies the newly revved package
// can be emerged, and returns the new package info.
MarkStable(ctx context.Context, in *MarkStableRequest, opts ...grpc.CallOption) (*MarkStableResponse, error)
// Unpin the Android package version. Added in R76.
UnpinVersion(ctx context.Context, in *UnpinVersionRequest, opts ...grpc.CallOption) (*UnpinVersionResponse, error)
}
type androidServiceClient struct {
cc grpc.ClientConnInterface
}
func NewAndroidServiceClient(cc grpc.ClientConnInterface) AndroidServiceClient {
return &androidServiceClient{cc}
}
func (c *androidServiceClient) MarkStable(ctx context.Context, in *MarkStableRequest, opts ...grpc.CallOption) (*MarkStableResponse, error) {
out := new(MarkStableResponse)
err := c.cc.Invoke(ctx, "/chromite.api.AndroidService/MarkStable", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *androidServiceClient) UnpinVersion(ctx context.Context, in *UnpinVersionRequest, opts ...grpc.CallOption) (*UnpinVersionResponse, error) {
out := new(UnpinVersionResponse)
err := c.cc.Invoke(ctx, "/chromite.api.AndroidService/UnpinVersion", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AndroidServiceServer is the server API for AndroidService service.
// All implementations must embed UnimplementedAndroidServiceServer
// for forward compatibility
type AndroidServiceServer interface {
// The MarkStable method uprevs Android, verifies the newly revved package
// can be emerged, and returns the new package info.
MarkStable(context.Context, *MarkStableRequest) (*MarkStableResponse, error)
// Unpin the Android package version. Added in R76.
UnpinVersion(context.Context, *UnpinVersionRequest) (*UnpinVersionResponse, error)
mustEmbedUnimplementedAndroidServiceServer()
}
// UnimplementedAndroidServiceServer must be embedded to have forward compatible implementations.
type UnimplementedAndroidServiceServer struct {
}
func (UnimplementedAndroidServiceServer) MarkStable(context.Context, *MarkStableRequest) (*MarkStableResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method MarkStable not implemented")
}
func (UnimplementedAndroidServiceServer) UnpinVersion(context.Context, *UnpinVersionRequest) (*UnpinVersionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UnpinVersion not implemented")
}
func (UnimplementedAndroidServiceServer) mustEmbedUnimplementedAndroidServiceServer() {}
// UnsafeAndroidServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AndroidServiceServer will
// result in compilation errors.
type UnsafeAndroidServiceServer interface {
mustEmbedUnimplementedAndroidServiceServer()
}
func RegisterAndroidServiceServer(s grpc.ServiceRegistrar, srv AndroidServiceServer) {
s.RegisterService(&AndroidService_ServiceDesc, srv)
}
func _AndroidService_MarkStable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MarkStableRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AndroidServiceServer).MarkStable(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/chromite.api.AndroidService/MarkStable",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AndroidServiceServer).MarkStable(ctx, req.(*MarkStableRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AndroidService_UnpinVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UnpinVersionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AndroidServiceServer).UnpinVersion(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/chromite.api.AndroidService/UnpinVersion",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AndroidServiceServer).UnpinVersion(ctx, req.(*UnpinVersionRequest))
}
return interceptor(ctx, in, info, handler)
}
// AndroidService_ServiceDesc is the grpc.ServiceDesc for AndroidService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AndroidService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "chromite.api.AndroidService",
HandlerType: (*AndroidServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "MarkStable",
Handler: _AndroidService_MarkStable_Handler,
},
{
MethodName: "UnpinVersion",
Handler: _AndroidService_UnpinVersion_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "chromite/api/android.proto",
}