protobuf_spec

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_share_proto protoreflect.FileDescriptor
View Source
var ShareService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ShareService",
	HandlerType: (*ShareServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddShare",
			Handler:    _ShareService_AddShare_Handler,
		},
		{
			MethodName: "GetShareByPage",
			Handler:    _ShareService_GetShareByPage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "share.proto",
}

ShareService_ServiceDesc is the grpc.ServiceDesc for ShareService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterShareServiceServer

func RegisterShareServiceServer(s grpc.ServiceRegistrar, srv ShareServiceServer)

Types

type AddShareReq

type AddShareReq struct {
	PostContent *PostItem `protobuf:"bytes,1,opt,name=post_content,json=postContent,proto3" json:"post_content,omitempty"`
	// contains filtered or unexported fields
}

func (*AddShareReq) Descriptor deprecated

func (*AddShareReq) Descriptor() ([]byte, []int)

Deprecated: Use AddShareReq.ProtoReflect.Descriptor instead.

func (*AddShareReq) GetPostContent

func (x *AddShareReq) GetPostContent() *PostItem

func (*AddShareReq) ProtoMessage

func (*AddShareReq) ProtoMessage()

func (*AddShareReq) ProtoReflect

func (x *AddShareReq) ProtoReflect() protoreflect.Message

func (*AddShareReq) Reset

func (x *AddShareReq) Reset()

func (*AddShareReq) String

func (x *AddShareReq) String() string

type AddShareResp

type AddShareResp struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*AddShareResp) Descriptor deprecated

func (*AddShareResp) Descriptor() ([]byte, []int)

Deprecated: Use AddShareResp.ProtoReflect.Descriptor instead.

func (*AddShareResp) GetMessage

func (x *AddShareResp) GetMessage() string

func (*AddShareResp) ProtoMessage

func (*AddShareResp) ProtoMessage()

func (*AddShareResp) ProtoReflect

func (x *AddShareResp) ProtoReflect() protoreflect.Message

func (*AddShareResp) Reset

func (x *AddShareResp) Reset()

func (*AddShareResp) String

func (x *AddShareResp) String() string

type GetShareByPageReq

type GetShareByPageReq struct {
	LastId   string `protobuf:"bytes,1,opt,name=last_id,json=lastId,proto3" json:"last_id,omitempty"`
	PageSize int64  `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// contains filtered or unexported fields
}

func (*GetShareByPageReq) Descriptor deprecated

func (*GetShareByPageReq) Descriptor() ([]byte, []int)

Deprecated: Use GetShareByPageReq.ProtoReflect.Descriptor instead.

func (*GetShareByPageReq) GetLastId

func (x *GetShareByPageReq) GetLastId() string

func (*GetShareByPageReq) GetPageSize

func (x *GetShareByPageReq) GetPageSize() int64

func (*GetShareByPageReq) ProtoMessage

func (*GetShareByPageReq) ProtoMessage()

func (*GetShareByPageReq) ProtoReflect

func (x *GetShareByPageReq) ProtoReflect() protoreflect.Message

func (*GetShareByPageReq) Reset

func (x *GetShareByPageReq) Reset()

func (*GetShareByPageReq) String

func (x *GetShareByPageReq) String() string

type GetShareByPageResp

type GetShareByPageResp struct {
	Total  int64       `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	LastId string      `protobuf:"bytes,2,opt,name=last_id,json=lastId,proto3" json:"last_id,omitempty"`
	Data   []*PostItem `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*GetShareByPageResp) Descriptor deprecated

func (*GetShareByPageResp) Descriptor() ([]byte, []int)

Deprecated: Use GetShareByPageResp.ProtoReflect.Descriptor instead.

func (*GetShareByPageResp) GetData

func (x *GetShareByPageResp) GetData() []*PostItem

func (*GetShareByPageResp) GetLastId

func (x *GetShareByPageResp) GetLastId() string

func (*GetShareByPageResp) GetTotal

func (x *GetShareByPageResp) GetTotal() int64

func (*GetShareByPageResp) ProtoMessage

func (*GetShareByPageResp) ProtoMessage()

func (*GetShareByPageResp) ProtoReflect

func (x *GetShareByPageResp) ProtoReflect() protoreflect.Message

func (*GetShareByPageResp) Reset

func (x *GetShareByPageResp) Reset()

func (*GetShareByPageResp) String

func (x *GetShareByPageResp) String() string

type PostItem

type PostItem struct {
	Text      string   `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	Img       []string `protobuf:"bytes,2,rep,name=img,proto3" json:"img,omitempty"`
	CreatedAt string   `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt string   `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*PostItem) Descriptor deprecated

func (*PostItem) Descriptor() ([]byte, []int)

Deprecated: Use PostItem.ProtoReflect.Descriptor instead.

func (*PostItem) GetCreatedAt

func (x *PostItem) GetCreatedAt() string

func (*PostItem) GetImg

func (x *PostItem) GetImg() []string

func (*PostItem) GetText

func (x *PostItem) GetText() string

func (*PostItem) GetUpdatedAt

func (x *PostItem) GetUpdatedAt() string

func (*PostItem) ProtoMessage

func (*PostItem) ProtoMessage()

func (*PostItem) ProtoReflect

func (x *PostItem) ProtoReflect() protoreflect.Message

func (*PostItem) Reset

func (x *PostItem) Reset()

func (*PostItem) String

func (x *PostItem) String() string

type ShareServiceClient

type ShareServiceClient interface {
	AddShare(ctx context.Context, in *AddShareReq, opts ...grpc.CallOption) (*AddShareResp, error)
	GetShareByPage(ctx context.Context, in *GetShareByPageReq, opts ...grpc.CallOption) (*GetShareByPageResp, error)
}

ShareServiceClient is the client API for ShareService 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 ShareServiceServer

type ShareServiceServer interface {
	AddShare(context.Context, *AddShareReq) (*AddShareResp, error)
	GetShareByPage(context.Context, *GetShareByPageReq) (*GetShareByPageResp, error)
	// contains filtered or unexported methods
}

ShareServiceServer is the server API for ShareService service. All implementations must embed UnimplementedShareServiceServer for forward compatibility

type UnimplementedShareServiceServer

type UnimplementedShareServiceServer struct {
}

UnimplementedShareServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedShareServiceServer) AddShare

func (UnimplementedShareServiceServer) GetShareByPage

type UnsafeShareServiceServer

type UnsafeShareServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeShareServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ShareServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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