Documentation ¶
Index ¶
- func GetKubeToken() (string, error)
- func SetBearerToken(req *http.Request, token string)
- func SetKubeAuthToken(req *http.Request) error
- type Client
- type ClientMock
- func (mmDo *ClientMock) Do(req *http.Request) (rp1 *http.Response, err error)
- func (mmDo *ClientMock) DoAfterCounter() uint64
- func (mmDo *ClientMock) DoBeforeCounter() uint64
- func (m *ClientMock) MinimockDoDone() bool
- func (m *ClientMock) MinimockDoInspect()
- func (m *ClientMock) MinimockFinish()
- func (m *ClientMock) MinimockWait(timeout mm_time.Duration)
- type ClientMockDoExpectation
- type ClientMockDoParams
- type ClientMockDoResults
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKubeToken ¶
func SetBearerToken ¶
func SetKubeAuthToken ¶
Types ¶
type ClientMock ¶
type ClientMock struct { DoMock mClientMockDo // contains filtered or unexported fields }
ClientMock implements Client
func NewClientMock ¶
func NewClientMock(t minimock.Tester) *ClientMock
NewClientMock returns a mock for Client
func (*ClientMock) DoAfterCounter ¶
func (mmDo *ClientMock) DoAfterCounter() uint64
DoAfterCounter returns a count of finished ClientMock.Do invocations
func (*ClientMock) DoBeforeCounter ¶
func (mmDo *ClientMock) DoBeforeCounter() uint64
DoBeforeCounter returns a count of ClientMock.Do invocations
func (*ClientMock) MinimockDoDone ¶
func (m *ClientMock) MinimockDoDone() bool
MinimockDoDone returns true if the count of the Do invocations corresponds the number of defined expectations
func (*ClientMock) MinimockDoInspect ¶
func (m *ClientMock) MinimockDoInspect()
MinimockDoInspect logs each unmet expectation
func (*ClientMock) MinimockFinish ¶
func (m *ClientMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*ClientMock) MinimockWait ¶
func (m *ClientMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
type ClientMockDoExpectation ¶
type ClientMockDoExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockDoExpectation specifies expectation struct of the Client.Do
func (*ClientMockDoExpectation) Then ¶
func (e *ClientMockDoExpectation) Then(rp1 *http.Response, err error) *ClientMock
Then sets up Client.Do return parameters for the expectation previously defined by the When method
type ClientMockDoParams ¶
type ClientMockDoParams struct {
// contains filtered or unexported fields
}
ClientMockDoParams contains parameters of the Client.Do
type ClientMockDoResults ¶
type ClientMockDoResults struct {
// contains filtered or unexported fields
}
ClientMockDoResults contains results of the Client.Do
type Option ¶
type Option func(options *httpOptions)
func WithAdditionalCACerts ¶
func WithInsecureSkipVerify ¶
func WithInsecureSkipVerify() Option
WithInsecureSkipVerify skip tls certificate validation
func WithTimeout ¶
WithTimeout set custom timeout for http request. Default: 10 seconds