update: remove slug proto
This commit is contained in:
202
gen/slug.pb.go
202
gen/slug.pb.go
@@ -1,202 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v6.33.2
|
||||
// source: slug.proto
|
||||
|
||||
package gen
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type ChangeSlugRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Node string `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
|
||||
Old string `protobuf:"bytes,2,opt,name=old,proto3" json:"old,omitempty"`
|
||||
New string `protobuf:"bytes,3,opt,name=new,proto3" json:"new,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ChangeSlugRequest) Reset() {
|
||||
*x = ChangeSlugRequest{}
|
||||
mi := &file_slug_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ChangeSlugRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ChangeSlugRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ChangeSlugRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_slug_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ChangeSlugRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ChangeSlugRequest) Descriptor() ([]byte, []int) {
|
||||
return file_slug_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ChangeSlugRequest) GetNode() string {
|
||||
if x != nil {
|
||||
return x.Node
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ChangeSlugRequest) GetOld() string {
|
||||
if x != nil {
|
||||
return x.Old
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ChangeSlugRequest) GetNew() string {
|
||||
if x != nil {
|
||||
return x.New
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ChangeSlugResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
||||
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ChangeSlugResponse) Reset() {
|
||||
*x = ChangeSlugResponse{}
|
||||
mi := &file_slug_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ChangeSlugResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ChangeSlugResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ChangeSlugResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_slug_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ChangeSlugResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ChangeSlugResponse) Descriptor() ([]byte, []int) {
|
||||
return file_slug_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ChangeSlugResponse) GetSuccess() bool {
|
||||
if x != nil {
|
||||
return x.Success
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *ChangeSlugResponse) GetMessage() string {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_slug_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_slug_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\n" +
|
||||
"slug.proto\x12\x04slug\"K\n" +
|
||||
"\x11ChangeSlugRequest\x12\x12\n" +
|
||||
"\x04node\x18\x01 \x01(\tR\x04node\x12\x10\n" +
|
||||
"\x03old\x18\x02 \x01(\tR\x03old\x12\x10\n" +
|
||||
"\x03new\x18\x03 \x01(\tR\x03new\"H\n" +
|
||||
"\x12ChangeSlugResponse\x12\x18\n" +
|
||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
|
||||
"\amessage\x18\x02 \x01(\tR\amessage2T\n" +
|
||||
"\n" +
|
||||
"SlugChange\x12F\n" +
|
||||
"\x11RequestChangeSlug\x12\x17.slug.ChangeSlugRequest\x1a\x18.slug.ChangeSlugResponseB\aZ\x05./genb\x06proto3"
|
||||
|
||||
var (
|
||||
file_slug_proto_rawDescOnce sync.Once
|
||||
file_slug_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_slug_proto_rawDescGZIP() []byte {
|
||||
file_slug_proto_rawDescOnce.Do(func() {
|
||||
file_slug_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_slug_proto_rawDesc), len(file_slug_proto_rawDesc)))
|
||||
})
|
||||
return file_slug_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_slug_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_slug_proto_goTypes = []any{
|
||||
(*ChangeSlugRequest)(nil), // 0: slug.ChangeSlugRequest
|
||||
(*ChangeSlugResponse)(nil), // 1: slug.ChangeSlugResponse
|
||||
}
|
||||
var file_slug_proto_depIdxs = []int32{
|
||||
0, // 0: slug.SlugChange.RequestChangeSlug:input_type -> slug.ChangeSlugRequest
|
||||
1, // 1: slug.SlugChange.RequestChangeSlug:output_type -> slug.ChangeSlugResponse
|
||||
1, // [1:2] is the sub-list for method output_type
|
||||
0, // [0:1] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_slug_proto_init() }
|
||||
func file_slug_proto_init() {
|
||||
if File_slug_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_slug_proto_rawDesc), len(file_slug_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_slug_proto_goTypes,
|
||||
DependencyIndexes: file_slug_proto_depIdxs,
|
||||
MessageInfos: file_slug_proto_msgTypes,
|
||||
}.Build()
|
||||
File_slug_proto = out.File
|
||||
file_slug_proto_goTypes = nil
|
||||
file_slug_proto_depIdxs = nil
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.0
|
||||
// - protoc v6.33.2
|
||||
// source: slug.proto
|
||||
|
||||
package gen
|
||||
|
||||
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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
SlugChange_RequestChangeSlug_FullMethodName = "/slug.SlugChange/RequestChangeSlug"
|
||||
)
|
||||
|
||||
// SlugChangeClient is the client API for SlugChange 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 SlugChangeClient interface {
|
||||
RequestChangeSlug(ctx context.Context, in *ChangeSlugRequest, opts ...grpc.CallOption) (*ChangeSlugResponse, error)
|
||||
}
|
||||
|
||||
type slugChangeClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSlugChangeClient(cc grpc.ClientConnInterface) SlugChangeClient {
|
||||
return &slugChangeClient{cc}
|
||||
}
|
||||
|
||||
func (c *slugChangeClient) RequestChangeSlug(ctx context.Context, in *ChangeSlugRequest, opts ...grpc.CallOption) (*ChangeSlugResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ChangeSlugResponse)
|
||||
err := c.cc.Invoke(ctx, SlugChange_RequestChangeSlug_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SlugChangeServer is the server API for SlugChange service.
|
||||
// All implementations must embed UnimplementedSlugChangeServer
|
||||
// for forward compatibility.
|
||||
type SlugChangeServer interface {
|
||||
RequestChangeSlug(context.Context, *ChangeSlugRequest) (*ChangeSlugResponse, error)
|
||||
mustEmbedUnimplementedSlugChangeServer()
|
||||
}
|
||||
|
||||
// UnimplementedSlugChangeServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedSlugChangeServer struct{}
|
||||
|
||||
func (UnimplementedSlugChangeServer) RequestChangeSlug(context.Context, *ChangeSlugRequest) (*ChangeSlugResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method RequestChangeSlug not implemented")
|
||||
}
|
||||
func (UnimplementedSlugChangeServer) mustEmbedUnimplementedSlugChangeServer() {}
|
||||
func (UnimplementedSlugChangeServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeSlugChangeServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SlugChangeServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeSlugChangeServer interface {
|
||||
mustEmbedUnimplementedSlugChangeServer()
|
||||
}
|
||||
|
||||
func RegisterSlugChangeServer(s grpc.ServiceRegistrar, srv SlugChangeServer) {
|
||||
// If the following call panics, it indicates UnimplementedSlugChangeServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&SlugChange_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _SlugChange_RequestChangeSlug_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ChangeSlugRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SlugChangeServer).RequestChangeSlug(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: SlugChange_RequestChangeSlug_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SlugChangeServer).RequestChangeSlug(ctx, req.(*ChangeSlugRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// SlugChange_ServiceDesc is the grpc.ServiceDesc for SlugChange service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var SlugChange_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "slug.SlugChange",
|
||||
HandlerType: (*SlugChangeServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "RequestChangeSlug",
|
||||
Handler: _SlugChange_RequestChangeSlug_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "slug.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user