Documentation ¶
Index ¶
- Constants
- func ExcludeSensitiveHeader(header http.Header, excludedString []string) (h http.Header)
- func ExcludeSensitiveRequestBody(body *string)
- func IsClientError(code int) bool
- func IsRedirection(code int) bool
- func IsServerError(code int) bool
- func IsSuccess(code int) bool
- func KitabisaHeader(req *http.Request, clientName, clientVersion, requestID string) *http.Request
- func ReadRequestBody(req *http.Request) (bodyString string)
- func SetAuth(req *http.Request, jwt string)
- func SetKitabisaHeader(ctx context.Context, clientName, clientVersion string, req *http.Request)
- func SetSignature(req *http.Request, secretKey string)
Constants ¶
View Source
const ( XKtbsPlatformName = "X-Ktbs-Platform-Name" XKtbsApiVersion = "X-Ktbs-Api-Version" XKtbsSignature = "X-Ktbs-Signature" XKtbsRequestID = "X-Ktbs-Request-ID" XKtbsClientName = "X-Ktbs-Client-Name" XKtbsClientVersion = "X-Ktbs-Client-Version" XKtbsTime = "X-Ktbs-Time" )
Variables ¶
This section is empty.
Functions ¶
func ExcludeSensitiveHeader ¶
ExcludeSensitiveHeader exclude sensitive header. Currently, sensitive header only Authorization
func ExcludeSensitiveRequestBody ¶
func ExcludeSensitiveRequestBody(body *string)
func IsClientError ¶
func IsRedirection ¶
func IsServerError ¶
func KitabisaHeader ¶
func ReadRequestBody ¶
func SetKitabisaHeader ¶
func SetSignature ¶
SetSignature must be called after SetKitabisaHeader if request require signature
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.