service

package
v0.0.0-...-af23f1f Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action int
const (
	Enable Action = iota
	Stop
	Restart
)

type ActionToUIDs

type ActionToUIDs map[Action][]uint32

ActionToUIDs maps particular action to UIDs for which this action was executed

type MockNorduserClient

type MockNorduserClient struct {
	// contains filtered or unexported fields
}

func NewMockNorduserClient

func NewMockNorduserClient(startFileshareErr error) *MockNorduserClient

func (*MockNorduserClient) StartFileshare

func (m *MockNorduserClient) StartFileshare(uid uint32) error

func (*MockNorduserClient) StopFileshare

func (m *MockNorduserClient) StopFileshare(uid uint32) error

type MockNorduserCombinedService

type MockNorduserCombinedService struct {
	ActionToUIDs ActionToUIDs

	EnableErr  error
	StopErr    error
	RestartErr error
}

func NewMockNorduserCombinedService

func NewMockNorduserCombinedService() MockNorduserCombinedService

func (*MockNorduserCombinedService) CheckNoAction

func (m *MockNorduserCombinedService) CheckNoAction(filters ...Action) bool

CheckNoAction is a helper method for test callers, it returns true if no action was taken by the mock in its lifetime. Actions provided in the optional filters parameter will be ingored when checking.

func (*MockNorduserCombinedService) Disable

func (m *MockNorduserCombinedService) Disable(uid uint32) error

func (*MockNorduserCombinedService) DisableAll

func (m *MockNorduserCombinedService) DisableAll()

func (*MockNorduserCombinedService) Enable

func (m *MockNorduserCombinedService) Enable(uid uint32, _ uint32, _ string) error

func (*MockNorduserCombinedService) Restart

func (m *MockNorduserCombinedService) Restart(uid uint32) error

func (*MockNorduserCombinedService) Stop

func (m *MockNorduserCombinedService) Stop(uid uint32, wait bool) error

func (*MockNorduserCombinedService) StopAll

func (m *MockNorduserCombinedService) StopAll()

Jump to

Keyboard shortcuts

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