Documentation ¶
Index ¶
- Constants
- func NewFormServiceHandler(svc FormServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type FormServiceClient
- type FormServiceHandler
- type UnimplementedFormServiceHandler
- func (UnimplementedFormServiceHandler) Create(context.Context, *connect.Request[v1.CreateRequest]) (*connect.Response[v1.CreateResponse], error)
- func (UnimplementedFormServiceHandler) GetById(context.Context, *connect.Request[v1.GetByIdRequest]) (*connect.Response[v1.GetByIdResponse], error)
- func (UnimplementedFormServiceHandler) GetQuestions(context.Context, *connect.Request[v1.GetQuestionsRequest]) (*connect.Response[v1.GetQuestionsResponse], error)
- func (UnimplementedFormServiceHandler) List(context.Context, *connect.Request[v1.ListRequest]) (*connect.Response[v1.ListResponse], error)
- func (UnimplementedFormServiceHandler) Update(context.Context, *connect.Request[v1.UpdateRequest]) (*connect.Response[v1.UpdateResponse], error)
Constants ¶
const ( // FormServiceGetByIdProcedure is the fully-qualified name of the FormService's GetById RPC. FormServiceGetByIdProcedure = "/form.v1.FormService/GetById" // FormServiceCreateProcedure is the fully-qualified name of the FormService's Create RPC. FormServiceCreateProcedure = "/form.v1.FormService/Create" // FormServiceListProcedure is the fully-qualified name of the FormService's List RPC. FormServiceListProcedure = "/form.v1.FormService/List" // FormServiceUpdateProcedure is the fully-qualified name of the FormService's Update RPC. FormServiceUpdateProcedure = "/form.v1.FormService/Update" // FormServiceGetQuestionsProcedure is the fully-qualified name of the FormService's GetQuestions // RPC. FormServiceGetQuestionsProcedure = "/form.v1.FormService/GetQuestions" )
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 (
// FormServiceName is the fully-qualified name of the FormService service.
FormServiceName = "form.v1.FormService"
)
Variables ¶
This section is empty.
Functions ¶
func NewFormServiceHandler ¶
func NewFormServiceHandler(svc FormServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewFormServiceHandler 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 FormServiceClient ¶
type FormServiceClient interface { GetById(context.Context, *connect.Request[v1.GetByIdRequest]) (*connect.Response[v1.GetByIdResponse], error) Create(context.Context, *connect.Request[v1.CreateRequest]) (*connect.Response[v1.CreateResponse], error) List(context.Context, *connect.Request[v1.ListRequest]) (*connect.Response[v1.ListResponse], error) // Updating the form will create a new version of the form with its contents // being the provided form Update(context.Context, *connect.Request[v1.UpdateRequest]) (*connect.Response[v1.UpdateResponse], error) GetQuestions(context.Context, *connect.Request[v1.GetQuestionsRequest]) (*connect.Response[v1.GetQuestionsResponse], error) }
FormServiceClient is a client for the form.v1.FormService service.
func NewFormServiceClient ¶
func NewFormServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) FormServiceClient
NewFormServiceClient constructs a client for the form.v1.FormService 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 FormServiceHandler ¶
type FormServiceHandler interface { GetById(context.Context, *connect.Request[v1.GetByIdRequest]) (*connect.Response[v1.GetByIdResponse], error) Create(context.Context, *connect.Request[v1.CreateRequest]) (*connect.Response[v1.CreateResponse], error) List(context.Context, *connect.Request[v1.ListRequest]) (*connect.Response[v1.ListResponse], error) // Updating the form will create a new version of the form with its contents // being the provided form Update(context.Context, *connect.Request[v1.UpdateRequest]) (*connect.Response[v1.UpdateResponse], error) GetQuestions(context.Context, *connect.Request[v1.GetQuestionsRequest]) (*connect.Response[v1.GetQuestionsResponse], error) }
FormServiceHandler is an implementation of the form.v1.FormService service.
type UnimplementedFormServiceHandler ¶
type UnimplementedFormServiceHandler struct{}
UnimplementedFormServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedFormServiceHandler) Create ¶
func (UnimplementedFormServiceHandler) Create(context.Context, *connect.Request[v1.CreateRequest]) (*connect.Response[v1.CreateResponse], error)
func (UnimplementedFormServiceHandler) GetById ¶
func (UnimplementedFormServiceHandler) GetById(context.Context, *connect.Request[v1.GetByIdRequest]) (*connect.Response[v1.GetByIdResponse], error)
func (UnimplementedFormServiceHandler) GetQuestions ¶
func (UnimplementedFormServiceHandler) GetQuestions(context.Context, *connect.Request[v1.GetQuestionsRequest]) (*connect.Response[v1.GetQuestionsResponse], error)
func (UnimplementedFormServiceHandler) List ¶
func (UnimplementedFormServiceHandler) List(context.Context, *connect.Request[v1.ListRequest]) (*connect.Response[v1.ListResponse], error)
func (UnimplementedFormServiceHandler) Update ¶
func (UnimplementedFormServiceHandler) Update(context.Context, *connect.Request[v1.UpdateRequest]) (*connect.Response[v1.UpdateResponse], error)