Documentation ¶
Index ¶
Constants ¶
View Source
const ItemCountPerPage = 50
max number of items returned by Auth0 for each API call (see https://auth0.com/docs/troubleshoot/product-lifecycle/past-migrations/migrate-to-paginated-queries)
Variables ¶
View Source
var ErrAPIRateLimitReached = errors.New("client reached api rate limit")
Functions ¶
Types ¶
type ClientMock ¶
type ClientMock struct { // ListFunc mocks the List method. ListFunc func(ctx context.Context, args ...interface{}) (interface{}, error) // contains filtered or unexported fields }
ClientMock is a mock implementation of Client.
func TestSomethingThatUsesClient(t *testing.T) { // make and configure a mocked Client mockedClient := &ClientMock{ ListFunc: func(ctx context.Context, args ...interface{}) (interface{}, error) { panic("mock out the List method") }, } // use mockedClient in code that requires Client // and then make assertions. }
func (*ClientMock) List ¶
func (mock *ClientMock) List(ctx context.Context, args ...interface{}) (interface{}, error)
List calls ListFunc.
func (*ClientMock) ListCalls ¶
func (mock *ClientMock) ListCalls() []struct { Ctx context.Context Args []interface{} }
ListCalls gets all the calls that were made to List. Check the length with:
len(mockedClient.ListCalls())
Click to show internal directories.
Click to hide internal directories.