Documentation ¶
Index ¶
- Constants
- func NewUserHandler(svc UserHandler, opts ...connect_go.HandlerOption) (string, http.Handler)
- type UnimplementedUserHandler
- func (UnimplementedUserHandler) Register(context.Context, *connect_go.Request[userpb.RegisterUser]) (*connect_go.Response[userpb.UserResponse], error)
- func (UnimplementedUserHandler) SignIn(context.Context, *connect_go.Request[userpb.UserRequest]) (*connect_go.Response[userpb.SignInResponse], error)
- func (UnimplementedUserHandler) SignOut(context.Context, *connect_go.Request[userpb.UserRequest]) (*connect_go.Response[userpb.UserResponse], error)
- type UserClient
- type UserHandler
Constants ¶
const (
// UserName is the fully-qualified name of the User service.
UserName = "user.User"
)
Variables ¶
This section is empty.
Functions ¶
func NewUserHandler ¶
func NewUserHandler(svc UserHandler, opts ...connect_go.HandlerOption) (string, http.Handler)
NewUserHandler 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 UnimplementedUserHandler ¶
type UnimplementedUserHandler struct{}
UnimplementedUserHandler returns CodeUnimplemented from all methods.
func (UnimplementedUserHandler) Register ¶
func (UnimplementedUserHandler) Register(context.Context, *connect_go.Request[userpb.RegisterUser]) (*connect_go.Response[userpb.UserResponse], error)
func (UnimplementedUserHandler) SignIn ¶
func (UnimplementedUserHandler) SignIn(context.Context, *connect_go.Request[userpb.UserRequest]) (*connect_go.Response[userpb.SignInResponse], error)
func (UnimplementedUserHandler) SignOut ¶
func (UnimplementedUserHandler) SignOut(context.Context, *connect_go.Request[userpb.UserRequest]) (*connect_go.Response[userpb.UserResponse], error)
type UserClient ¶
type UserClient interface { Register(context.Context, *connect_go.Request[userpb.RegisterUser]) (*connect_go.Response[userpb.UserResponse], error) SignIn(context.Context, *connect_go.Request[userpb.UserRequest]) (*connect_go.Response[userpb.SignInResponse], error) SignOut(context.Context, *connect_go.Request[userpb.UserRequest]) (*connect_go.Response[userpb.UserResponse], error) }
UserClient is a client for the user.User service.
func NewUserClient ¶
func NewUserClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) UserClient
NewUserClient constructs a client for the user.User 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 UserHandler ¶
type UserHandler interface { Register(context.Context, *connect_go.Request[userpb.RegisterUser]) (*connect_go.Response[userpb.UserResponse], error) SignIn(context.Context, *connect_go.Request[userpb.UserRequest]) (*connect_go.Response[userpb.SignInResponse], error) SignOut(context.Context, *connect_go.Request[userpb.UserRequest]) (*connect_go.Response[userpb.UserResponse], error) }
UserHandler is an implementation of the user.User service.