Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
实现Vblog的客户端 (ui http ---> restful api) 提供的是一个 lib(SDK) Client.Blog().CreateBlog(xxxx) 不需要知道url, 知道参数是什么,返回什么
type TokenClient ¶
type TokenClient struct {
// contains filtered or unexported fields
}
func (*TokenClient) Login ¶
func (c *TokenClient) Login(ctx context.Context, req *token.LoginRequest) ( *token.Token, error)
登录接口(颁发Token) http client /api/vblog/v1/tokens/ --> /api/vblog/v1 + tokens base url http:127.0.0.1:8070/api/vblog/v1/tokens
func (*TokenClient) Logout ¶
func (c *TokenClient) Logout(context.Context, *token.LogoutRequest) error
退出接口(销毁Token)
func (*TokenClient) ValiateToken ¶
func (c *TokenClient) ValiateToken(context.Context, *token.ValiateToken) (*token.Token, error)
校验Token 是给内部中间层使用 身份校验层 校验完后返回Token, 通过Token获取 用户信息
Click to show internal directories.
Click to hide internal directories.