post

package
v0.0.0-...-5fd3f30 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2019 License: GPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPostsServer

func RegisterPostsServer(s *grpc.Server, srv PostsServer)

Types

type Category

type Category struct {
	Id                   int32    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Title                string   `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Category) Descriptor

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

func (*Category) GetId

func (m *Category) GetId() int32

func (*Category) GetTitle

func (m *Category) GetTitle() string

func (*Category) ProtoMessage

func (*Category) ProtoMessage()

func (*Category) Reset

func (m *Category) Reset()

func (*Category) String

func (m *Category) String() string

func (*Category) XXX_DiscardUnknown

func (m *Category) XXX_DiscardUnknown()

func (*Category) XXX_Marshal

func (m *Category) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Category) XXX_Merge

func (m *Category) XXX_Merge(src proto.Message)

func (*Category) XXX_Size

func (m *Category) XXX_Size() int

func (*Category) XXX_Unmarshal

func (m *Category) XXX_Unmarshal(b []byte) error

type CategoryRequest

type CategoryRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CategoryRequest) Descriptor

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

func (*CategoryRequest) ProtoMessage

func (*CategoryRequest) ProtoMessage()

func (*CategoryRequest) Reset

func (m *CategoryRequest) Reset()

func (*CategoryRequest) String

func (m *CategoryRequest) String() string

func (*CategoryRequest) XXX_DiscardUnknown

func (m *CategoryRequest) XXX_DiscardUnknown()

func (*CategoryRequest) XXX_Marshal

func (m *CategoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CategoryRequest) XXX_Merge

func (m *CategoryRequest) XXX_Merge(src proto.Message)

func (*CategoryRequest) XXX_Size

func (m *CategoryRequest) XXX_Size() int

func (*CategoryRequest) XXX_Unmarshal

func (m *CategoryRequest) XXX_Unmarshal(b []byte) error

type CategoryResponse

type CategoryResponse struct {
	Categories           []*Category `protobuf:"bytes,1,rep,name=categories,proto3" json:"categories,omitempty"`
	Result               bool        `protobuf:"varint,2,opt,name=Result,proto3" json:"Result,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*CategoryResponse) Descriptor

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

func (*CategoryResponse) GetCategories

func (m *CategoryResponse) GetCategories() []*Category

func (*CategoryResponse) GetResult

func (m *CategoryResponse) GetResult() bool

func (*CategoryResponse) ProtoMessage

func (*CategoryResponse) ProtoMessage()

func (*CategoryResponse) Reset

func (m *CategoryResponse) Reset()

func (*CategoryResponse) String

func (m *CategoryResponse) String() string

func (*CategoryResponse) XXX_DiscardUnknown

func (m *CategoryResponse) XXX_DiscardUnknown()

func (*CategoryResponse) XXX_Marshal

func (m *CategoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CategoryResponse) XXX_Merge

func (m *CategoryResponse) XXX_Merge(src proto.Message)

func (*CategoryResponse) XXX_Size

func (m *CategoryResponse) XXX_Size() int

func (*CategoryResponse) XXX_Unmarshal

func (m *CategoryResponse) XXX_Unmarshal(b []byte) error

type Post

type Post struct {
	Id                   int32    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Title                string   `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Text                 string   `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
	Category             int32    `protobuf:"varint,4,opt,name=category,proto3" json:"category,omitempty"`
	Created              string   `protobuf:"bytes,5,opt,name=created,proto3" json:"created,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Post) Descriptor

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

func (*Post) GetCategory

func (m *Post) GetCategory() int32

func (*Post) GetCreated

func (m *Post) GetCreated() string

func (*Post) GetId

func (m *Post) GetId() int32

func (*Post) GetText

func (m *Post) GetText() string

func (*Post) GetTitle

func (m *Post) GetTitle() string

func (*Post) ProtoMessage

func (*Post) ProtoMessage()

func (*Post) Reset

func (m *Post) Reset()

func (*Post) String

func (m *Post) String() string

func (*Post) XXX_DiscardUnknown

func (m *Post) XXX_DiscardUnknown()

func (*Post) XXX_Marshal

func (m *Post) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Post) XXX_Merge

func (m *Post) XXX_Merge(src proto.Message)

func (*Post) XXX_Size

func (m *Post) XXX_Size() int

func (*Post) XXX_Unmarshal

func (m *Post) XXX_Unmarshal(b []byte) error

type PostRequest

type PostRequest struct {
	Category             int32    `protobuf:"varint,1,opt,name=Category,proto3" json:"Category,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PostRequest) Descriptor

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

func (*PostRequest) GetCategory

func (m *PostRequest) GetCategory() int32

func (*PostRequest) ProtoMessage

func (*PostRequest) ProtoMessage()

func (*PostRequest) Reset

func (m *PostRequest) Reset()

func (*PostRequest) String

func (m *PostRequest) String() string

func (*PostRequest) XXX_DiscardUnknown

func (m *PostRequest) XXX_DiscardUnknown()

func (*PostRequest) XXX_Marshal

func (m *PostRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PostRequest) XXX_Merge

func (m *PostRequest) XXX_Merge(src proto.Message)

func (*PostRequest) XXX_Size

func (m *PostRequest) XXX_Size() int

func (*PostRequest) XXX_Unmarshal

func (m *PostRequest) XXX_Unmarshal(b []byte) error

type PostResponse

type PostResponse struct {
	Posts                []*Post  `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"`
	Result               bool     `protobuf:"varint,2,opt,name=Result,proto3" json:"Result,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PostResponse) Descriptor

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

func (*PostResponse) GetPosts

func (m *PostResponse) GetPosts() []*Post

func (*PostResponse) GetResult

func (m *PostResponse) GetResult() bool

func (*PostResponse) ProtoMessage

func (*PostResponse) ProtoMessage()

func (*PostResponse) Reset

func (m *PostResponse) Reset()

func (*PostResponse) String

func (m *PostResponse) String() string

func (*PostResponse) XXX_DiscardUnknown

func (m *PostResponse) XXX_DiscardUnknown()

func (*PostResponse) XXX_Marshal

func (m *PostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PostResponse) XXX_Merge

func (m *PostResponse) XXX_Merge(src proto.Message)

func (*PostResponse) XXX_Size

func (m *PostResponse) XXX_Size() int

func (*PostResponse) XXX_Unmarshal

func (m *PostResponse) XXX_Unmarshal(b []byte) error

type PostsClient

type PostsClient interface {
	GetCategories(ctx context.Context, in *CategoryRequest, opts ...grpc.CallOption) (*CategoryResponse, error)
	GetPosts(ctx context.Context, in *PostRequest, opts ...grpc.CallOption) (*PostResponse, error)
}

PostsClient is the client API for Posts service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPostsClient

func NewPostsClient(cc *grpc.ClientConn) PostsClient

type PostsServer

type PostsServer interface {
	GetCategories(context.Context, *CategoryRequest) (*CategoryResponse, error)
	GetPosts(context.Context, *PostRequest) (*PostResponse, error)
}

PostsServer is the server API for Posts service.

Jump to

Keyboard shortcuts

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