Documentation ¶
Index ¶
- func RegisterSiteServant(e *gin.Engine, s Site, m ...SiteChain)
- type AgentInfo
- type LoginReq
- type LoginResp
- type LogoutReq
- type ServerInfo
- type Site
- type SiteChain
- type Tweet
- type TweetsReq
- type TweetsResp
- type UnimplementedSiteChain
- type UnimplementedSiteServant
- func (UnimplementedSiteServant) AnyStaticks(c *gin.Context)
- func (UnimplementedSiteServant) AnyTopics(c context.Context) mir.Error
- func (UnimplementedSiteServant) Articles(c context.Context) mir.Error
- func (UnimplementedSiteServant) Assets(c *gin.Context, req *LoginReq) mir.Error
- func (UnimplementedSiteServant) Chain() gin.HandlersChain
- func (UnimplementedSiteServant) FileUpload(c *gin.Context)
- func (UnimplementedSiteServant) ImageUpload(c *gin.Context)
- func (UnimplementedSiteServant) Index(c context.Context) mir.Error
- func (UnimplementedSiteServant) Login(c context.Context, req *LoginReq) (*LoginResp, mir.Error)
- func (UnimplementedSiteServant) Logout(c context.Context, req *LogoutReq) mir.Error
- func (UnimplementedSiteServant) ManyResources(c *gin.Context)
- func (UnimplementedSiteServant) MultiAttachments(c *gin.Context)
- func (UnimplementedSiteServant) NextTweets(c context.Context, req *TweetsReq) (*TweetsResp, mir.Error)
- func (UnimplementedSiteServant) PrevTweets(c context.Context, req *TweetsReq) (*TweetsResp, mir.Error)
- func (UnimplementedSiteServant) SimpleUpload(c *gin.Context, req *LoginReq) (*LoginResp, mir.Error)
- func (UnimplementedSiteServant) Statics(c *gin.Context)
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LoginResp ¶
type LoginResp struct { UserInfo ServerInfo ServerInfo `json:"server_info"` JwtToken string `json:"jwt_token"` }
type ServerInfo ¶
type ServerInfo struct {
ApiVer string `json:"api_ver"`
}
type Site ¶
type Site interface { // Chain provide handlers chain for gin Chain() gin.HandlersChain MultiAttachments(*gin.Context) ManyResources(*gin.Context) AnyStaticks(*gin.Context) Statics(*gin.Context) Assets(*gin.Context, *LoginReq) mir.Error SimpleUpload(*gin.Context, *LoginReq) (*LoginResp, mir.Error) FileUpload(*gin.Context) ImageUpload(*gin.Context) Logout(context.Context, *LogoutReq) mir.Error Login(context.Context, *LoginReq) (*LoginResp, mir.Error) PrevTweets(context.Context, *TweetsReq) (*TweetsResp, mir.Error) NextTweets(context.Context, *TweetsReq) (*TweetsResp, mir.Error) AnyTopics(context.Context) mir.Error Articles(context.Context) mir.Error Index(context.Context) mir.Error // contains filtered or unexported methods }
type SiteChain ¶
type SiteChain interface { ChainMultiAttachments() gin.HandlersChain ChainSimpleUpload() gin.HandlersChain ChainFileUpload() gin.HandlersChain ChainIndex() gin.HandlersChain // contains filtered or unexported methods }
type TweetsResp ¶
type UnimplementedSiteChain ¶
type UnimplementedSiteChain struct{}
UnimplementedSiteChain can be embedded to have forward compatible implementations.
func (*UnimplementedSiteChain) ChainFileUpload ¶
func (b *UnimplementedSiteChain) ChainFileUpload() gin.HandlersChain
func (*UnimplementedSiteChain) ChainIndex ¶
func (b *UnimplementedSiteChain) ChainIndex() gin.HandlersChain
func (*UnimplementedSiteChain) ChainMultiAttachments ¶
func (b *UnimplementedSiteChain) ChainMultiAttachments() gin.HandlersChain
func (*UnimplementedSiteChain) ChainSimpleUpload ¶
func (b *UnimplementedSiteChain) ChainSimpleUpload() gin.HandlersChain
type UnimplementedSiteServant ¶
type UnimplementedSiteServant struct{}
UnimplementedSiteServant can be embedded to have forward compatible implementations.
func (UnimplementedSiteServant) AnyStaticks ¶
func (UnimplementedSiteServant) AnyStaticks(c *gin.Context)
func (UnimplementedSiteServant) AnyTopics ¶
func (UnimplementedSiteServant) AnyTopics(c context.Context) mir.Error
func (UnimplementedSiteServant) Articles ¶
func (UnimplementedSiteServant) Articles(c context.Context) mir.Error
func (UnimplementedSiteServant) Assets ¶
func (UnimplementedSiteServant) Assets(c *gin.Context, req *LoginReq) mir.Error
func (UnimplementedSiteServant) Chain ¶
func (UnimplementedSiteServant) Chain() gin.HandlersChain
func (UnimplementedSiteServant) FileUpload ¶
func (UnimplementedSiteServant) FileUpload(c *gin.Context)
func (UnimplementedSiteServant) ImageUpload ¶
func (UnimplementedSiteServant) ImageUpload(c *gin.Context)
func (UnimplementedSiteServant) Index ¶
func (UnimplementedSiteServant) Index(c context.Context) mir.Error
func (UnimplementedSiteServant) Login ¶
func (UnimplementedSiteServant) Login(c context.Context, req *LoginReq) (*LoginResp, mir.Error)
func (UnimplementedSiteServant) Logout ¶
func (UnimplementedSiteServant) Logout(c context.Context, req *LogoutReq) mir.Error
func (UnimplementedSiteServant) ManyResources ¶
func (UnimplementedSiteServant) ManyResources(c *gin.Context)
func (UnimplementedSiteServant) MultiAttachments ¶
func (UnimplementedSiteServant) MultiAttachments(c *gin.Context)
func (UnimplementedSiteServant) NextTweets ¶
func (UnimplementedSiteServant) NextTweets(c context.Context, req *TweetsReq) (*TweetsResp, mir.Error)
func (UnimplementedSiteServant) PrevTweets ¶
func (UnimplementedSiteServant) PrevTweets(c context.Context, req *TweetsReq) (*TweetsResp, mir.Error)
func (UnimplementedSiteServant) SimpleUpload ¶
func (UnimplementedSiteServant) SimpleUpload(c *gin.Context, req *LoginReq) (*LoginResp, mir.Error)
func (UnimplementedSiteServant) Statics ¶
func (UnimplementedSiteServant) Statics(c *gin.Context)
Click to show internal directories.
Click to hide internal directories.