Documentation
¶
Index ¶
- Constants
- func NewZipStashServiceHandler(svc ZipStashServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type UnimplementedZipStashServiceHandler
- func (UnimplementedZipStashServiceHandler) CreateCacheEntry(context.Context, *connect.Request[v1.CreateCacheEntryRequest]) (*connect.Response[v1.CreateCacheEntryResponse], error)
- func (UnimplementedZipStashServiceHandler) GetCacheEntry(context.Context, *connect.Request[v1.GetCacheEntryRequest]) (*connect.Response[v1.GetCacheEntryResponse], error)
- func (UnimplementedZipStashServiceHandler) UpdateCacheEntry(context.Context, *connect.Request[v1.UpdateCacheEntryRequest]) (*connect.Response[v1.UpdateCacheEntryResponse], error)
- type ZipStashServiceClient
- type ZipStashServiceHandler
Constants ¶
const ( // ZipStashServiceCreateCacheEntryProcedure is the fully-qualified name of the ZipStashService's // CreateCacheEntry RPC. ZipStashServiceCreateCacheEntryProcedure = "/zipstash.v1.ZipStashService/CreateCacheEntry" // ZipStashServiceUpdateCacheEntryProcedure is the fully-qualified name of the ZipStashService's // UpdateCacheEntry RPC. ZipStashServiceUpdateCacheEntryProcedure = "/zipstash.v1.ZipStashService/UpdateCacheEntry" // ZipStashServiceGetCacheEntryProcedure is the fully-qualified name of the ZipStashService's // GetCacheEntry RPC. ZipStashServiceGetCacheEntryProcedure = "/zipstash.v1.ZipStashService/GetCacheEntry" )
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 (
// ZipStashServiceName is the fully-qualified name of the ZipStashService service.
ZipStashServiceName = "zipstash.v1.ZipStashService"
)
Variables ¶
This section is empty.
Functions ¶
func NewZipStashServiceHandler ¶
func NewZipStashServiceHandler(svc ZipStashServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewZipStashServiceHandler 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 UnimplementedZipStashServiceHandler ¶
type UnimplementedZipStashServiceHandler struct{}
UnimplementedZipStashServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedZipStashServiceHandler) CreateCacheEntry ¶
func (UnimplementedZipStashServiceHandler) CreateCacheEntry(context.Context, *connect.Request[v1.CreateCacheEntryRequest]) (*connect.Response[v1.CreateCacheEntryResponse], error)
func (UnimplementedZipStashServiceHandler) GetCacheEntry ¶
func (UnimplementedZipStashServiceHandler) GetCacheEntry(context.Context, *connect.Request[v1.GetCacheEntryRequest]) (*connect.Response[v1.GetCacheEntryResponse], error)
func (UnimplementedZipStashServiceHandler) UpdateCacheEntry ¶
func (UnimplementedZipStashServiceHandler) UpdateCacheEntry(context.Context, *connect.Request[v1.UpdateCacheEntryRequest]) (*connect.Response[v1.UpdateCacheEntryResponse], error)
type ZipStashServiceClient ¶
type ZipStashServiceClient interface { // CreateCacheEntry creates a new cache entry CreateCacheEntry(context.Context, *connect.Request[v1.CreateCacheEntryRequest]) (*connect.Response[v1.CreateCacheEntryResponse], error) // UpdateCacheEntry updates an existing cache entry UpdateCacheEntry(context.Context, *connect.Request[v1.UpdateCacheEntryRequest]) (*connect.Response[v1.UpdateCacheEntryResponse], error) // GetCacheEntry retrieves a cache entry by key GetCacheEntry(context.Context, *connect.Request[v1.GetCacheEntryRequest]) (*connect.Response[v1.GetCacheEntryResponse], error) }
ZipStashServiceClient is a client for the zipstash.v1.ZipStashService service.
func NewZipStashServiceClient ¶
func NewZipStashServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ZipStashServiceClient
NewZipStashServiceClient constructs a client for the zipstash.v1.ZipStashService 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 ZipStashServiceHandler ¶
type ZipStashServiceHandler interface { // CreateCacheEntry creates a new cache entry CreateCacheEntry(context.Context, *connect.Request[v1.CreateCacheEntryRequest]) (*connect.Response[v1.CreateCacheEntryResponse], error) // UpdateCacheEntry updates an existing cache entry UpdateCacheEntry(context.Context, *connect.Request[v1.UpdateCacheEntryRequest]) (*connect.Response[v1.UpdateCacheEntryResponse], error) // GetCacheEntry retrieves a cache entry by key GetCacheEntry(context.Context, *connect.Request[v1.GetCacheEntryRequest]) (*connect.Response[v1.GetCacheEntryResponse], error) }
ZipStashServiceHandler is an implementation of the zipstash.v1.ZipStashService service.