component

package
v1.19.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PaaSAuth

type PaaSAuth struct {
	// contains filtered or unexported fields
}

PaaSAuth auth configuration for bk-app

func NewPaaSAuth

func NewPaaSAuth() *PaaSAuth

NewPaaSAuth construct Auth according configuration file/command line option

func (*PaaSAuth) VerifyAccessTokenForEe

func (a *PaaSAuth) VerifyAccessTokenForEe(accessToken string) (bool, map[string]interface{}, error)

VerifyAccessTokenForEe verify access token according bk app info

func (*PaaSAuth) VerifyAccessTokenForIeod

func (a *PaaSAuth) VerifyAccessTokenForIeod(accessToken string) (bool, map[string]interface{}, error)

VerifyAccessTokenForIeod refresh access token

type QueryData

type QueryData struct {
	Identity map[string]interface{} `json:"identity"`
}

QueryData query data

type QueryResp

type QueryResp struct {
	RequestID  string    `json:"request_id"`
	Result     bool      `json:"result"`
	ErrCode    int       `json:"bk_error_code"`
	ErrMessage string    `json:"bk_error_msg"`
	Data       QueryData `json:"data"`
}

QueryResp response from bk iam

func HTTPPostToBkIamAuth

func HTTPPostToBkIamAuth(url string, data map[string]interface{}, header map[string]string) (QueryResp, error)

HTTPPostToBkIamAuth bk iam post

type Response

type Response struct {
	Code    int                    `json:"code"`
	Data    map[string]interface{} `json:"data"`
	Message string                 `json:"message"`
}

Response common response for bk

func HTTPGet

func HTTPGet(url string, params map[string]string) (Response, error)

HTTPGet for bk iam get request

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL