Documentation ¶
Index ¶
- func DoSync(ctx context.Context, cfg *config.Config) error
- type Client
- type MockClient
- func (_m *MockClient) CreateSmartlockAuth(_a0 context.Context, _a1 *models.SmartlocksAuthCreate) error
- func (_m *MockClient) CreateUser(_a0 context.Context, _a1 *nuki.User) (*nuki.User, error)
- func (_m *MockClient) DeleteUser(_a0 context.Context, _a1 *nuki.User) error
- func (_m *MockClient) EXPECT() *MockClient_Expecter
- func (_m *MockClient) FindSmartlockAuth(ctx context.Context, smartlockID int64, accountUserID int32) (*models.SmartlockAuth, error)
- func (_m *MockClient) FindUserByEmail(_a0 context.Context, _a1 string) (*nuki.User, error)
- type MockClient_CreateSmartlockAuth_Call
- func (_c *MockClient_CreateSmartlockAuth_Call) Return(_a0 error) *MockClient_CreateSmartlockAuth_Call
- func (_c *MockClient_CreateSmartlockAuth_Call) Run(run func(_a0 context.Context, _a1 *models.SmartlocksAuthCreate)) *MockClient_CreateSmartlockAuth_Call
- func (_c *MockClient_CreateSmartlockAuth_Call) RunAndReturn(run func(context.Context, *models.SmartlocksAuthCreate) error) *MockClient_CreateSmartlockAuth_Call
- type MockClient_CreateUser_Call
- func (_c *MockClient_CreateUser_Call) Return(_a0 *nuki.User, _a1 error) *MockClient_CreateUser_Call
- func (_c *MockClient_CreateUser_Call) Run(run func(_a0 context.Context, _a1 *nuki.User)) *MockClient_CreateUser_Call
- func (_c *MockClient_CreateUser_Call) RunAndReturn(run func(context.Context, *nuki.User) (*nuki.User, error)) *MockClient_CreateUser_Call
- type MockClient_DeleteUser_Call
- func (_c *MockClient_DeleteUser_Call) Return(_a0 error) *MockClient_DeleteUser_Call
- func (_c *MockClient_DeleteUser_Call) Run(run func(_a0 context.Context, _a1 *nuki.User)) *MockClient_DeleteUser_Call
- func (_c *MockClient_DeleteUser_Call) RunAndReturn(run func(context.Context, *nuki.User) error) *MockClient_DeleteUser_Call
- type MockClient_Expecter
- func (_e *MockClient_Expecter) CreateSmartlockAuth(_a0 interface{}, _a1 interface{}) *MockClient_CreateSmartlockAuth_Call
- func (_e *MockClient_Expecter) CreateUser(_a0 interface{}, _a1 interface{}) *MockClient_CreateUser_Call
- func (_e *MockClient_Expecter) DeleteUser(_a0 interface{}, _a1 interface{}) *MockClient_DeleteUser_Call
- func (_e *MockClient_Expecter) FindSmartlockAuth(ctx interface{}, smartlockID interface{}, accountUserID interface{}) *MockClient_FindSmartlockAuth_Call
- func (_e *MockClient_Expecter) FindUserByEmail(_a0 interface{}, _a1 interface{}) *MockClient_FindUserByEmail_Call
- type MockClient_FindSmartlockAuth_Call
- func (_c *MockClient_FindSmartlockAuth_Call) Return(_a0 *models.SmartlockAuth, _a1 error) *MockClient_FindSmartlockAuth_Call
- func (_c *MockClient_FindSmartlockAuth_Call) Run(run func(ctx context.Context, smartlockID int64, accountUserID int32)) *MockClient_FindSmartlockAuth_Call
- func (_c *MockClient_FindSmartlockAuth_Call) RunAndReturn(run func(context.Context, int64, int32) (*models.SmartlockAuth, error)) *MockClient_FindSmartlockAuth_Call
- type MockClient_FindUserByEmail_Call
- func (_c *MockClient_FindUserByEmail_Call) Return(_a0 *nuki.User, _a1 error) *MockClient_FindUserByEmail_Call
- func (_c *MockClient_FindUserByEmail_Call) Run(run func(_a0 context.Context, _a1 string)) *MockClient_FindUserByEmail_Call
- func (_c *MockClient_FindUserByEmail_Call) RunAndReturn(run func(context.Context, string) (*nuki.User, error)) *MockClient_FindUserByEmail_Call
- type SyncGSuite
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface { CreateUser(context.Context, *nuki.User) (*nuki.User, error) FindUserByEmail(context.Context, string) (*nuki.User, error) FindSmartlockAuth(ctx context.Context, smartlockID int64, accountUserID int32) (*models.SmartlockAuth, error) CreateSmartlockAuth(context.Context, *models.SmartlocksAuthCreate) error DeleteUser(context.Context, *nuki.User) error }
type MockClient ¶
MockClient is an autogenerated mock type for the Client type
func NewMockClient ¶
func NewMockClient(t interface { mock.TestingT Cleanup(func()) }) *MockClient
NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockClient) CreateSmartlockAuth ¶
func (_m *MockClient) CreateSmartlockAuth(_a0 context.Context, _a1 *models.SmartlocksAuthCreate) error
CreateSmartlockAuth provides a mock function with given fields: _a0, _a1
func (*MockClient) CreateUser ¶
CreateUser provides a mock function with given fields: _a0, _a1
func (*MockClient) DeleteUser ¶
DeleteUser provides a mock function with given fields: _a0, _a1
func (*MockClient) EXPECT ¶
func (_m *MockClient) EXPECT() *MockClient_Expecter
func (*MockClient) FindSmartlockAuth ¶
func (_m *MockClient) FindSmartlockAuth(ctx context.Context, smartlockID int64, accountUserID int32) (*models.SmartlockAuth, error)
FindSmartlockAuth provides a mock function with given fields: ctx, smartlockID, accountUserID
func (*MockClient) FindUserByEmail ¶
FindUserByEmail provides a mock function with given fields: _a0, _a1
type MockClient_CreateSmartlockAuth_Call ¶
MockClient_CreateSmartlockAuth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSmartlockAuth'
func (*MockClient_CreateSmartlockAuth_Call) Return ¶
func (_c *MockClient_CreateSmartlockAuth_Call) Return(_a0 error) *MockClient_CreateSmartlockAuth_Call
func (*MockClient_CreateSmartlockAuth_Call) Run ¶
func (_c *MockClient_CreateSmartlockAuth_Call) Run(run func(_a0 context.Context, _a1 *models.SmartlocksAuthCreate)) *MockClient_CreateSmartlockAuth_Call
func (*MockClient_CreateSmartlockAuth_Call) RunAndReturn ¶
func (_c *MockClient_CreateSmartlockAuth_Call) RunAndReturn(run func(context.Context, *models.SmartlocksAuthCreate) error) *MockClient_CreateSmartlockAuth_Call
type MockClient_CreateUser_Call ¶
MockClient_CreateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUser'
func (*MockClient_CreateUser_Call) Return ¶
func (_c *MockClient_CreateUser_Call) Return(_a0 *nuki.User, _a1 error) *MockClient_CreateUser_Call
func (*MockClient_CreateUser_Call) Run ¶
func (_c *MockClient_CreateUser_Call) Run(run func(_a0 context.Context, _a1 *nuki.User)) *MockClient_CreateUser_Call
func (*MockClient_CreateUser_Call) RunAndReturn ¶
func (_c *MockClient_CreateUser_Call) RunAndReturn(run func(context.Context, *nuki.User) (*nuki.User, error)) *MockClient_CreateUser_Call
type MockClient_DeleteUser_Call ¶
MockClient_DeleteUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteUser'
func (*MockClient_DeleteUser_Call) Return ¶
func (_c *MockClient_DeleteUser_Call) Return(_a0 error) *MockClient_DeleteUser_Call
func (*MockClient_DeleteUser_Call) Run ¶
func (_c *MockClient_DeleteUser_Call) Run(run func(_a0 context.Context, _a1 *nuki.User)) *MockClient_DeleteUser_Call
func (*MockClient_DeleteUser_Call) RunAndReturn ¶
func (_c *MockClient_DeleteUser_Call) RunAndReturn(run func(context.Context, *nuki.User) error) *MockClient_DeleteUser_Call
type MockClient_Expecter ¶
type MockClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockClient_Expecter) CreateSmartlockAuth ¶
func (_e *MockClient_Expecter) CreateSmartlockAuth(_a0 interface{}, _a1 interface{}) *MockClient_CreateSmartlockAuth_Call
CreateSmartlockAuth is a helper method to define mock.On call
- _a0 context.Context
- _a1 *models.SmartlocksAuthCreate
func (*MockClient_Expecter) CreateUser ¶
func (_e *MockClient_Expecter) CreateUser(_a0 interface{}, _a1 interface{}) *MockClient_CreateUser_Call
CreateUser is a helper method to define mock.On call
- _a0 context.Context
- _a1 *nuki.User
func (*MockClient_Expecter) DeleteUser ¶
func (_e *MockClient_Expecter) DeleteUser(_a0 interface{}, _a1 interface{}) *MockClient_DeleteUser_Call
DeleteUser is a helper method to define mock.On call
- _a0 context.Context
- _a1 *nuki.User
func (*MockClient_Expecter) FindSmartlockAuth ¶
func (_e *MockClient_Expecter) FindSmartlockAuth(ctx interface{}, smartlockID interface{}, accountUserID interface{}) *MockClient_FindSmartlockAuth_Call
FindSmartlockAuth is a helper method to define mock.On call
- ctx context.Context
- smartlockID int64
- accountUserID int32
func (*MockClient_Expecter) FindUserByEmail ¶
func (_e *MockClient_Expecter) FindUserByEmail(_a0 interface{}, _a1 interface{}) *MockClient_FindUserByEmail_Call
FindUserByEmail is a helper method to define mock.On call
- _a0 context.Context
- _a1 string
type MockClient_FindSmartlockAuth_Call ¶
MockClient_FindSmartlockAuth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindSmartlockAuth'
func (*MockClient_FindSmartlockAuth_Call) Return ¶
func (_c *MockClient_FindSmartlockAuth_Call) Return(_a0 *models.SmartlockAuth, _a1 error) *MockClient_FindSmartlockAuth_Call
func (*MockClient_FindSmartlockAuth_Call) Run ¶
func (_c *MockClient_FindSmartlockAuth_Call) Run(run func(ctx context.Context, smartlockID int64, accountUserID int32)) *MockClient_FindSmartlockAuth_Call
func (*MockClient_FindSmartlockAuth_Call) RunAndReturn ¶
func (_c *MockClient_FindSmartlockAuth_Call) RunAndReturn(run func(context.Context, int64, int32) (*models.SmartlockAuth, error)) *MockClient_FindSmartlockAuth_Call
type MockClient_FindUserByEmail_Call ¶
MockClient_FindUserByEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindUserByEmail'
func (*MockClient_FindUserByEmail_Call) Return ¶
func (_c *MockClient_FindUserByEmail_Call) Return(_a0 *nuki.User, _a1 error) *MockClient_FindUserByEmail_Call
func (*MockClient_FindUserByEmail_Call) Run ¶
func (_c *MockClient_FindUserByEmail_Call) Run(run func(_a0 context.Context, _a1 string)) *MockClient_FindUserByEmail_Call
func (*MockClient_FindUserByEmail_Call) RunAndReturn ¶
func (_c *MockClient_FindUserByEmail_Call) RunAndReturn(run func(context.Context, string) (*nuki.User, error)) *MockClient_FindUserByEmail_Call