mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-04 04:23:16 +00:00
refactor: update api version
This commit is contained in:
345
proto/gen/api/v1/shortcut_service_grpc.pb.go
Normal file
345
proto/gen/api/v1/shortcut_service_grpc.pb.go
Normal file
@ -0,0 +1,345 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: api/v1/shortcut_service.proto
|
||||
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
ShortcutService_ListShortcuts_FullMethodName = "/slash.api.v1.ShortcutService/ListShortcuts"
|
||||
ShortcutService_GetShortcut_FullMethodName = "/slash.api.v1.ShortcutService/GetShortcut"
|
||||
ShortcutService_GetShortcutByName_FullMethodName = "/slash.api.v1.ShortcutService/GetShortcutByName"
|
||||
ShortcutService_CreateShortcut_FullMethodName = "/slash.api.v1.ShortcutService/CreateShortcut"
|
||||
ShortcutService_UpdateShortcut_FullMethodName = "/slash.api.v1.ShortcutService/UpdateShortcut"
|
||||
ShortcutService_DeleteShortcut_FullMethodName = "/slash.api.v1.ShortcutService/DeleteShortcut"
|
||||
ShortcutService_GetShortcutAnalytics_FullMethodName = "/slash.api.v1.ShortcutService/GetShortcutAnalytics"
|
||||
)
|
||||
|
||||
// ShortcutServiceClient is the client API for ShortcutService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type ShortcutServiceClient interface {
|
||||
// ListShortcuts returns a list of shortcuts.
|
||||
ListShortcuts(ctx context.Context, in *ListShortcutsRequest, opts ...grpc.CallOption) (*ListShortcutsResponse, error)
|
||||
// GetShortcut returns a shortcut by id.
|
||||
GetShortcut(ctx context.Context, in *GetShortcutRequest, opts ...grpc.CallOption) (*GetShortcutResponse, error)
|
||||
// GetShortcutByName returns a shortcut by name.
|
||||
GetShortcutByName(ctx context.Context, in *GetShortcutByNameRequest, opts ...grpc.CallOption) (*GetShortcutByNameResponse, error)
|
||||
// CreateShortcut creates a shortcut.
|
||||
CreateShortcut(ctx context.Context, in *CreateShortcutRequest, opts ...grpc.CallOption) (*CreateShortcutResponse, error)
|
||||
// UpdateShortcut updates a shortcut.
|
||||
UpdateShortcut(ctx context.Context, in *UpdateShortcutRequest, opts ...grpc.CallOption) (*UpdateShortcutResponse, error)
|
||||
// DeleteShortcut deletes a shortcut by name.
|
||||
DeleteShortcut(ctx context.Context, in *DeleteShortcutRequest, opts ...grpc.CallOption) (*DeleteShortcutResponse, error)
|
||||
// GetShortcutAnalytics returns the analytics for a shortcut.
|
||||
GetShortcutAnalytics(ctx context.Context, in *GetShortcutAnalyticsRequest, opts ...grpc.CallOption) (*GetShortcutAnalyticsResponse, error)
|
||||
}
|
||||
|
||||
type shortcutServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewShortcutServiceClient(cc grpc.ClientConnInterface) ShortcutServiceClient {
|
||||
return &shortcutServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *shortcutServiceClient) ListShortcuts(ctx context.Context, in *ListShortcutsRequest, opts ...grpc.CallOption) (*ListShortcutsResponse, error) {
|
||||
out := new(ListShortcutsResponse)
|
||||
err := c.cc.Invoke(ctx, ShortcutService_ListShortcuts_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *shortcutServiceClient) GetShortcut(ctx context.Context, in *GetShortcutRequest, opts ...grpc.CallOption) (*GetShortcutResponse, error) {
|
||||
out := new(GetShortcutResponse)
|
||||
err := c.cc.Invoke(ctx, ShortcutService_GetShortcut_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *shortcutServiceClient) GetShortcutByName(ctx context.Context, in *GetShortcutByNameRequest, opts ...grpc.CallOption) (*GetShortcutByNameResponse, error) {
|
||||
out := new(GetShortcutByNameResponse)
|
||||
err := c.cc.Invoke(ctx, ShortcutService_GetShortcutByName_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *shortcutServiceClient) CreateShortcut(ctx context.Context, in *CreateShortcutRequest, opts ...grpc.CallOption) (*CreateShortcutResponse, error) {
|
||||
out := new(CreateShortcutResponse)
|
||||
err := c.cc.Invoke(ctx, ShortcutService_CreateShortcut_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *shortcutServiceClient) UpdateShortcut(ctx context.Context, in *UpdateShortcutRequest, opts ...grpc.CallOption) (*UpdateShortcutResponse, error) {
|
||||
out := new(UpdateShortcutResponse)
|
||||
err := c.cc.Invoke(ctx, ShortcutService_UpdateShortcut_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *shortcutServiceClient) DeleteShortcut(ctx context.Context, in *DeleteShortcutRequest, opts ...grpc.CallOption) (*DeleteShortcutResponse, error) {
|
||||
out := new(DeleteShortcutResponse)
|
||||
err := c.cc.Invoke(ctx, ShortcutService_DeleteShortcut_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *shortcutServiceClient) GetShortcutAnalytics(ctx context.Context, in *GetShortcutAnalyticsRequest, opts ...grpc.CallOption) (*GetShortcutAnalyticsResponse, error) {
|
||||
out := new(GetShortcutAnalyticsResponse)
|
||||
err := c.cc.Invoke(ctx, ShortcutService_GetShortcutAnalytics_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ShortcutServiceServer is the server API for ShortcutService service.
|
||||
// All implementations must embed UnimplementedShortcutServiceServer
|
||||
// for forward compatibility
|
||||
type ShortcutServiceServer interface {
|
||||
// ListShortcuts returns a list of shortcuts.
|
||||
ListShortcuts(context.Context, *ListShortcutsRequest) (*ListShortcutsResponse, error)
|
||||
// GetShortcut returns a shortcut by id.
|
||||
GetShortcut(context.Context, *GetShortcutRequest) (*GetShortcutResponse, error)
|
||||
// GetShortcutByName returns a shortcut by name.
|
||||
GetShortcutByName(context.Context, *GetShortcutByNameRequest) (*GetShortcutByNameResponse, error)
|
||||
// CreateShortcut creates a shortcut.
|
||||
CreateShortcut(context.Context, *CreateShortcutRequest) (*CreateShortcutResponse, error)
|
||||
// UpdateShortcut updates a shortcut.
|
||||
UpdateShortcut(context.Context, *UpdateShortcutRequest) (*UpdateShortcutResponse, error)
|
||||
// DeleteShortcut deletes a shortcut by name.
|
||||
DeleteShortcut(context.Context, *DeleteShortcutRequest) (*DeleteShortcutResponse, error)
|
||||
// GetShortcutAnalytics returns the analytics for a shortcut.
|
||||
GetShortcutAnalytics(context.Context, *GetShortcutAnalyticsRequest) (*GetShortcutAnalyticsResponse, error)
|
||||
mustEmbedUnimplementedShortcutServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedShortcutServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedShortcutServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedShortcutServiceServer) ListShortcuts(context.Context, *ListShortcutsRequest) (*ListShortcutsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListShortcuts not implemented")
|
||||
}
|
||||
func (UnimplementedShortcutServiceServer) GetShortcut(context.Context, *GetShortcutRequest) (*GetShortcutResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetShortcut not implemented")
|
||||
}
|
||||
func (UnimplementedShortcutServiceServer) GetShortcutByName(context.Context, *GetShortcutByNameRequest) (*GetShortcutByNameResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetShortcutByName not implemented")
|
||||
}
|
||||
func (UnimplementedShortcutServiceServer) CreateShortcut(context.Context, *CreateShortcutRequest) (*CreateShortcutResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateShortcut not implemented")
|
||||
}
|
||||
func (UnimplementedShortcutServiceServer) UpdateShortcut(context.Context, *UpdateShortcutRequest) (*UpdateShortcutResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateShortcut not implemented")
|
||||
}
|
||||
func (UnimplementedShortcutServiceServer) DeleteShortcut(context.Context, *DeleteShortcutRequest) (*DeleteShortcutResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteShortcut not implemented")
|
||||
}
|
||||
func (UnimplementedShortcutServiceServer) GetShortcutAnalytics(context.Context, *GetShortcutAnalyticsRequest) (*GetShortcutAnalyticsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetShortcutAnalytics not implemented")
|
||||
}
|
||||
func (UnimplementedShortcutServiceServer) mustEmbedUnimplementedShortcutServiceServer() {}
|
||||
|
||||
// UnsafeShortcutServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ShortcutServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeShortcutServiceServer interface {
|
||||
mustEmbedUnimplementedShortcutServiceServer()
|
||||
}
|
||||
|
||||
func RegisterShortcutServiceServer(s grpc.ServiceRegistrar, srv ShortcutServiceServer) {
|
||||
s.RegisterService(&ShortcutService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _ShortcutService_ListShortcuts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListShortcutsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShortcutServiceServer).ListShortcuts(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ShortcutService_ListShortcuts_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShortcutServiceServer).ListShortcuts(ctx, req.(*ListShortcutsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ShortcutService_GetShortcut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetShortcutRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShortcutServiceServer).GetShortcut(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ShortcutService_GetShortcut_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShortcutServiceServer).GetShortcut(ctx, req.(*GetShortcutRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ShortcutService_GetShortcutByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetShortcutByNameRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShortcutServiceServer).GetShortcutByName(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ShortcutService_GetShortcutByName_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShortcutServiceServer).GetShortcutByName(ctx, req.(*GetShortcutByNameRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ShortcutService_CreateShortcut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateShortcutRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShortcutServiceServer).CreateShortcut(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ShortcutService_CreateShortcut_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShortcutServiceServer).CreateShortcut(ctx, req.(*CreateShortcutRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ShortcutService_UpdateShortcut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateShortcutRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShortcutServiceServer).UpdateShortcut(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ShortcutService_UpdateShortcut_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShortcutServiceServer).UpdateShortcut(ctx, req.(*UpdateShortcutRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ShortcutService_DeleteShortcut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteShortcutRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShortcutServiceServer).DeleteShortcut(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ShortcutService_DeleteShortcut_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShortcutServiceServer).DeleteShortcut(ctx, req.(*DeleteShortcutRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ShortcutService_GetShortcutAnalytics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetShortcutAnalyticsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShortcutServiceServer).GetShortcutAnalytics(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ShortcutService_GetShortcutAnalytics_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShortcutServiceServer).GetShortcutAnalytics(ctx, req.(*GetShortcutAnalyticsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// ShortcutService_ServiceDesc is the grpc.ServiceDesc for ShortcutService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var ShortcutService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "slash.api.v1.ShortcutService",
|
||||
HandlerType: (*ShortcutServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListShortcuts",
|
||||
Handler: _ShortcutService_ListShortcuts_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetShortcut",
|
||||
Handler: _ShortcutService_GetShortcut_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetShortcutByName",
|
||||
Handler: _ShortcutService_GetShortcutByName_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateShortcut",
|
||||
Handler: _ShortcutService_CreateShortcut_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateShortcut",
|
||||
Handler: _ShortcutService_UpdateShortcut_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteShortcut",
|
||||
Handler: _ShortcutService_DeleteShortcut_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetShortcutAnalytics",
|
||||
Handler: _ShortcutService_GetShortcutAnalytics_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/v1/shortcut_service.proto",
|
||||
}
|
Reference in New Issue
Block a user