sync

package
v0.0.0-...-f9fec28 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoSync

func DoSync(ctx context.Context, cfg *config.Config) error

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

type MockClient struct {
	mock.Mock
}

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

func (_m *MockClient) CreateUser(_a0 context.Context, _a1 *nuki.User) (*nuki.User, error)

CreateUser provides a mock function with given fields: _a0, _a1

func (*MockClient) DeleteUser

func (_m *MockClient) DeleteUser(_a0 context.Context, _a1 *nuki.User) error

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

func (_m *MockClient) FindUserByEmail(_a0 context.Context, _a1 string) (*nuki.User, error)

FindUserByEmail provides a mock function with given fields: _a0, _a1

type MockClient_CreateSmartlockAuth_Call

type MockClient_CreateSmartlockAuth_Call struct {
	*mock.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 (*MockClient_CreateSmartlockAuth_Call) Run

func (*MockClient_CreateSmartlockAuth_Call) RunAndReturn

type MockClient_CreateUser_Call

type MockClient_CreateUser_Call struct {
	*mock.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 (*MockClient_CreateUser_Call) Run

func (*MockClient_CreateUser_Call) RunAndReturn

type MockClient_DeleteUser_Call

type MockClient_DeleteUser_Call struct {
	*mock.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 (*MockClient_DeleteUser_Call) Run

func (*MockClient_DeleteUser_Call) RunAndReturn

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

type MockClient_FindSmartlockAuth_Call struct {
	*mock.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 (*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

type MockClient_FindUserByEmail_Call

type MockClient_FindUserByEmail_Call struct {
	*mock.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 (*MockClient_FindUserByEmail_Call) Run

func (*MockClient_FindUserByEmail_Call) RunAndReturn

type SyncGSuite

type SyncGSuite interface {
	SyncUsers(context.Context, string) error
}

func New

func New(cfg *config.Config, a Client, g google.Client) SyncGSuite

type User

type User interface {
	GetEmail() *string
	GetName() *string
	GetID() *int32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL