genconnect

package
v0.0.0-...-da789b0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GenerateServiceGenerateProcedure is the fully-qualified name of the GenerateService's Generate
	// RPC.
	GenerateServiceGenerateProcedure = "/generate.GenerateService/Generate"
	// GenerateServiceGenerateImplementationProcedure is the fully-qualified name of the
	// GenerateService's GenerateImplementation RPC.
	GenerateServiceGenerateImplementationProcedure = "/generate.GenerateService/GenerateImplementation"
	// GenerateServiceInferNodeTypeProcedure is the fully-qualified name of the GenerateService's
	// InferNodeType RPC.
	GenerateServiceInferNodeTypeProcedure = "/generate.GenerateService/InferNodeType"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// ProjectServiceAddMethodProcedure is the fully-qualified name of the ProjectService's AddMethod
	// RPC.
	ProjectServiceAddMethodProcedure = "/project.ProjectService/AddMethod"
	// ProjectServiceCreateProjectProcedure is the fully-qualified name of the ProjectService's
	// CreateProject RPC.
	ProjectServiceCreateProjectProcedure = "/project.ProjectService/CreateProject"
	// ProjectServiceDeleteProjectProcedure is the fully-qualified name of the ProjectService's
	// DeleteProject RPC.
	ProjectServiceDeleteProjectProcedure = "/project.ProjectService/DeleteProject"
	// ProjectServiceEnumerateProvidersProcedure is the fully-qualified name of the ProjectService's
	// EnumerateProviders RPC.
	ProjectServiceEnumerateProvidersProcedure = "/project.ProjectService/EnumerateProviders"
	// ProjectServiceExportProjectProcedure is the fully-qualified name of the ProjectService's
	// ExportProject RPC.
	ProjectServiceExportProjectProcedure = "/project.ProjectService/ExportProject"
	// ProjectServiceGenerateAIStubProcedure is the fully-qualified name of the ProjectService's
	// GenerateAIStub RPC.
	ProjectServiceGenerateAIStubProcedure = "/project.ProjectService/GenerateAIStub"
	// ProjectServiceGetGRPCServerInfoProcedure is the fully-qualified name of the ProjectService's
	// GetGRPCServerInfo RPC.
	ProjectServiceGetGRPCServerInfoProcedure = "/project.ProjectService/GetGRPCServerInfo"
	// ProjectServiceGetNodeInfoProcedure is the fully-qualified name of the ProjectService's
	// GetNodeInfo RPC.
	ProjectServiceGetNodeInfoProcedure = "/project.ProjectService/GetNodeInfo"
	// ProjectServiceGetProjectProcedure is the fully-qualified name of the ProjectService's GetProject
	// RPC.
	ProjectServiceGetProjectProcedure = "/project.ProjectService/GetProject"
	// ProjectServiceGetProjectTypesProcedure is the fully-qualified name of the ProjectService's
	// GetProjectTypes RPC.
	ProjectServiceGetProjectTypesProcedure = "/project.ProjectService/GetProjectTypes"
	// ProjectServiceGetProjectsProcedure is the fully-qualified name of the ProjectService's
	// GetProjects RPC.
	ProjectServiceGetProjectsProcedure = "/project.ProjectService/GetProjects"
	// ProjectServiceGetRunningWorkflowsProcedure is the fully-qualified name of the ProjectService's
	// GetRunningWorkflows RPC.
	ProjectServiceGetRunningWorkflowsProcedure = "/project.ProjectService/GetRunningWorkflows"
	// ProjectServiceGetWorkflowRunsProcedure is the fully-qualified name of the ProjectService's
	// GetWorkflowRuns RPC.
	ProjectServiceGetWorkflowRunsProcedure = "/project.ProjectService/GetWorkflowRuns"
	// ProjectServiceLoadProjectProcedure is the fully-qualified name of the ProjectService's
	// LoadProject RPC.
	ProjectServiceLoadProjectProcedure = "/project.ProjectService/LoadProject"
	// ProjectServiceNewNodeProcedure is the fully-qualified name of the ProjectService's NewNode RPC.
	ProjectServiceNewNodeProcedure = "/project.ProjectService/NewNode"
	// ProjectServiceRunGRPCMethodProcedure is the fully-qualified name of the ProjectService's
	// RunGRPCMethod RPC.
	ProjectServiceRunGRPCMethodProcedure = "/project.ProjectService/RunGRPCMethod"
	// ProjectServiceRunWorkflowProcedure is the fully-qualified name of the ProjectService's
	// RunWorkflow RPC.
	ProjectServiceRunWorkflowProcedure = "/project.ProjectService/RunWorkflow"
	// ProjectServiceSaveProjectProcedure is the fully-qualified name of the ProjectService's
	// SaveProject RPC.
	ProjectServiceSaveProjectProcedure = "/project.ProjectService/SaveProject"
	// ProjectServiceStopWorkflowProcedure is the fully-qualified name of the ProjectService's
	// StopWorkflow RPC.
	ProjectServiceStopWorkflowProcedure = "/project.ProjectService/StopWorkflow"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// GenerateServiceName is the fully-qualified name of the GenerateService service.
	GenerateServiceName = "generate.GenerateService"
)
View Source
const (
	// OpenAIServiceName is the fully-qualified name of the OpenAIService service.
	OpenAIServiceName = "openai.OpenAIService"
)
View Source
const (
	// OpenAIServicePromptProcedure is the fully-qualified name of the OpenAIService's Prompt RPC.
	OpenAIServicePromptProcedure = "/openai.OpenAIService/Prompt"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// ProjectServiceName is the fully-qualified name of the ProjectService service.
	ProjectServiceName = "project.ProjectService"
)

Variables

This section is empty.

Functions

func NewGenerateServiceHandler

func NewGenerateServiceHandler(svc GenerateServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewGenerateServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewOpenAIServiceHandler

func NewOpenAIServiceHandler(svc OpenAIServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewOpenAIServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewProjectServiceHandler

func NewProjectServiceHandler(svc ProjectServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewProjectServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type GenerateServiceClient

GenerateServiceClient is a client for the generate.GenerateService service.

func NewGenerateServiceClient

func NewGenerateServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) GenerateServiceClient

NewGenerateServiceClient constructs a client for the generate.GenerateService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type GenerateServiceHandler

GenerateServiceHandler is an implementation of the generate.GenerateService service.

type OpenAIServiceClient

type OpenAIServiceClient interface {
	Prompt(context.Context, *connect_go.Request[gen.PromptRequest]) (*connect_go.Response[gen.PromptResponse], error)
}

OpenAIServiceClient is a client for the openai.OpenAIService service.

func NewOpenAIServiceClient

func NewOpenAIServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) OpenAIServiceClient

NewOpenAIServiceClient constructs a client for the openai.OpenAIService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type OpenAIServiceHandler

type OpenAIServiceHandler interface {
	Prompt(context.Context, *connect_go.Request[gen.PromptRequest]) (*connect_go.Response[gen.PromptResponse], error)
}

OpenAIServiceHandler is an implementation of the openai.OpenAIService service.

type ProjectServiceClient

type ProjectServiceClient interface {
	AddMethod(context.Context, *connect_go.Request[gen.AddMethodRequest]) (*connect_go.Response[gen.AddMethodResponse], error)
	CreateProject(context.Context, *connect_go.Request[gen.CreateProjectRequest]) (*connect_go.Response[gen.CreateProjectResponse], error)
	DeleteProject(context.Context, *connect_go.Request[gen.DeleteProjectRequest]) (*connect_go.Response[gen.DeleteProjectResponse], error)
	EnumerateProviders(context.Context, *connect_go.Request[gen.GetProvidersRequest]) (*connect_go.Response[gen.GetProvidersResponse], error)
	ExportProject(context.Context, *connect_go.Request[gen.ExportProjectRequest]) (*connect_go.Response[gen.ExportProjectResponse], error)
	GenerateAIStub(context.Context, *connect_go.Request[gen.GenerateAIStubRequest]) (*connect_go.Response[gen.GenerateCode], error)
	GetGRPCServerInfo(context.Context, *connect_go.Request[gen.GetGRPCServerInfoRequest]) (*connect_go.Response[gen.GetGRPCServerInfoResponse], error)
	GetNodeInfo(context.Context, *connect_go.Request[gen.GetNodeInfoRequest]) (*connect_go.Response[gen.GetNodeInfoResponse], error)
	GetProject(context.Context, *connect_go.Request[gen.GetProjectRequest]) (*connect_go.Response[gen.GetProjectResponse], error)
	GetProjectTypes(context.Context, *connect_go.Request[gen.GetProjectTypesRequest]) (*connect_go.Response[gen.ProjectTypes], error)
	GetProjects(context.Context, *connect_go.Request[gen.GetProjectsRequest]) (*connect_go.Response[gen.GetProjectsResponse], error)
	GetRunningWorkflows(context.Context, *connect_go.Request[gen.GetRunningWorkflowsRequest]) (*connect_go.Response[gen.GetRunningWorkflowResponse], error)
	GetWorkflowRuns(context.Context, *connect_go.Request[gen.GetWorkflowRunsRequest]) (*connect_go.Response[gen.GetWorkflowRunsResponse], error)
	LoadProject(context.Context, *connect_go.Request[gen.LoadProjectRequest]) (*connect_go.Response[gen.LoadProjectResponse], error)
	NewNode(context.Context, *connect_go.Request[gen.NewNodeRequest]) (*connect_go.Response[gen.NewNodeResponse], error)
	RunGRPCMethod(context.Context, *connect_go.Request[gen.RunGRPCMethodRequest]) (*connect_go.ServerStreamForClient[gen.NodeExecution], error)
	RunWorkflow(context.Context, *connect_go.Request[gen.RunWorkflowRequest]) (*connect_go.ServerStreamForClient[gen.NodeExecution], error)
	SaveProject(context.Context, *connect_go.Request[gen.SaveProjectRequest]) (*connect_go.Response[gen.SaveProjectResponse], error)
	StopWorkflow(context.Context, *connect_go.Request[gen.StopWorkflowRequest]) (*connect_go.Response[gen.StopWorkflowResponse], error)
}

ProjectServiceClient is a client for the project.ProjectService service.

func NewProjectServiceClient

func NewProjectServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) ProjectServiceClient

NewProjectServiceClient constructs a client for the project.ProjectService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type ProjectServiceHandler

type ProjectServiceHandler interface {
	AddMethod(context.Context, *connect_go.Request[gen.AddMethodRequest]) (*connect_go.Response[gen.AddMethodResponse], error)
	CreateProject(context.Context, *connect_go.Request[gen.CreateProjectRequest]) (*connect_go.Response[gen.CreateProjectResponse], error)
	DeleteProject(context.Context, *connect_go.Request[gen.DeleteProjectRequest]) (*connect_go.Response[gen.DeleteProjectResponse], error)
	EnumerateProviders(context.Context, *connect_go.Request[gen.GetProvidersRequest]) (*connect_go.Response[gen.GetProvidersResponse], error)
	ExportProject(context.Context, *connect_go.Request[gen.ExportProjectRequest]) (*connect_go.Response[gen.ExportProjectResponse], error)
	GenerateAIStub(context.Context, *connect_go.Request[gen.GenerateAIStubRequest]) (*connect_go.Response[gen.GenerateCode], error)
	GetGRPCServerInfo(context.Context, *connect_go.Request[gen.GetGRPCServerInfoRequest]) (*connect_go.Response[gen.GetGRPCServerInfoResponse], error)
	GetNodeInfo(context.Context, *connect_go.Request[gen.GetNodeInfoRequest]) (*connect_go.Response[gen.GetNodeInfoResponse], error)
	GetProject(context.Context, *connect_go.Request[gen.GetProjectRequest]) (*connect_go.Response[gen.GetProjectResponse], error)
	GetProjectTypes(context.Context, *connect_go.Request[gen.GetProjectTypesRequest]) (*connect_go.Response[gen.ProjectTypes], error)
	GetProjects(context.Context, *connect_go.Request[gen.GetProjectsRequest]) (*connect_go.Response[gen.GetProjectsResponse], error)
	GetRunningWorkflows(context.Context, *connect_go.Request[gen.GetRunningWorkflowsRequest]) (*connect_go.Response[gen.GetRunningWorkflowResponse], error)
	GetWorkflowRuns(context.Context, *connect_go.Request[gen.GetWorkflowRunsRequest]) (*connect_go.Response[gen.GetWorkflowRunsResponse], error)
	LoadProject(context.Context, *connect_go.Request[gen.LoadProjectRequest]) (*connect_go.Response[gen.LoadProjectResponse], error)
	NewNode(context.Context, *connect_go.Request[gen.NewNodeRequest]) (*connect_go.Response[gen.NewNodeResponse], error)
	RunGRPCMethod(context.Context, *connect_go.Request[gen.RunGRPCMethodRequest], *connect_go.ServerStream[gen.NodeExecution]) error
	RunWorkflow(context.Context, *connect_go.Request[gen.RunWorkflowRequest], *connect_go.ServerStream[gen.NodeExecution]) error
	SaveProject(context.Context, *connect_go.Request[gen.SaveProjectRequest]) (*connect_go.Response[gen.SaveProjectResponse], error)
	StopWorkflow(context.Context, *connect_go.Request[gen.StopWorkflowRequest]) (*connect_go.Response[gen.StopWorkflowResponse], error)
}

ProjectServiceHandler is an implementation of the project.ProjectService service.

type UnimplementedGenerateServiceHandler

type UnimplementedGenerateServiceHandler struct{}

UnimplementedGenerateServiceHandler returns CodeUnimplemented from all methods.

type UnimplementedOpenAIServiceHandler

type UnimplementedOpenAIServiceHandler struct{}

UnimplementedOpenAIServiceHandler returns CodeUnimplemented from all methods.

type UnimplementedProjectServiceHandler

type UnimplementedProjectServiceHandler struct{}

UnimplementedProjectServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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