Documentation ¶
Index ¶
Constants ¶
View Source
const ( // InternalCallTokenHeader todo InternalCallTokenHeader = "internal-call-token" // ClientIDHeader tood ClientIDHeader = "client-id" // ClientSecretHeader todo ClientSecretHeader = "client-secret" // OauthTokenHeader todo OauthTokenHeader = "x-oauth-token" // RealIPHeader todo RealIPHeader = "x-real-ip" // UserAgentHeader todo UserAgentHeader = "user-agent" )
View Source
const ( // ResponseCodeHeader todo ResponseCodeHeader = "x-rpc-code" // ResponseReasonHeader todo ResponseReasonHeader = "x-rpc-reason" // ResponseDescHeader todo ResponseDescHeader = "x-rpc-desc" // ResponseMetaHeader todo ResponseMetaHeader = "x-rpc-meta" // ResponseDataHeader todo ResponseDataHeader = "x-rpc-data" )
Variables ¶
View Source
var (
// Namespace todo
Namespace = "default"
)
Functions ¶
func NewExceptionFromTrailer ¶
func NewExceptionFromTrailer(md metadata.MD, err error) exception.APIException
NewExceptionFromTrailer todo
Types ¶
type GrpcInCtx ¶
type GrpcInCtx struct {
// contains filtered or unexported fields
}
GrpcInCtx todo
func (*GrpcInCtx) GetClientSecret ¶
GetClientSecret todo
func (*GrpcInCtx) SetClientCredentials ¶
SetClientCredentials todo
type GrpcOutCtx ¶
type GrpcOutCtx struct {
// contains filtered or unexported fields
}
GrpcOutCtx todo
func NewGrpcOutCtxFromHTTPRequest ¶
func NewGrpcOutCtxFromHTTPRequest(r *http.Request) (*GrpcOutCtx, error)
NewGrpcOutCtxFromHTTPRequest 从上下文中获取Token
func (GrpcOutCtx) SetAccessToken ¶
func (c GrpcOutCtx) SetAccessToken(ak string)
SetAccessToken todo
Click to show internal directories.
Click to hide internal directories.