v1

package
v0.2.92 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PageDir_name = map[int32]string{
		0: "Forward",
		1: "Backward",
	}
	PageDir_value = map[string]int32{
		"Forward":  0,
		"Backward": 1,
	}
)

Enum value maps for PageDir.

View Source
var FeedAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "feed_api.v1.FeedAPI",
	HandlerType: (*FeedAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUserFeed",
			Handler:    _FeedAPI_GetUserFeed_Handler,
		},
		{
			MethodName: "GetCircleFeed",
			Handler:    _FeedAPI_GetCircleFeed_Handler,
		},
		{
			MethodName: "GetPopularFeed",
			Handler:    _FeedAPI_GetPopularFeed_Handler,
		},
		{
			MethodName: "getFeedList",
			Handler:    _FeedAPI_GetFeedList_Handler,
		},
		{
			MethodName: "getFeed",
			Handler:    _FeedAPI_GetFeed_Handler,
		},
		{
			MethodName: "getGroups",
			Handler:    _FeedAPI_GetGroups_Handler,
		},
		{
			MethodName: "deletePosts",
			Handler:    _FeedAPI_DeletePosts_Handler,
		},
		{
			MethodName: "updateScores",
			Handler:    _FeedAPI_UpdateScores_Handler,
		},
		{
			MethodName: "deleteCircle",
			Handler:    _FeedAPI_DeleteCircle_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "feed-api/feed/v1/feed.proto",
}

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

View Source
var File_feed_api_feed_v1_feed_proto protoreflect.FileDescriptor

Functions

func RegisterFeedAPIServer

func RegisterFeedAPIServer(s grpc.ServiceRegistrar, srv FeedAPIServer)

Types

type DeleteCircleRequest

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

func (*DeleteCircleRequest) Descriptor deprecated

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

Deprecated: Use DeleteCircleRequest.ProtoReflect.Descriptor instead.

func (*DeleteCircleRequest) GetId

func (x *DeleteCircleRequest) GetId() string

func (*DeleteCircleRequest) ProtoMessage

func (*DeleteCircleRequest) ProtoMessage()

func (*DeleteCircleRequest) ProtoReflect

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

func (*DeleteCircleRequest) Reset

func (x *DeleteCircleRequest) Reset()

func (*DeleteCircleRequest) String

func (x *DeleteCircleRequest) String() string

type DeletePostsRequest

type DeletePostsRequest struct {
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

func (*DeletePostsRequest) Descriptor deprecated

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

Deprecated: Use DeletePostsRequest.ProtoReflect.Descriptor instead.

func (*DeletePostsRequest) GetIds

func (x *DeletePostsRequest) GetIds() []string

func (*DeletePostsRequest) ProtoMessage

func (*DeletePostsRequest) ProtoMessage()

func (*DeletePostsRequest) ProtoReflect

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

func (*DeletePostsRequest) Reset

func (x *DeletePostsRequest) Reset()

func (*DeletePostsRequest) String

func (x *DeletePostsRequest) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Feed

type Feed struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*Feed) Descriptor deprecated

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

Deprecated: Use Feed.ProtoReflect.Descriptor instead.

func (*Feed) GetId

func (x *Feed) GetId() string

func (*Feed) GetName

func (x *Feed) GetName() string

func (*Feed) GetType

func (x *Feed) GetType() string

func (*Feed) ProtoMessage

func (*Feed) ProtoMessage()

func (*Feed) ProtoReflect

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

func (*Feed) Reset

func (x *Feed) Reset()

func (*Feed) String

func (x *Feed) String() string

type FeedAPIClient

type FeedAPIClient interface {
	// gets feed pages with list of items
	GetUserFeed(ctx context.Context, in *GetFeedRequest, opts ...grpc.CallOption) (*GetFeedResponse, error)
	GetCircleFeed(ctx context.Context, in *GetFeedRequest, opts ...grpc.CallOption) (*GetFeedResponse, error)
	GetPopularFeed(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetFeedResponse, error)
	// get feeds for gql
	GetFeedList(ctx context.Context, in *GetFeedListRequest, opts ...grpc.CallOption) (*GetFeedListResponse, error)
	GetFeed(ctx context.Context, in *GetFeedRequest, opts ...grpc.CallOption) (*GetFeedResponse, error)
	GetGroups(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetGroupsResponse, error)
	// cleanup method
	DeletePosts(ctx context.Context, in *DeletePostsRequest, opts ...grpc.CallOption) (*Empty, error)
	// migrate method
	UpdateScores(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	// ad-hoc methods
	DeleteCircle(ctx context.Context, in *DeleteCircleRequest, opts ...grpc.CallOption) (*Empty, error)
}

FeedAPIClient is the client API for FeedAPI 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 NewFeedAPIClient

func NewFeedAPIClient(cc grpc.ClientConnInterface) FeedAPIClient

type FeedAPIServer

type FeedAPIServer interface {
	// gets feed pages with list of items
	GetUserFeed(context.Context, *GetFeedRequest) (*GetFeedResponse, error)
	GetCircleFeed(context.Context, *GetFeedRequest) (*GetFeedResponse, error)
	GetPopularFeed(context.Context, *Empty) (*GetFeedResponse, error)
	// get feeds for gql
	GetFeedList(context.Context, *GetFeedListRequest) (*GetFeedListResponse, error)
	GetFeed(context.Context, *GetFeedRequest) (*GetFeedResponse, error)
	GetGroups(context.Context, *Empty) (*GetGroupsResponse, error)
	// cleanup method
	DeletePosts(context.Context, *DeletePostsRequest) (*Empty, error)
	// migrate method
	UpdateScores(context.Context, *Empty) (*Empty, error)
	// ad-hoc methods
	DeleteCircle(context.Context, *DeleteCircleRequest) (*Empty, error)
	// contains filtered or unexported methods
}

FeedAPIServer is the server API for FeedAPI service. All implementations must embed UnimplementedFeedAPIServer for forward compatibility

type GetFeedListRequest

type GetFeedListRequest struct {
	Cursor *PageCursor `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFeedListRequest) Descriptor deprecated

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

Deprecated: Use GetFeedListRequest.ProtoReflect.Descriptor instead.

func (*GetFeedListRequest) GetCursor

func (x *GetFeedListRequest) GetCursor() *PageCursor

func (*GetFeedListRequest) ProtoMessage

func (*GetFeedListRequest) ProtoMessage()

func (*GetFeedListRequest) ProtoReflect

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

func (*GetFeedListRequest) Reset

func (x *GetFeedListRequest) Reset()

func (*GetFeedListRequest) String

func (x *GetFeedListRequest) String() string

type GetFeedListResponse

type GetFeedListResponse struct {
	Feeds    []*Feed   `protobuf:"bytes,1,rep,name=feeds,proto3" json:"feeds,omitempty"`
	PageInfo *PageInfo `protobuf:"bytes,2,opt,name=pageInfo,proto3" json:"pageInfo,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFeedListResponse) Descriptor deprecated

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

Deprecated: Use GetFeedListResponse.ProtoReflect.Descriptor instead.

func (*GetFeedListResponse) GetFeeds

func (x *GetFeedListResponse) GetFeeds() []*Feed

func (*GetFeedListResponse) GetPageInfo

func (x *GetFeedListResponse) GetPageInfo() *PageInfo

func (*GetFeedListResponse) ProtoMessage

func (*GetFeedListResponse) ProtoMessage()

func (*GetFeedListResponse) ProtoReflect

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

func (*GetFeedListResponse) Reset

func (x *GetFeedListResponse) Reset()

func (*GetFeedListResponse) String

func (x *GetFeedListResponse) String() string

type GetFeedRequest

type GetFeedRequest struct {
	Id     string      `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Cursor *PageCursor `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFeedRequest) Descriptor deprecated

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

Deprecated: Use GetFeedRequest.ProtoReflect.Descriptor instead.

func (*GetFeedRequest) GetCursor

func (x *GetFeedRequest) GetCursor() *PageCursor

func (*GetFeedRequest) GetId

func (x *GetFeedRequest) GetId() string

func (*GetFeedRequest) ProtoMessage

func (*GetFeedRequest) ProtoMessage()

func (*GetFeedRequest) ProtoReflect

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

func (*GetFeedRequest) Reset

func (x *GetFeedRequest) Reset()

func (*GetFeedRequest) String

func (x *GetFeedRequest) String() string

type GetFeedResponse

type GetFeedResponse struct {
	Posts    []*GetFeedResponse_Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"`
	PageInfo *PageInfo               `protobuf:"bytes,2,opt,name=pageInfo,proto3" json:"pageInfo,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFeedResponse) Descriptor deprecated

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

Deprecated: Use GetFeedResponse.ProtoReflect.Descriptor instead.

func (*GetFeedResponse) GetPageInfo

func (x *GetFeedResponse) GetPageInfo() *PageInfo

func (*GetFeedResponse) GetPosts

func (x *GetFeedResponse) GetPosts() []*GetFeedResponse_Post

func (*GetFeedResponse) ProtoMessage

func (*GetFeedResponse) ProtoMessage()

func (*GetFeedResponse) ProtoReflect

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

func (*GetFeedResponse) Reset

func (x *GetFeedResponse) Reset()

func (*GetFeedResponse) String

func (x *GetFeedResponse) String() string

type GetFeedResponse_Post

type GetFeedResponse_Post struct {
	Id    string  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Score float64 `protobuf:"fixed64,2,opt,name=score,proto3" json:"score,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFeedResponse_Post) Descriptor deprecated

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

Deprecated: Use GetFeedResponse_Post.ProtoReflect.Descriptor instead.

func (*GetFeedResponse_Post) GetId

func (x *GetFeedResponse_Post) GetId() string

func (*GetFeedResponse_Post) GetScore

func (x *GetFeedResponse_Post) GetScore() float64

func (*GetFeedResponse_Post) ProtoMessage

func (*GetFeedResponse_Post) ProtoMessage()

func (*GetFeedResponse_Post) ProtoReflect

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

func (*GetFeedResponse_Post) Reset

func (x *GetFeedResponse_Post) Reset()

func (*GetFeedResponse_Post) String

func (x *GetFeedResponse_Post) String() string

type GetGroupsResponse

type GetGroupsResponse struct {
	Groups []*Group `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
	// contains filtered or unexported fields
}

func (*GetGroupsResponse) Descriptor deprecated

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

Deprecated: Use GetGroupsResponse.ProtoReflect.Descriptor instead.

func (*GetGroupsResponse) GetGroups

func (x *GetGroupsResponse) GetGroups() []*Group

func (*GetGroupsResponse) ProtoMessage

func (*GetGroupsResponse) ProtoMessage()

func (*GetGroupsResponse) ProtoReflect

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

func (*GetGroupsResponse) Reset

func (x *GetGroupsResponse) Reset()

func (*GetGroupsResponse) String

func (x *GetGroupsResponse) String() string

type Group

type Group struct {
	Id         string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	TopCircles []string `protobuf:"bytes,2,rep,name=topCircles,proto3" json:"topCircles,omitempty"`
	// contains filtered or unexported fields
}

func (*Group) Descriptor deprecated

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

Deprecated: Use Group.ProtoReflect.Descriptor instead.

func (*Group) GetId

func (x *Group) GetId() string

func (*Group) GetTopCircles

func (x *Group) GetTopCircles() []string

func (*Group) ProtoMessage

func (*Group) ProtoMessage()

func (*Group) ProtoReflect

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

func (*Group) Reset

func (x *Group) Reset()

func (*Group) String

func (x *Group) String() string

type PageCursor

type PageCursor struct {
	CursorId string  `protobuf:"bytes,1,opt,name=cursorId,proto3" json:"cursorId,omitempty"`
	Limit    uint32  `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	Dir      PageDir `protobuf:"varint,3,opt,name=dir,proto3,enum=feed_api.v1.PageDir" json:"dir,omitempty"`
	// contains filtered or unexported fields
}

func (*PageCursor) Descriptor deprecated

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

Deprecated: Use PageCursor.ProtoReflect.Descriptor instead.

func (*PageCursor) GetCursorId

func (x *PageCursor) GetCursorId() string

func (*PageCursor) GetDir

func (x *PageCursor) GetDir() PageDir

func (*PageCursor) GetLimit

func (x *PageCursor) GetLimit() uint32

func (*PageCursor) ProtoMessage

func (*PageCursor) ProtoMessage()

func (*PageCursor) ProtoReflect

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

func (*PageCursor) Reset

func (x *PageCursor) Reset()

func (*PageCursor) String

func (x *PageCursor) String() string

type PageDir

type PageDir int32
const (
	PageDir_Forward  PageDir = 0
	PageDir_Backward PageDir = 1
)

func (PageDir) Descriptor

func (PageDir) Descriptor() protoreflect.EnumDescriptor

func (PageDir) Enum

func (x PageDir) Enum() *PageDir

func (PageDir) EnumDescriptor deprecated

func (PageDir) EnumDescriptor() ([]byte, []int)

Deprecated: Use PageDir.Descriptor instead.

func (PageDir) Number

func (x PageDir) Number() protoreflect.EnumNumber

func (PageDir) String

func (x PageDir) String() string

func (PageDir) Type

func (PageDir) Type() protoreflect.EnumType

type PageInfo

type PageInfo struct {
	FirstId *string `protobuf:"bytes,1,opt,name=firstId,proto3,oneof" json:"firstId,omitempty"`
	LastId  *string `protobuf:"bytes,2,opt,name=lastId,proto3,oneof" json:"lastId,omitempty"`
	HasPrev bool    `protobuf:"varint,3,opt,name=hasPrev,proto3" json:"hasPrev,omitempty"`
	HasNext bool    `protobuf:"varint,4,opt,name=hasNext,proto3" json:"hasNext,omitempty"`
	Length  uint32  `protobuf:"varint,5,opt,name=length,proto3" json:"length,omitempty"`
	// contains filtered or unexported fields
}

func (*PageInfo) Descriptor deprecated

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

Deprecated: Use PageInfo.ProtoReflect.Descriptor instead.

func (*PageInfo) GetFirstId

func (x *PageInfo) GetFirstId() string

func (*PageInfo) GetHasNext

func (x *PageInfo) GetHasNext() bool

func (*PageInfo) GetHasPrev

func (x *PageInfo) GetHasPrev() bool

func (*PageInfo) GetLastId

func (x *PageInfo) GetLastId() string

func (*PageInfo) GetLength

func (x *PageInfo) GetLength() uint32

func (*PageInfo) ProtoMessage

func (*PageInfo) ProtoMessage()

func (*PageInfo) ProtoReflect

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

func (*PageInfo) Reset

func (x *PageInfo) Reset()

func (*PageInfo) String

func (x *PageInfo) String() string

type UnimplementedFeedAPIServer

type UnimplementedFeedAPIServer struct {
}

UnimplementedFeedAPIServer must be embedded to have forward compatible implementations.

func (UnimplementedFeedAPIServer) DeleteCircle

func (UnimplementedFeedAPIServer) DeletePosts

func (UnimplementedFeedAPIServer) GetCircleFeed

func (UnimplementedFeedAPIServer) GetFeed

func (UnimplementedFeedAPIServer) GetFeedList

func (UnimplementedFeedAPIServer) GetGroups

func (UnimplementedFeedAPIServer) GetPopularFeed

func (UnimplementedFeedAPIServer) GetUserFeed

func (UnimplementedFeedAPIServer) UpdateScores

type UnsafeFeedAPIServer

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

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

Directories

Path Synopsis
Package feed_mock is a generated GoMock package.
Package feed_mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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