Documentation
¶
Index ¶
Constants ¶
const ( // UserServiceGetUserProcedure is the procedure name of the UserService's GetUser RPC. UserServiceGetUserProcedure = "/spectre.sample.v1.UserService/GetUser" // UserServiceListUsersProcedure is the procedure name of the UserService's ListUsers RPC. UserServiceListUsersProcedure = "/spectre.sample.v1.UserService/ListUsers" )
These constants are the procedure 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 (
// UserServiceName is the fully-qualified name of the UserService service.
UserServiceName = "spectre.sample.v1.UserService"
)
Variables ¶
This section is empty.
Functions ¶
func RegisterUserServiceHandler ¶ added in v0.45.4
func RegisterUserServiceHandler(server *connect.Server, svc UserServiceHandler)
RegisterUserServiceHandler registers svc as the spectre.sample.v1.UserService implementation on server.
Types ¶
type UnimplementedUserServiceHandler ¶
type UnimplementedUserServiceHandler struct{}
UnimplementedUserServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedUserServiceHandler) GetUser ¶
func (UnimplementedUserServiceHandler) GetUser(context.Context, *pb.GetUserRequest) (*pb.GetUserResponse, error)
func (UnimplementedUserServiceHandler) ListUsers ¶
func (UnimplementedUserServiceHandler) ListUsers(context.Context, *pb.ListUsersRequest) (*pb.ListUsersResponse, error)
type UserServiceClient ¶
type UserServiceClient interface {
GetUser(context.Context, *pb.GetUserRequest) (*pb.GetUserResponse, error)
ListUsers(context.Context, *pb.ListUsersRequest) (*pb.ListUsersResponse, error)
}
UserServiceClient is a client for the spectre.sample.v1.UserService service.
func NewUserServiceClient ¶
func NewUserServiceClient(client *connect.Client) UserServiceClient
NewUserServiceClient constructs a client for the spectre.sample.v1.UserService service. Multiple service clients may share a single connect.Client.
type UserServiceHandler ¶
type UserServiceHandler interface {
GetUser(context.Context, *pb.GetUserRequest) (*pb.GetUserResponse, error)
ListUsers(context.Context, *pb.ListUsersRequest) (*pb.ListUsersResponse, error)
}
UserServiceHandler is an implementation of the spectre.sample.v1.UserService service.