Documentation ¶
Index ¶
Constants ¶
View Source
const ( AuthURL = "%s/kiali/api/authenticate" KialiTokenCacheKey = "kubesphere:kubesphere:kiali" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Strategy Strategy ServiceToken string Host string // contains filtered or unexported fields }
Kiali Client
func NewClient ¶
func NewClient(strategy Strategy, cache cache.Interface, client HttpClient, serviceToken string, host string) *Client
NewClient creates an instance of Kiali Client.
func NewDefaultClient ¶
NewDefaultClient creates an instance of Kiali Client with default http settings.
type HttpClient ¶
type HttpClient interface { // Do is an interface of http client Do method, // that sends an HTTP request and returns an HTTP response. Do(req *http.Request) (*http.Response, error) // PostForm is an interface of http client PostForm method, // that issues a POST to the specified URL. PostForm(url string, data url.Values) (resp *http.Response, err error) }
type MockClient ¶
type TokenResponse ¶
type TokenResponse struct { // The username for the token Username string `json:"username"` // The authentication token Token string `json:"token"` // The expired time for the token ExpiresOn string `json:"expiresOn"` }
Kiali token Response
Click to show internal directories.
Click to hide internal directories.