Documentation ¶
Index ¶
- func CloseClient(stage *kk_stage.Stage)
- func GetAuthorizationToken(stage *kk_stage.Stage) string
- func GetClient(stage *kk_stage.Stage) *clientv3.Client
- func GetLoginUser(stage *kk_stage.Stage) *kk_etcd_models.PBUser
- func SetClient(stage *kk_stage.Stage, client *clientv3.Client)
- func SetLoginUser(stage *kk_stage.Stage, user *kk_etcd_models.PBUser)
- func SetRequestHeader(stage *kk_stage.Stage, header RequestHeader)
- type RequestHeader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseClient ¶ added in v1.4.0
CloseClient reset etcd client after request
func GetAuthorizationToken ¶
GetAuthorizationToken get AuthorizationToken from globalHeader
func GetLoginUser ¶
func GetLoginUser(stage *kk_stage.Stage) *kk_etcd_models.PBUser
GetLoginUser get current login user from gin context
func SetLoginUser ¶
func SetLoginUser(stage *kk_stage.Stage, user *kk_etcd_models.PBUser)
SetLoginUser set current login user to gin context
func SetRequestHeader ¶
func SetRequestHeader(stage *kk_stage.Stage, header RequestHeader)
SetRequestHeader set current request header to gin context
Types ¶
type RequestHeader ¶
type RequestHeader struct { UserName string //delete after todo use https://github.com/etcd-io/etcd/pull/16803 Password string //delete after AuthorizationToken string }
func GetRequestHeader ¶
func GetRequestHeader(stage *kk_stage.Stage) RequestHeader
GetRequestHeader get current request header from gin context
Click to show internal directories.
Click to hide internal directories.