Documentation ¶
Index ¶
Constants ¶
const (
// GotmplServiceName is the fully-qualified name of the GotmplService service.
GotmplServiceName = "gotmpl.v1.GotmplService"
)
Variables ¶
This section is empty.
Functions ¶
func NewGotmplServiceHandler ¶
func NewGotmplServiceHandler(svc GotmplServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)
NewGotmplServiceHandler 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 GotmplServiceClient ¶
type GotmplServiceClient interface { // Execute executes a go template. Execute(context.Context, *connect_go.Request[v1.ExecuteRequest]) (*connect_go.Response[v1.ExecuteResponse], error) }
GotmplServiceClient is a client for the gotmpl.v1.GotmplService service.
func NewGotmplServiceClient ¶
func NewGotmplServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) GotmplServiceClient
NewGotmplServiceClient constructs a client for the gotmpl.v1.GotmplService 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 GotmplServiceHandler ¶
type GotmplServiceHandler interface { // Execute executes a go template. Execute(context.Context, *connect_go.Request[v1.ExecuteRequest]) (*connect_go.Response[v1.ExecuteResponse], error) }
GotmplServiceHandler is an implementation of the gotmpl.v1.GotmplService service.
type UnimplementedGotmplServiceHandler ¶
type UnimplementedGotmplServiceHandler struct{}
UnimplementedGotmplServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedGotmplServiceHandler) Execute ¶
func (UnimplementedGotmplServiceHandler) Execute(context.Context, *connect_go.Request[v1.ExecuteRequest]) (*connect_go.Response[v1.ExecuteResponse], error)