Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CAClient ¶
type CAClient struct { SignInvokeCount uint64 GeneratedCerts [][]string // Cache the generated certificates for verification purpose. // contains filtered or unexported fields }
CAClient is the mocked CAClient for testing.
func NewMockCAClient ¶
NewMockCAClient creates an instance of CAClient. errors is used to specify the number of errors before CSRSign returns a valid response. certLifetime specifies the TTL for the newly issued workload cert.
func (*CAClient) GetRootCertBundle ¶
type TokenExchangeServer ¶
type TokenExchangeServer struct {
// contains filtered or unexported fields
}
TokenExchangeServer is the mocked token exchange server for testing.
func NewMockTokenExchangeServer ¶
func NewMockTokenExchangeServer(exchangeMap map[string]string) *TokenExchangeServer
NewMockTokenExchangeServer creates an instance of TokenExchangeServer. errors is used to specify the number of errors before ExchangeToken returns a dumb token.
func (*TokenExchangeServer) ExchangeToken ¶
func (s *TokenExchangeServer) ExchangeToken(token string) (string, error)
ExchangeToken returns a dumb token or errors depending on the settings.
Click to show internal directories.
Click to hide internal directories.