Documentation
¶
Overview ¶
Package user package is to manage the context of user information
Package user package is to manage the context of user information ¶
Package user package is to manage the context of user information
Index ¶
- func GetBaseUserInfoFromReq(req *restful.Request) *metav1alpha1.GitUserBaseInfo
- func UserInfoFilter(req *restful.Request, res *restful.Response, chain *restful.FilterChain)
- func UserInfoFrom(ctx context.Context) (metav1alpha1.UserInfo, bool)
- func UserInfoValue(ctx context.Context) (result metav1alpha1.UserInfo)
- func WithUserInfo(parent context.Context, userinfo metav1alpha1.UserInfo) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBaseUserInfoFromReq ¶
func GetBaseUserInfoFromReq(req *restful.Request) *metav1alpha1.GitUserBaseInfo
GetBaseUserInfoFromReq get the base userinfo from the request object
func UserInfoFilter ¶
UserInfoFilter is to parse the user login information from the request header into userinfo, and store it in the context
func UserInfoFrom ¶
func UserInfoFrom(ctx context.Context) (metav1alpha1.UserInfo, bool)
UserInfoFrom returns the value of the userinfo key on the ctx
func UserInfoValue ¶
func UserInfoValue(ctx context.Context) (result metav1alpha1.UserInfo)
UserInfoValue returns the value of the userinfo key on the ctx, or the empty string if none
func WithUserInfo ¶
WithUserInfo returns a copy of parent in which the userinfo value is set
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.