# README
ucs-go-sdk
用于集成ucs
的开发包
快速开始
安装
go get -u github.com/Macrow/ucs-go-sdk
验证Jwt
validator := NewValidator(rsaPublicKey)
jwtUser, err := validator.ValidateJwt(token)
创建连接UCS的客户端
client := NewRpcClient("your.domain.com:port") // Rpc客户端
// client := NewTLSRpcClient(certFile, "your.domain.com:port") // TLS连接下的Rpc客户端,需要UCS服务也同时开启
// client := NewHttpClient("https://your.domain.com:port", yourAccessCode) // Http客户端
client.SetToken(token)
UCS服务端验证Jwt
err := client.ValidateJwt()
UCS服务端验证操作码
err := client.ValidatePermOperationByCode("UCS_O_CODE")
UCS服务端验证接口
err := client.ValidatePermAction("ucs", "/api/v1/ucs/users", "get")
UCS服务端验证用户是否拥有机构权限
err := client.ValidatePermOrgById("org_id_is_here")
# Packages
No description provided by the author
# Functions
No description provided by the author
GetUserJwtCacheKey 获取Jwt存储的key.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author