samplepbconnect

package
v0.45.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
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.

View Source
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) ListUsers

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL