Documentation ¶
Index ¶
- func NewAuthController(cc infra.Resolver, conf *config.Config) web.Controller
- func NewCreditController(cc infra.Resolver, conf *config.Config) web.Controller
- func NewInspectController(cc infra.Resolver, conf *config.Config) web.Controller
- func NewShareController(cc infra.Resolver, conf *config.Config) web.Controller
- func NewUploadController(cc infra.Resolver, conf *config.Config) web.Controller
- func NewUserController(cc infra.Resolver, conf *config.Config) web.Controller
- type AuthController
- func (ctl AuthController) CurrentUser(ctx web.Context, req web.Request) *User
- func (ctl AuthController) Login(ctx web.Context, req web.Request, userSrv service.UserService, ...) (*User, error)
- func (ctl AuthController) Logout(req web.Request) error
- func (ctl AuthController) Register(router web.Router)
- type CreditController
- type IDRes
- type InspectController
- type PaginateRes
- type PlanUpdateFields
- type ShareController
- func (ctl ShareController) CancelSharePlan(ctx web.Context, req web.Request, shareSrv service.ShareService) error
- func (ctl ShareController) CreateOrUpdateSharePlan(ctx web.Context, req web.Request, shareSrv service.ShareService) error
- func (ctl ShareController) CreateShare(ctx web.Context, req web.Request, shareSrv service.ShareService, ...) error
- func (ctl ShareController) DeleteShare(ctx web.Context, req web.Request, shareSrv service.ShareService) error
- func (ctl ShareController) DislikeShare(ctx web.Context, req web.Request, shareSrv service.ShareService) error
- func (ctl ShareController) FinishShare(ctx web.Context, req web.Request, shareSrv service.ShareService) error
- func (ctl ShareController) JoinShare(ctx web.Context, req web.Request, shareSrv service.ShareService) error
- func (ctl ShareController) LeaveShare(ctx web.Context, req web.Request, shareSrv service.ShareService) error
- func (ctl ShareController) LikeShare(ctx web.Context, req web.Request, shareSrv service.ShareService) error
- func (ctl ShareController) MyShares(ctx web.Context, req web.Request, shareSrv service.ShareService) (*PaginateRes, error)
- func (ctl ShareController) RecentlyShares(ctx web.Context, req web.Request, shareSrv service.ShareService) (*PaginateRes, error)
- func (ctl ShareController) Register(router web.Router)
- func (ctl ShareController) Share(ctx web.Context, req web.Request, shareSrv service.ShareService) (*ShareDetail, error)
- func (ctl ShareController) Shares(ctx web.Context, req web.Request, shareSrv service.ShareService) (*PaginateRes, error)
- func (ctl ShareController) UpdateShare(ctx web.Context, req web.Request, shareSrv service.ShareService) error
- type ShareDetail
- type SharesExtra
- type UploadController
- type User
- type UserController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthController ¶
func NewCreditController ¶
func NewInspectController ¶
func NewShareController ¶
func NewUploadController ¶
func NewUserController ¶
Types ¶
type AuthController ¶
type AuthController struct {
// contains filtered or unexported fields
}
func (AuthController) CurrentUser ¶
CurrentUser return current user info
func (AuthController) Login ¶
func (ctl AuthController) Login(ctx web.Context, req web.Request, userSrv service.UserService, authProvider auth.Auth) (*User, error)
Login let user login to the system
func (AuthController) Register ¶
func (ctl AuthController) Register(router web.Router)
type CreditController ¶
type CreditController struct {
// contains filtered or unexported fields
}
func (CreditController) Ranks ¶
func (wel CreditController) Ranks(ctx web.Context, credSrv service.CreditService) (service.CreditRanks, error)
func (CreditController) Register ¶
func (wel CreditController) Register(router web.Router)
type InspectController ¶
type InspectController struct {
// contains filtered or unexported fields
}
func (InspectController) PasswordGenerator ¶
func (wel InspectController) PasswordGenerator(ctx web.Context) web.Response
func (InspectController) Register ¶
func (wel InspectController) Register(router web.Router)
type PaginateRes ¶
type PaginateRes struct { Page query.PaginateMeta `json:"page"` Data interface{} `json:"data"` Search map[string]interface{} `json:"search,omitempty"` Extra interface{} `json:"extra,omitempty"` }
PaginateRes is a struct for paginate response
type PlanUpdateFields ¶
type ShareController ¶
type ShareController struct {
// contains filtered or unexported fields
}
func (ShareController) CancelSharePlan ¶
func (ctl ShareController) CancelSharePlan(ctx web.Context, req web.Request, shareSrv service.ShareService) error
CancelSharePlan cancel a share plan
func (ShareController) CreateOrUpdateSharePlan ¶
func (ctl ShareController) CreateOrUpdateSharePlan(ctx web.Context, req web.Request, shareSrv service.ShareService) error
CreateOrUpdateSharePlan create or update a share plan
func (ShareController) CreateShare ¶
func (ctl ShareController) CreateShare(ctx web.Context, req web.Request, shareSrv service.ShareService, pub event.Publisher) error
CreateShare create a share
func (ShareController) DeleteShare ¶
func (ctl ShareController) DeleteShare(ctx web.Context, req web.Request, shareSrv service.ShareService) error
DeleteShare remove a share
func (ShareController) DislikeShare ¶
func (ctl ShareController) DislikeShare(ctx web.Context, req web.Request, shareSrv service.ShareService) error
DislikeShare cancel a vote to share
func (ShareController) FinishShare ¶
func (ctl ShareController) FinishShare(ctx web.Context, req web.Request, shareSrv service.ShareService) error
FinishShare set a share as finished
func (ShareController) JoinShare ¶
func (ctl ShareController) JoinShare(ctx web.Context, req web.Request, shareSrv service.ShareService) error
JoinShare join a share as an audience
func (ShareController) LeaveShare ¶
func (ctl ShareController) LeaveShare(ctx web.Context, req web.Request, shareSrv service.ShareService) error
LeaveShare leave a share
func (ShareController) LikeShare ¶
func (ctl ShareController) LikeShare(ctx web.Context, req web.Request, shareSrv service.ShareService) error
LikeShare give a vote to a share
func (ShareController) MyShares ¶
func (ctl ShareController) MyShares(ctx web.Context, req web.Request, shareSrv service.ShareService) (*PaginateRes, error)
MyShares return all shares for current user
- status: 0 所有 1/2/3 基于状态筛选
- type: 分享类型
func (ShareController) RecentlyShares ¶
func (ctl ShareController) RecentlyShares(ctx web.Context, req web.Request, shareSrv service.ShareService) (*PaginateRes, error)
RecentlyShares return all shares recently
- status: 0 所有 1/2/3 基于状态筛选
- type: 分享类型
func (ShareController) Register ¶
func (ctl ShareController) Register(router web.Router)
func (ShareController) Share ¶
func (ctl ShareController) Share(ctx web.Context, req web.Request, shareSrv service.ShareService) (*ShareDetail, error)
Share get a share detail
func (ShareController) Shares ¶
func (ctl ShareController) Shares(ctx web.Context, req web.Request, shareSrv service.ShareService) (*PaginateRes, error)
Shares return all shares
- status: 0 所有 1/2/3 基于状态筛选
- creator: 基于创建人筛选 0 - 所有人
- type: 分享类型
func (ShareController) UpdateShare ¶
func (ctl ShareController) UpdateShare(ctx web.Context, req web.Request, shareSrv service.ShareService) error
UpdateShare update an existed share
type ShareDetail ¶
type ShareDetail struct {}
type SharesExtra ¶
type SharesExtra struct {
}type UploadController ¶
type UploadController struct {
// contains filtered or unexported fields
}
func (UploadController) Register ¶
func (ctl UploadController) Register(router web.Router)
type UserController ¶
type UserController struct {
// contains filtered or unexported fields
}
func (UserController) CurrentUser ¶
func (ctl UserController) CurrentUser(req web.Request) (*User, error)
func (UserController) Register ¶
func (ctl UserController) Register(router web.Router)
func (UserController) Users ¶
func (ctl UserController) Users(userSrv service.UserService) ([]service.UserBasic, error)
Click to show internal directories.
Click to hide internal directories.