Versions in this module Expand all Collapse all v1 v1.5.0 Nov 30, 2021 v1.4.6 Oct 28, 2021 Changes in this version + const ClientIDHeader + const ClientSecretHeader + const InternalCallTokenHeader + const NamespaceHeader + const OauthTokenHeader + const RealIPHeader + const RequestID + const ResponseCodeHeader + const ResponseDataHeader + const ResponseDescHeader + const ResponseMetaHeader + const ResponseReasonHeader + const UserAgentHeader + var Namespace = "default" + func GetClientCredentialsFromHTTPRequest(r *http.Request) (cid, cs string) + func GetTokenFromHeader(r *http.Request) string + func NewExceptionFromTrailer(md metadata.MD, err error) exception.APIException + type GrpcInCtx struct + func GetGrpcInCtx(ctx context.Context) (*GrpcInCtx, error) + func NewGrpcInCtx() *GrpcInCtx + func NewGrpcInCtxFromHTTPRequest(r *http.Request) (*GrpcInCtx, error) + func (c *GrpcInCtx) Context() context.Context + func (c *GrpcInCtx) GetAccessToKen() string + func (c *GrpcInCtx) GetClientID() string + func (c *GrpcInCtx) GetClientSecret() string + func (c *GrpcInCtx) GetNamespace() string + func (c *GrpcInCtx) GetRequestID() string + func (c *GrpcInCtx) SetAccessToKen(token string) + func (c *GrpcInCtx) SetClientCredentials(clientID, clientSecret string) + func (c GrpcInCtx) SetAccessToken(ak string) + func (c GrpcInCtx) SetRemoteIP(ip string) + func (c GrpcInCtx) SetRequestID(requestID string) + func (c GrpcInCtx) SetUserAgent(ua string) + type GrpcOutCtx struct + func NewGrpcOutCtx() *GrpcOutCtx + func NewGrpcOutCtxFromHTTPRequest(r *http.Request) (*GrpcOutCtx, error) + func NewGrpcOutCtxFromIn(in *GrpcInCtx) *GrpcOutCtx + func (c *GrpcOutCtx) Context() context.Context + func (c *GrpcOutCtx) SetNamesapce(ns string) + func (c GrpcOutCtx) SetAccessToken(ak string) + func (c GrpcOutCtx) SetRemoteIP(ip string) + func (c GrpcOutCtx) SetRequestID(requestID string) + func (c GrpcOutCtx) SetUserAgent(ua string)