Documentation ¶
Index ¶
- func HandleResponse(response connect.AnyResponse, err error) (connect.AnyResponse, error)
- func NewAuthInterceptor(token string) connect.UnaryInterceptorFunc
- func NewMyPingServiceHandler() (string, http.Handler)
- type MyPingServiceHandler
- func (h *MyPingServiceHandler) GetServerInfo(ctx context.Context, req *connect.Request[v1.GetServerInfoRequest]) (*connect.Response[v1.GetServerInfoResponse], error)
- func (h *MyPingServiceHandler) Ping(ctx context.Context, req *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleResponse ¶
func HandleResponse(response connect.AnyResponse, err error) (connect.AnyResponse, error)
func NewAuthInterceptor ¶
func NewAuthInterceptor(token string) connect.UnaryInterceptorFunc
func NewMyPingServiceHandler ¶
Create an HTTP server handler using NewPingServiceHandler function
Types ¶
type MyPingServiceHandler ¶
type MyPingServiceHandler struct { }
MyPingServiceHandler is your implementation of the PingServiceHandler interface
func (*MyPingServiceHandler) GetServerInfo ¶
func (h *MyPingServiceHandler) GetServerInfo(ctx context.Context, req *connect.Request[v1.GetServerInfoRequest]) (*connect.Response[v1.GetServerInfoResponse], error)
Implement the GetServerInfo method
func (*MyPingServiceHandler) Ping ¶
func (h *MyPingServiceHandler) Ping(ctx context.Context, req *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error)
Implement the Ping method
Click to show internal directories.
Click to hide internal directories.