codespace

package
v2.49.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CodespaceHost_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Codespaces.Grpc.CodespaceHostService.v1.CodespaceHost",
	HandlerType: (*CodespaceHostServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "NotifyCodespaceOfClientActivity",
			Handler:    _CodespaceHost_NotifyCodespaceOfClientActivity_Handler,
		},
		{
			MethodName: "RebuildContainerAsync",
			Handler:    _CodespaceHost_RebuildContainerAsync_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "codespace/codespace_host_service.v1.proto",
}

CodespaceHost_ServiceDesc is the grpc.ServiceDesc for CodespaceHost 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 File_codespace_codespace_host_service_v1_proto protoreflect.FileDescriptor

Functions

func RegisterCodespaceHostServer

func RegisterCodespaceHostServer(s grpc.ServiceRegistrar, srv CodespaceHostServer)

Types

type CodespaceHostClient

type CodespaceHostClient interface {
	NotifyCodespaceOfClientActivity(ctx context.Context, in *NotifyCodespaceOfClientActivityRequest, opts ...grpc.CallOption) (*NotifyCodespaceOfClientActivityResponse, error)
	RebuildContainerAsync(ctx context.Context, in *RebuildContainerRequest, opts ...grpc.CallOption) (*RebuildContainerResponse, error)
}

CodespaceHostClient is the client API for CodespaceHost 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 CodespaceHostServer

type CodespaceHostServer interface {
	NotifyCodespaceOfClientActivity(context.Context, *NotifyCodespaceOfClientActivityRequest) (*NotifyCodespaceOfClientActivityResponse, error)
	RebuildContainerAsync(context.Context, *RebuildContainerRequest) (*RebuildContainerResponse, error)
	// contains filtered or unexported methods
}

CodespaceHostServer is the server API for CodespaceHost service. All implementations must embed UnimplementedCodespaceHostServer for forward compatibility

type CodespaceHostServerMock added in v2.22.1

type CodespaceHostServerMock struct {
	// NotifyCodespaceOfClientActivityFunc mocks the NotifyCodespaceOfClientActivity method.
	NotifyCodespaceOfClientActivityFunc func(contextMoqParam context.Context, notifyCodespaceOfClientActivityRequest *NotifyCodespaceOfClientActivityRequest) (*NotifyCodespaceOfClientActivityResponse, error)

	// RebuildContainerAsyncFunc mocks the RebuildContainerAsync method.
	RebuildContainerAsyncFunc func(contextMoqParam context.Context, rebuildContainerRequest *RebuildContainerRequest) (*RebuildContainerResponse, error)
	// contains filtered or unexported fields
}

CodespaceHostServerMock is a mock implementation of CodespaceHostServer.

func TestSomethingThatUsesCodespaceHostServer(t *testing.T) {

	// make and configure a mocked CodespaceHostServer
	mockedCodespaceHostServer := &CodespaceHostServerMock{
		NotifyCodespaceOfClientActivityFunc: func(contextMoqParam context.Context, notifyCodespaceOfClientActivityRequest *NotifyCodespaceOfClientActivityRequest) (*NotifyCodespaceOfClientActivityResponse, error) {
			panic("mock out the NotifyCodespaceOfClientActivity method")
		},
		RebuildContainerAsyncFunc: func(contextMoqParam context.Context, rebuildContainerRequest *RebuildContainerRequest) (*RebuildContainerResponse, error) {
			panic("mock out the RebuildContainerAsync method")
		},
		mustEmbedUnimplementedCodespaceHostServerFunc: func()  {
			panic("mock out the mustEmbedUnimplementedCodespaceHostServer method")
		},
	}

	// use mockedCodespaceHostServer in code that requires CodespaceHostServer
	// and then make assertions.

}

func (*CodespaceHostServerMock) NotifyCodespaceOfClientActivity added in v2.22.1

func (mock *CodespaceHostServerMock) NotifyCodespaceOfClientActivity(contextMoqParam context.Context, notifyCodespaceOfClientActivityRequest *NotifyCodespaceOfClientActivityRequest) (*NotifyCodespaceOfClientActivityResponse, error)

NotifyCodespaceOfClientActivity calls NotifyCodespaceOfClientActivityFunc.

func (*CodespaceHostServerMock) NotifyCodespaceOfClientActivityCalls added in v2.22.1

func (mock *CodespaceHostServerMock) NotifyCodespaceOfClientActivityCalls() []struct {
	ContextMoqParam                        context.Context
	NotifyCodespaceOfClientActivityRequest *NotifyCodespaceOfClientActivityRequest
}

NotifyCodespaceOfClientActivityCalls gets all the calls that were made to NotifyCodespaceOfClientActivity. Check the length with:

len(mockedCodespaceHostServer.NotifyCodespaceOfClientActivityCalls())

func (*CodespaceHostServerMock) RebuildContainerAsync added in v2.22.1

func (mock *CodespaceHostServerMock) RebuildContainerAsync(contextMoqParam context.Context, rebuildContainerRequest *RebuildContainerRequest) (*RebuildContainerResponse, error)

RebuildContainerAsync calls RebuildContainerAsyncFunc.

func (*CodespaceHostServerMock) RebuildContainerAsyncCalls added in v2.22.1

func (mock *CodespaceHostServerMock) RebuildContainerAsyncCalls() []struct {
	ContextMoqParam         context.Context
	RebuildContainerRequest *RebuildContainerRequest
}

RebuildContainerAsyncCalls gets all the calls that were made to RebuildContainerAsync. Check the length with:

len(mockedCodespaceHostServer.RebuildContainerAsyncCalls())

type NotifyCodespaceOfClientActivityRequest

type NotifyCodespaceOfClientActivityRequest struct {
	ClientId         string   `protobuf:"bytes,1,opt,name=ClientId,proto3" json:"ClientId,omitempty"`
	ClientActivities []string `protobuf:"bytes,2,rep,name=ClientActivities,proto3" json:"ClientActivities,omitempty"`
	// contains filtered or unexported fields
}

func (*NotifyCodespaceOfClientActivityRequest) Descriptor deprecated

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

Deprecated: Use NotifyCodespaceOfClientActivityRequest.ProtoReflect.Descriptor instead.

func (*NotifyCodespaceOfClientActivityRequest) GetClientActivities

func (x *NotifyCodespaceOfClientActivityRequest) GetClientActivities() []string

func (*NotifyCodespaceOfClientActivityRequest) GetClientId

func (*NotifyCodespaceOfClientActivityRequest) ProtoMessage

func (*NotifyCodespaceOfClientActivityRequest) ProtoReflect

func (*NotifyCodespaceOfClientActivityRequest) Reset

func (*NotifyCodespaceOfClientActivityRequest) String

type NotifyCodespaceOfClientActivityResponse

type NotifyCodespaceOfClientActivityResponse struct {
	Result  bool   `protobuf:"varint,1,opt,name=Result,proto3" json:"Result,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	// contains filtered or unexported fields
}

func (*NotifyCodespaceOfClientActivityResponse) Descriptor deprecated

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

Deprecated: Use NotifyCodespaceOfClientActivityResponse.ProtoReflect.Descriptor instead.

func (*NotifyCodespaceOfClientActivityResponse) GetMessage

func (*NotifyCodespaceOfClientActivityResponse) GetResult

func (*NotifyCodespaceOfClientActivityResponse) ProtoMessage

func (*NotifyCodespaceOfClientActivityResponse) ProtoReflect

func (*NotifyCodespaceOfClientActivityResponse) Reset

func (*NotifyCodespaceOfClientActivityResponse) String

type RebuildContainerRequest

type RebuildContainerRequest struct {
	Incremental *bool `protobuf:"varint,1,opt,name=Incremental,proto3,oneof" json:"Incremental,omitempty"`
	// contains filtered or unexported fields
}

func (*RebuildContainerRequest) Descriptor deprecated

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

Deprecated: Use RebuildContainerRequest.ProtoReflect.Descriptor instead.

func (*RebuildContainerRequest) GetIncremental

func (x *RebuildContainerRequest) GetIncremental() bool

func (*RebuildContainerRequest) ProtoMessage

func (*RebuildContainerRequest) ProtoMessage()

func (*RebuildContainerRequest) ProtoReflect

func (x *RebuildContainerRequest) ProtoReflect() protoreflect.Message

func (*RebuildContainerRequest) Reset

func (x *RebuildContainerRequest) Reset()

func (*RebuildContainerRequest) String

func (x *RebuildContainerRequest) String() string

type RebuildContainerResponse

type RebuildContainerResponse struct {
	RebuildContainer bool `protobuf:"varint,1,opt,name=RebuildContainer,proto3" json:"RebuildContainer,omitempty"`
	// contains filtered or unexported fields
}

func (*RebuildContainerResponse) Descriptor deprecated

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

Deprecated: Use RebuildContainerResponse.ProtoReflect.Descriptor instead.

func (*RebuildContainerResponse) GetRebuildContainer

func (x *RebuildContainerResponse) GetRebuildContainer() bool

func (*RebuildContainerResponse) ProtoMessage

func (*RebuildContainerResponse) ProtoMessage()

func (*RebuildContainerResponse) ProtoReflect

func (x *RebuildContainerResponse) ProtoReflect() protoreflect.Message

func (*RebuildContainerResponse) Reset

func (x *RebuildContainerResponse) Reset()

func (*RebuildContainerResponse) String

func (x *RebuildContainerResponse) String() string

type UnimplementedCodespaceHostServer

type UnimplementedCodespaceHostServer struct {
}

UnimplementedCodespaceHostServer must be embedded to have forward compatible implementations.

func (UnimplementedCodespaceHostServer) RebuildContainerAsync

type UnsafeCodespaceHostServer

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

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

Jump to

Keyboard shortcuts

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