refactor: reorganize modules and add Linux build tooling
This commit is contained in:
29
module/social/feed/internal/logic/timeline/follow.go
Normal file
29
module/social/feed/internal/logic/timeline/follow.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package timeline
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.apinb.com/bsm-sdk/core/service"
|
||||
pb "bsm/full/module/social/feed/pb"
|
||||
)
|
||||
|
||||
// 关注的动态
|
||||
func Follow(ctx context.Context, in *pb.FetchRequest) (reply *pb.PostListReply, err error) {
|
||||
// parse authorization meta.
|
||||
_, err = service.ParseMetaCtx(ctx, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// valildate request page_no,page_size.
|
||||
if in.GetPageNo() < 1 {
|
||||
in.PageNo = 1
|
||||
}
|
||||
if in.GetPageSize() < 10 {
|
||||
in.PageSize = 50
|
||||
}
|
||||
|
||||
// TODO: add your logic code & delete this line.
|
||||
|
||||
return
|
||||
}
|
||||
29
module/social/feed/internal/logic/timeline/friend.go
Normal file
29
module/social/feed/internal/logic/timeline/friend.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package timeline
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.apinb.com/bsm-sdk/core/service"
|
||||
pb "bsm/full/module/social/feed/pb"
|
||||
)
|
||||
|
||||
// 好友动态
|
||||
func Friend(ctx context.Context, in *pb.FetchRequest) (reply *pb.PostListReply, err error) {
|
||||
// parse authorization meta.
|
||||
_, err = service.ParseMetaCtx(ctx, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// valildate request page_no,page_size.
|
||||
if in.GetPageNo() < 1 {
|
||||
in.PageNo = 1
|
||||
}
|
||||
if in.GetPageSize() < 10 {
|
||||
in.PageSize = 50
|
||||
}
|
||||
|
||||
// TODO: add your logic code & delete this line.
|
||||
|
||||
return
|
||||
}
|
||||
29
module/social/feed/internal/logic/timeline/hot.go
Normal file
29
module/social/feed/internal/logic/timeline/hot.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package timeline
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.apinb.com/bsm-sdk/core/service"
|
||||
pb "bsm/full/module/social/feed/pb"
|
||||
)
|
||||
|
||||
// 热门
|
||||
func Hot(ctx context.Context, in *pb.FetchRequest) (reply *pb.PostListReply, err error) {
|
||||
// parse authorization meta.
|
||||
_, err = service.ParseMetaCtx(ctx, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// valildate request page_no,page_size.
|
||||
if in.GetPageNo() < 1 {
|
||||
in.PageNo = 1
|
||||
}
|
||||
if in.GetPageSize() < 10 {
|
||||
in.PageSize = 50
|
||||
}
|
||||
|
||||
// TODO: add your logic code & delete this line.
|
||||
|
||||
return
|
||||
}
|
||||
29
module/social/feed/internal/logic/timeline/recommend.go
Normal file
29
module/social/feed/internal/logic/timeline/recommend.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package timeline
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.apinb.com/bsm-sdk/core/service"
|
||||
pb "bsm/full/module/social/feed/pb"
|
||||
)
|
||||
|
||||
// 推荐
|
||||
func Recommend(ctx context.Context, in *pb.FetchRequest) (reply *pb.PostListReply, err error) {
|
||||
// parse authorization meta.
|
||||
_, err = service.ParseMetaCtx(ctx, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// valildate request page_no,page_size.
|
||||
if in.GetPageNo() < 1 {
|
||||
in.PageNo = 1
|
||||
}
|
||||
if in.GetPageSize() < 10 {
|
||||
in.PageSize = 50
|
||||
}
|
||||
|
||||
// TODO: add your logic code & delete this line.
|
||||
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user