Documentation
¶
Index ¶
- Constants
- func NewSolutionHandler(svc SolutionHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type SolutionClient
- type SolutionHandler
- type UnimplementedSolutionHandler
- func (UnimplementedSolutionHandler) Create(context.Context, *connect.Request[v0.CreateRequest]) (*connect.Response[v0.CreateResponse], error)
- func (UnimplementedSolutionHandler) GetSolutionInformation(context.Context, *connect.Request[v0.GetSolutionInformationRequest]) (*connect.Response[v0.GetSolutionInformationResponse], error)
- func (UnimplementedSolutionHandler) Package(context.Context, *connect.Request[v0.PackageRequest]) (*connect.Response[v0.PackageResponse], error)
- func (UnimplementedSolutionHandler) Render(context.Context, *connect.Request[v0.RenderRequest]) (*connect.Response[v0.RenderResponse], error)
- func (UnimplementedSolutionHandler) Update(context.Context, *connect.Request[v0.UpdateRequest]) (*connect.Response[v0.UpdateResponse], error)
Constants ¶
const ( // SolutionGetSolutionInformationProcedure is the fully-qualified name of the Solution's // GetSolutionInformation RPC. SolutionGetSolutionInformationProcedure = "/codefly.services.solution.v0.Solution/GetSolutionInformation" // SolutionCreateProcedure is the fully-qualified name of the Solution's Create RPC. SolutionCreateProcedure = "/codefly.services.solution.v0.Solution/Create" // SolutionUpdateProcedure is the fully-qualified name of the Solution's Update RPC. SolutionUpdateProcedure = "/codefly.services.solution.v0.Solution/Update" // SolutionPackageProcedure is the fully-qualified name of the Solution's Package RPC. SolutionPackageProcedure = "/codefly.services.solution.v0.Solution/Package" // SolutionRenderProcedure is the fully-qualified name of the Solution's Render RPC. SolutionRenderProcedure = "/codefly.services.solution.v0.Solution/Render" )
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.
const (
// SolutionName is the fully-qualified name of the Solution service.
SolutionName = "codefly.services.solution.v0.Solution"
)
Variables ¶
This section is empty.
Functions ¶
func NewSolutionHandler ¶
func NewSolutionHandler(svc SolutionHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewSolutionHandler 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 SolutionClient ¶
type SolutionClient interface {
// GetSolutionInformation returns the concrete artifact identity and the
// lifecycle operations this executor implements.
GetSolutionInformation(context.Context, *connect.Request[v0.GetSolutionInformationRequest]) (*connect.Response[v0.GetSolutionInformationResponse], error)
// Create scaffolds a new solution into a destination directory.
Create(context.Context, *connect.Request[v0.CreateRequest]) (*connect.Response[v0.CreateResponse], error)
// Update reconciles an existing solution source with the executor's template.
Update(context.Context, *connect.Request[v0.UpdateRequest]) (*connect.Response[v0.UpdateResponse], error)
// Package builds an OCI artifact from a solution source directory and pushes it.
Package(context.Context, *connect.Request[v0.PackageRequest]) (*connect.Response[v0.PackageResponse], error)
// Render pulls the packaged solution from artifact_reference and writes its
// manifests into a gitops destination.
Render(context.Context, *connect.Request[v0.RenderRequest]) (*connect.Response[v0.RenderResponse], error)
}
SolutionClient is a client for the codefly.services.solution.v0.Solution service.
func NewSolutionClient ¶
func NewSolutionClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SolutionClient
NewSolutionClient constructs a client for the codefly.services.solution.v0.Solution 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 SolutionHandler ¶
type SolutionHandler interface {
// GetSolutionInformation returns the concrete artifact identity and the
// lifecycle operations this executor implements.
GetSolutionInformation(context.Context, *connect.Request[v0.GetSolutionInformationRequest]) (*connect.Response[v0.GetSolutionInformationResponse], error)
// Create scaffolds a new solution into a destination directory.
Create(context.Context, *connect.Request[v0.CreateRequest]) (*connect.Response[v0.CreateResponse], error)
// Update reconciles an existing solution source with the executor's template.
Update(context.Context, *connect.Request[v0.UpdateRequest]) (*connect.Response[v0.UpdateResponse], error)
// Package builds an OCI artifact from a solution source directory and pushes it.
Package(context.Context, *connect.Request[v0.PackageRequest]) (*connect.Response[v0.PackageResponse], error)
// Render pulls the packaged solution from artifact_reference and writes its
// manifests into a gitops destination.
Render(context.Context, *connect.Request[v0.RenderRequest]) (*connect.Response[v0.RenderResponse], error)
}
SolutionHandler is an implementation of the codefly.services.solution.v0.Solution service.
type UnimplementedSolutionHandler ¶
type UnimplementedSolutionHandler struct{}
UnimplementedSolutionHandler returns CodeUnimplemented from all methods.
func (UnimplementedSolutionHandler) Create ¶
func (UnimplementedSolutionHandler) Create(context.Context, *connect.Request[v0.CreateRequest]) (*connect.Response[v0.CreateResponse], error)
func (UnimplementedSolutionHandler) GetSolutionInformation ¶
func (UnimplementedSolutionHandler) GetSolutionInformation(context.Context, *connect.Request[v0.GetSolutionInformationRequest]) (*connect.Response[v0.GetSolutionInformationResponse], error)
func (UnimplementedSolutionHandler) Package ¶
func (UnimplementedSolutionHandler) Package(context.Context, *connect.Request[v0.PackageRequest]) (*connect.Response[v0.PackageResponse], error)
func (UnimplementedSolutionHandler) Render ¶
func (UnimplementedSolutionHandler) Render(context.Context, *connect.Request[v0.RenderRequest]) (*connect.Response[v0.RenderResponse], error)
func (UnimplementedSolutionHandler) Update ¶
func (UnimplementedSolutionHandler) Update(context.Context, *connect.Request[v0.UpdateRequest]) (*connect.Response[v0.UpdateResponse], error)