service_2

package
v0.0.0-...-e9c3aaf Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_service_2_proto protoreflect.FileDescriptor
View Source
var Service_2_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "service_2.Service_2",
	HandlerType: (*Service_2Server)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAll",
			Handler:    _Service_2_GetAll_Handler,
		},
		{
			MethodName: "GetById",
			Handler:    _Service_2_GetById_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _Service_2_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Service_2_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "service_2.proto",
}

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

Functions

func RegisterService_2Server

func RegisterService_2Server(s grpc.ServiceRegistrar, srv Service_2Server)

Types

type GetAllRequest

type GetAllRequest struct {
	Limit  int32  `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset int32  `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	Search string `protobuf:"bytes,3,opt,name=search,proto3" json:"search,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAllRequest) Descriptor deprecated

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

Deprecated: Use GetAllRequest.ProtoReflect.Descriptor instead.

func (*GetAllRequest) GetLimit

func (x *GetAllRequest) GetLimit() int32

func (*GetAllRequest) GetOffset

func (x *GetAllRequest) GetOffset() int32

func (*GetAllRequest) GetSearch

func (x *GetAllRequest) GetSearch() string

func (*GetAllRequest) ProtoMessage

func (*GetAllRequest) ProtoMessage()

func (*GetAllRequest) ProtoReflect

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

func (*GetAllRequest) Reset

func (x *GetAllRequest) Reset()

func (*GetAllRequest) String

func (x *GetAllRequest) String() string

type GetAllResponse

type GetAllResponse struct {
	Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"`
	Count int32   `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAllResponse) Descriptor deprecated

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

Deprecated: Use GetAllResponse.ProtoReflect.Descriptor instead.

func (*GetAllResponse) GetCount

func (x *GetAllResponse) GetCount() int32

func (*GetAllResponse) GetPosts

func (x *GetAllResponse) GetPosts() []*Post

func (*GetAllResponse) ProtoMessage

func (*GetAllResponse) ProtoMessage()

func (*GetAllResponse) ProtoReflect

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

func (*GetAllResponse) Reset

func (x *GetAllResponse) Reset()

func (*GetAllResponse) String

func (x *GetAllResponse) String() string

type Id

type Id struct {
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*Id) Descriptor deprecated

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

Deprecated: Use Id.ProtoReflect.Descriptor instead.

func (*Id) GetId

func (x *Id) GetId() int32

func (*Id) ProtoMessage

func (*Id) ProtoMessage()

func (*Id) ProtoReflect

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

func (*Id) Reset

func (x *Id) Reset()

func (*Id) String

func (x *Id) String() string

type Post

type Post struct {
	Id     int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	UserId int32  `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Title  string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
	Body   string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*Post) Descriptor deprecated

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

Deprecated: Use Post.ProtoReflect.Descriptor instead.

func (*Post) GetBody

func (x *Post) GetBody() string

func (*Post) GetId

func (x *Post) GetId() int32

func (*Post) GetTitle

func (x *Post) GetTitle() string

func (*Post) GetUserId

func (x *Post) GetUserId() int32

func (*Post) ProtoMessage

func (*Post) ProtoMessage()

func (*Post) ProtoReflect

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

func (*Post) Reset

func (x *Post) Reset()

func (*Post) String

func (x *Post) String() string

type Service_2Client

type Service_2Client interface {
	GetAll(ctx context.Context, in *GetAllRequest, opts ...grpc.CallOption) (*GetAllResponse, error)
	GetById(ctx context.Context, in *Id, opts ...grpc.CallOption) (*Post, error)
	Update(ctx context.Context, in *Post, opts ...grpc.CallOption) (*Post, error)
	Delete(ctx context.Context, in *Id, opts ...grpc.CallOption) (*Id, error)
}

Service_2Client is the client API for Service_2 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.

func NewService_2Client

func NewService_2Client(cc grpc.ClientConnInterface) Service_2Client

type Service_2Server

type Service_2Server interface {
	GetAll(context.Context, *GetAllRequest) (*GetAllResponse, error)
	GetById(context.Context, *Id) (*Post, error)
	Update(context.Context, *Post) (*Post, error)
	Delete(context.Context, *Id) (*Id, error)
	// contains filtered or unexported methods
}

Service_2Server is the server API for Service_2 service. All implementations must embed UnimplementedService_2Server for forward compatibility

type UnimplementedService_2Server

type UnimplementedService_2Server struct {
}

UnimplementedService_2Server must be embedded to have forward compatible implementations.

func (UnimplementedService_2Server) Delete

func (UnimplementedService_2Server) GetAll

func (UnimplementedService_2Server) GetById

func (UnimplementedService_2Server) Update

type UnsafeService_2Server

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

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

Jump to

Keyboard shortcuts

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