| // Code generated by protoc-gen-go-grpc. DO NOT EDIT. |
| // versions: |
| // - protoc-gen-go-grpc v1.1.0 |
| // - protoc v3.17.1 |
| // source: chromiumos/config/api/test/tls/commontls.proto |
| |
| package tls |
| |
| import ( |
| context "context" |
| longrunning "go.chromium.org/chromiumos/config/go/api/test/tls/dependencies/longrunning" |
| grpc "google.golang.org/grpc" |
| codes "google.golang.org/grpc/codes" |
| status "google.golang.org/grpc/status" |
| emptypb "google.golang.org/protobuf/types/known/emptypb" |
| ) |
| |
| // 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 |
| |
| // CommonClient is the client API for Common 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 CommonClient interface { |
| // ExecDutCommand runs a command on a DUT. |
| // |
| // The working directory is /. |
| // A tty is not spawned for the command. |
| // The user and group is root. |
| // All signals have their default dispositions and are not masked. |
| // The umask is set to 0. |
| // |
| // The environment contains: |
| // |
| // TERM=dumb |
| // PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin |
| // LANG=en_US.UTF-8 |
| // USER=root |
| // HOME=/root |
| // |
| // The environment MAY also contain SSH client variables. |
| // The environment SHALL NOT contain variables not mentioned above. |
| // |
| // If the stream is interrupted, the implementation MAY attempt to |
| // stop the command by sending SIGINT, SIGHUP, SIGTERM, or SIGKILL. |
| ExecDutCommand(ctx context.Context, in *ExecDutCommandRequest, opts ...grpc.CallOption) (Common_ExecDutCommandClient, error) |
| // ProvisionDut installs a specified version of Chrome OS on the DUT, along |
| // with any specified DLCs. |
| // |
| // If the DUT is already on the specified version of Chrome OS, the OS will |
| // not be provisioned. |
| // |
| // If the DUT already has the specified list of DLCs, only the missing DLCs |
| // will be provisioned. |
| ProvisionDut(ctx context.Context, in *ProvisionDutRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) |
| // ProvisionLacros installs a specified version of Lacros on the DUT. |
| // |
| // If the DUT already has the specified version of Lacros, Lacros will not be |
| // provisioned. |
| ProvisionLacros(ctx context.Context, in *ProvisionLacrosRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) |
| // ProvisionAsh installs a specific version of AshChrome on the DUT. |
| // |
| ProvisionAsh(ctx context.Context, in *ProvisionAshRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) |
| // FetchCrashes gets a stream of all crash reports currently on the DUT. |
| // |
| // The stream returned may split up a crash over multiple |
| // `FetchCrashesResponse` protos. See the definition of that proto for |
| // details. |
| // |
| // This call is read-only: it doesn't delete the crashes that it reads. |
| FetchCrashes(ctx context.Context, in *FetchCrashesRequest, opts ...grpc.CallOption) (Common_FetchCrashesClient, error) |
| // CreateFakeOmaha starts a fake Omaha service on TLS and exposes the |
| // listened port to the DUT. |
| CreateFakeOmaha(ctx context.Context, in *CreateFakeOmahaRequest, opts ...grpc.CallOption) (*FakeOmaha, error) |
| // DeleteFakeOmaha deletes the specified fake Omaha resource created by |
| // CreateFakeOmaha. |
| DeleteFakeOmaha(ctx context.Context, in *DeleteFakeOmahaRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) |
| } |
| |
| type commonClient struct { |
| cc grpc.ClientConnInterface |
| } |
| |
| func NewCommonClient(cc grpc.ClientConnInterface) CommonClient { |
| return &commonClient{cc} |
| } |
| |
| func (c *commonClient) ExecDutCommand(ctx context.Context, in *ExecDutCommandRequest, opts ...grpc.CallOption) (Common_ExecDutCommandClient, error) { |
| stream, err := c.cc.NewStream(ctx, &Common_ServiceDesc.Streams[0], "/chromiumos.config.api.test.tls.Common/ExecDutCommand", opts...) |
| if err != nil { |
| return nil, err |
| } |
| x := &commonExecDutCommandClient{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 |
| } |
| |
| type Common_ExecDutCommandClient interface { |
| Recv() (*ExecDutCommandResponse, error) |
| grpc.ClientStream |
| } |
| |
| type commonExecDutCommandClient struct { |
| grpc.ClientStream |
| } |
| |
| func (x *commonExecDutCommandClient) Recv() (*ExecDutCommandResponse, error) { |
| m := new(ExecDutCommandResponse) |
| if err := x.ClientStream.RecvMsg(m); err != nil { |
| return nil, err |
| } |
| return m, nil |
| } |
| |
| func (c *commonClient) ProvisionDut(ctx context.Context, in *ProvisionDutRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { |
| out := new(longrunning.Operation) |
| err := c.cc.Invoke(ctx, "/chromiumos.config.api.test.tls.Common/ProvisionDut", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *commonClient) ProvisionLacros(ctx context.Context, in *ProvisionLacrosRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { |
| out := new(longrunning.Operation) |
| err := c.cc.Invoke(ctx, "/chromiumos.config.api.test.tls.Common/ProvisionLacros", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *commonClient) ProvisionAsh(ctx context.Context, in *ProvisionAshRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { |
| out := new(longrunning.Operation) |
| err := c.cc.Invoke(ctx, "/chromiumos.config.api.test.tls.Common/ProvisionAsh", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *commonClient) FetchCrashes(ctx context.Context, in *FetchCrashesRequest, opts ...grpc.CallOption) (Common_FetchCrashesClient, error) { |
| stream, err := c.cc.NewStream(ctx, &Common_ServiceDesc.Streams[1], "/chromiumos.config.api.test.tls.Common/FetchCrashes", opts...) |
| if err != nil { |
| return nil, err |
| } |
| x := &commonFetchCrashesClient{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 |
| } |
| |
| type Common_FetchCrashesClient interface { |
| Recv() (*FetchCrashesResponse, error) |
| grpc.ClientStream |
| } |
| |
| type commonFetchCrashesClient struct { |
| grpc.ClientStream |
| } |
| |
| func (x *commonFetchCrashesClient) Recv() (*FetchCrashesResponse, error) { |
| m := new(FetchCrashesResponse) |
| if err := x.ClientStream.RecvMsg(m); err != nil { |
| return nil, err |
| } |
| return m, nil |
| } |
| |
| func (c *commonClient) CreateFakeOmaha(ctx context.Context, in *CreateFakeOmahaRequest, opts ...grpc.CallOption) (*FakeOmaha, error) { |
| out := new(FakeOmaha) |
| err := c.cc.Invoke(ctx, "/chromiumos.config.api.test.tls.Common/CreateFakeOmaha", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *commonClient) DeleteFakeOmaha(ctx context.Context, in *DeleteFakeOmahaRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { |
| out := new(emptypb.Empty) |
| err := c.cc.Invoke(ctx, "/chromiumos.config.api.test.tls.Common/DeleteFakeOmaha", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| // CommonServer is the server API for Common service. |
| // All implementations should embed UnimplementedCommonServer |
| // for forward compatibility |
| type CommonServer interface { |
| // ExecDutCommand runs a command on a DUT. |
| // |
| // The working directory is /. |
| // A tty is not spawned for the command. |
| // The user and group is root. |
| // All signals have their default dispositions and are not masked. |
| // The umask is set to 0. |
| // |
| // The environment contains: |
| // |
| // TERM=dumb |
| // PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin |
| // LANG=en_US.UTF-8 |
| // USER=root |
| // HOME=/root |
| // |
| // The environment MAY also contain SSH client variables. |
| // The environment SHALL NOT contain variables not mentioned above. |
| // |
| // If the stream is interrupted, the implementation MAY attempt to |
| // stop the command by sending SIGINT, SIGHUP, SIGTERM, or SIGKILL. |
| ExecDutCommand(*ExecDutCommandRequest, Common_ExecDutCommandServer) error |
| // ProvisionDut installs a specified version of Chrome OS on the DUT, along |
| // with any specified DLCs. |
| // |
| // If the DUT is already on the specified version of Chrome OS, the OS will |
| // not be provisioned. |
| // |
| // If the DUT already has the specified list of DLCs, only the missing DLCs |
| // will be provisioned. |
| ProvisionDut(context.Context, *ProvisionDutRequest) (*longrunning.Operation, error) |
| // ProvisionLacros installs a specified version of Lacros on the DUT. |
| // |
| // If the DUT already has the specified version of Lacros, Lacros will not be |
| // provisioned. |
| ProvisionLacros(context.Context, *ProvisionLacrosRequest) (*longrunning.Operation, error) |
| // ProvisionAsh installs a specific version of AshChrome on the DUT. |
| // |
| ProvisionAsh(context.Context, *ProvisionAshRequest) (*longrunning.Operation, error) |
| // FetchCrashes gets a stream of all crash reports currently on the DUT. |
| // |
| // The stream returned may split up a crash over multiple |
| // `FetchCrashesResponse` protos. See the definition of that proto for |
| // details. |
| // |
| // This call is read-only: it doesn't delete the crashes that it reads. |
| FetchCrashes(*FetchCrashesRequest, Common_FetchCrashesServer) error |
| // CreateFakeOmaha starts a fake Omaha service on TLS and exposes the |
| // listened port to the DUT. |
| CreateFakeOmaha(context.Context, *CreateFakeOmahaRequest) (*FakeOmaha, error) |
| // DeleteFakeOmaha deletes the specified fake Omaha resource created by |
| // CreateFakeOmaha. |
| DeleteFakeOmaha(context.Context, *DeleteFakeOmahaRequest) (*emptypb.Empty, error) |
| } |
| |
| // UnimplementedCommonServer should be embedded to have forward compatible implementations. |
| type UnimplementedCommonServer struct { |
| } |
| |
| func (UnimplementedCommonServer) ExecDutCommand(*ExecDutCommandRequest, Common_ExecDutCommandServer) error { |
| return status.Errorf(codes.Unimplemented, "method ExecDutCommand not implemented") |
| } |
| func (UnimplementedCommonServer) ProvisionDut(context.Context, *ProvisionDutRequest) (*longrunning.Operation, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method ProvisionDut not implemented") |
| } |
| func (UnimplementedCommonServer) ProvisionLacros(context.Context, *ProvisionLacrosRequest) (*longrunning.Operation, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method ProvisionLacros not implemented") |
| } |
| func (UnimplementedCommonServer) ProvisionAsh(context.Context, *ProvisionAshRequest) (*longrunning.Operation, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method ProvisionAsh not implemented") |
| } |
| func (UnimplementedCommonServer) FetchCrashes(*FetchCrashesRequest, Common_FetchCrashesServer) error { |
| return status.Errorf(codes.Unimplemented, "method FetchCrashes not implemented") |
| } |
| func (UnimplementedCommonServer) CreateFakeOmaha(context.Context, *CreateFakeOmahaRequest) (*FakeOmaha, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method CreateFakeOmaha not implemented") |
| } |
| func (UnimplementedCommonServer) DeleteFakeOmaha(context.Context, *DeleteFakeOmahaRequest) (*emptypb.Empty, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method DeleteFakeOmaha not implemented") |
| } |
| |
| // UnsafeCommonServer may be embedded to opt out of forward compatibility for this service. |
| // Use of this interface is not recommended, as added methods to CommonServer will |
| // result in compilation errors. |
| type UnsafeCommonServer interface { |
| mustEmbedUnimplementedCommonServer() |
| } |
| |
| func RegisterCommonServer(s grpc.ServiceRegistrar, srv CommonServer) { |
| s.RegisterService(&Common_ServiceDesc, srv) |
| } |
| |
| func _Common_ExecDutCommand_Handler(srv interface{}, stream grpc.ServerStream) error { |
| m := new(ExecDutCommandRequest) |
| if err := stream.RecvMsg(m); err != nil { |
| return err |
| } |
| return srv.(CommonServer).ExecDutCommand(m, &commonExecDutCommandServer{stream}) |
| } |
| |
| type Common_ExecDutCommandServer interface { |
| Send(*ExecDutCommandResponse) error |
| grpc.ServerStream |
| } |
| |
| type commonExecDutCommandServer struct { |
| grpc.ServerStream |
| } |
| |
| func (x *commonExecDutCommandServer) Send(m *ExecDutCommandResponse) error { |
| return x.ServerStream.SendMsg(m) |
| } |
| |
| func _Common_ProvisionDut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(ProvisionDutRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(CommonServer).ProvisionDut(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/chromiumos.config.api.test.tls.Common/ProvisionDut", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(CommonServer).ProvisionDut(ctx, req.(*ProvisionDutRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _Common_ProvisionLacros_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(ProvisionLacrosRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(CommonServer).ProvisionLacros(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/chromiumos.config.api.test.tls.Common/ProvisionLacros", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(CommonServer).ProvisionLacros(ctx, req.(*ProvisionLacrosRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _Common_ProvisionAsh_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(ProvisionAshRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(CommonServer).ProvisionAsh(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/chromiumos.config.api.test.tls.Common/ProvisionAsh", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(CommonServer).ProvisionAsh(ctx, req.(*ProvisionAshRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _Common_FetchCrashes_Handler(srv interface{}, stream grpc.ServerStream) error { |
| m := new(FetchCrashesRequest) |
| if err := stream.RecvMsg(m); err != nil { |
| return err |
| } |
| return srv.(CommonServer).FetchCrashes(m, &commonFetchCrashesServer{stream}) |
| } |
| |
| type Common_FetchCrashesServer interface { |
| Send(*FetchCrashesResponse) error |
| grpc.ServerStream |
| } |
| |
| type commonFetchCrashesServer struct { |
| grpc.ServerStream |
| } |
| |
| func (x *commonFetchCrashesServer) Send(m *FetchCrashesResponse) error { |
| return x.ServerStream.SendMsg(m) |
| } |
| |
| func _Common_CreateFakeOmaha_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(CreateFakeOmahaRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(CommonServer).CreateFakeOmaha(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/chromiumos.config.api.test.tls.Common/CreateFakeOmaha", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(CommonServer).CreateFakeOmaha(ctx, req.(*CreateFakeOmahaRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _Common_DeleteFakeOmaha_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(DeleteFakeOmahaRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(CommonServer).DeleteFakeOmaha(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/chromiumos.config.api.test.tls.Common/DeleteFakeOmaha", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(CommonServer).DeleteFakeOmaha(ctx, req.(*DeleteFakeOmahaRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| // Common_ServiceDesc is the grpc.ServiceDesc for Common service. |
| // It's only intended for direct use with grpc.RegisterService, |
| // and not to be introspected or modified (even as a copy) |
| var Common_ServiceDesc = grpc.ServiceDesc{ |
| ServiceName: "chromiumos.config.api.test.tls.Common", |
| HandlerType: (*CommonServer)(nil), |
| Methods: []grpc.MethodDesc{ |
| { |
| MethodName: "ProvisionDut", |
| Handler: _Common_ProvisionDut_Handler, |
| }, |
| { |
| MethodName: "ProvisionLacros", |
| Handler: _Common_ProvisionLacros_Handler, |
| }, |
| { |
| MethodName: "ProvisionAsh", |
| Handler: _Common_ProvisionAsh_Handler, |
| }, |
| { |
| MethodName: "CreateFakeOmaha", |
| Handler: _Common_CreateFakeOmaha_Handler, |
| }, |
| { |
| MethodName: "DeleteFakeOmaha", |
| Handler: _Common_DeleteFakeOmaha_Handler, |
| }, |
| }, |
| Streams: []grpc.StreamDesc{ |
| { |
| StreamName: "ExecDutCommand", |
| Handler: _Common_ExecDutCommand_Handler, |
| ServerStreams: true, |
| }, |
| { |
| StreamName: "FetchCrashes", |
| Handler: _Common_FetchCrashes_Handler, |
| ServerStreams: true, |
| }, |
| }, |
| Metadata: "chromiumos/config/api/test/tls/commontls.proto", |
| } |