servicetest

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDaemonMock added in v0.9.0

func NewDaemonMock() *daemonmock

Types

type ConfigServiceMock

type ConfigServiceMock struct {
	*viper.Viper
}

func (*ConfigServiceMock) GetString

func (v *ConfigServiceMock) GetString(key string) string

func (*ConfigServiceMock) ReadConfig

func (v *ConfigServiceMock) ReadConfig(in io.Reader) error

func (*ConfigServiceMock) SetConfigType

func (v *ConfigServiceMock) SetConfigType(in string)

func (*ConfigServiceMock) WriteConfigAs

func (v *ConfigServiceMock) WriteConfigAs(filename string) error

type ImmuServerMock added in v0.9.0

type ImmuServerMock struct {
	server.ImmuServerIf
	InitializeF               func() error
	StartF                    func() error
	StopF                     func() error
	WithOptionsF              func(options *server.Options) server.ImmuServerIf
	WithLoggerF               func(logger.Logger) server.ImmuServerIf
	WithStateSignerF          func(stateSigner server.StateSigner) server.ImmuServerIf
	WithStreamServiceFactoryF func(ssf stream.ServiceFactory) server.ImmuServerIf
}

func NewDefaultImmuServerMock added in v0.9.0

func NewDefaultImmuServerMock() *ImmuServerMock

func (*ImmuServerMock) Initialize added in v0.9.0

func (d *ImmuServerMock) Initialize() error

func (*ImmuServerMock) Start added in v0.9.0

func (d *ImmuServerMock) Start() error

func (*ImmuServerMock) Stop added in v0.9.0

func (d *ImmuServerMock) Stop() error

func (*ImmuServerMock) WithLogger added in v0.9.0

func (d *ImmuServerMock) WithLogger(l logger.Logger) server.ImmuServerIf

func (*ImmuServerMock) WithOptions added in v0.9.0

func (d *ImmuServerMock) WithOptions(options *server.Options) server.ImmuServerIf

func (*ImmuServerMock) WithStateSigner added in v0.9.0

func (d *ImmuServerMock) WithStateSigner(stateSigner server.StateSigner) server.ImmuServerIf

func (*ImmuServerMock) WithStreamServiceFactory added in v0.9.2

func (d *ImmuServerMock) WithStreamServiceFactory(ssf stream.ServiceFactory) server.ImmuServerIf

type SservicePermissionsMock

type SservicePermissionsMock struct{}

func (SservicePermissionsMock) GroupCreateIfNotExists

func (ssp SservicePermissionsMock) GroupCreateIfNotExists() (err error)

func (SservicePermissionsMock) SetOwnership

func (ssp SservicePermissionsMock) SetOwnership(path string) (err error)

func (SservicePermissionsMock) UserCreateIfNotExists

func (ssp SservicePermissionsMock) UserCreateIfNotExists() (err error)

type Sservicemock

type Sservicemock struct {
	NewDaemonF            func(serviceName, description string, dependencies ...string) (d daemon.Daemon, err error)
	IsAdminF              func() (bool, error)
	InstallSetupF         func(serviceName string, cmd *cobra.Command) (err error)
	UninstallSetupF       func(serviceName string) (err error)
	EraseDataF            func(serviceName string) (err error)
	IsRunningF            func(status string) bool
	GetDefaultConfigPathF func(serviceName string) (string, error)
	ReadConfigF           func(serviceName string) (err error)
	InstallConfigF        func(serviceName string) (err error)
	CopyExecInOsDefaultF  func(execPath string) (newExecPath string, err error)
	GetDefaultExecPathF   func(serviceName string) (string, error)
	UninstallExecutablesF func(serviceName string) error
}

func NewSservicemock added in v0.9.0

func NewSservicemock() *Sservicemock

func (*Sservicemock) CopyExecInOsDefault

func (ss *Sservicemock) CopyExecInOsDefault(execPath string) (newExecPath string, err error)

func (*Sservicemock) EraseData

func (ss *Sservicemock) EraseData(serviceName string) (err error)

func (*Sservicemock) GetDefaultConfigPath

func (ss *Sservicemock) GetDefaultConfigPath(serviceName string) (string, error)

func (*Sservicemock) GetDefaultExecPath

func (ss *Sservicemock) GetDefaultExecPath(serviceName string) (string, error)

func (*Sservicemock) InstallConfig

func (ss *Sservicemock) InstallConfig(serviceName string) (err error)

func (*Sservicemock) InstallSetup

func (ss *Sservicemock) InstallSetup(serviceName string, cmd *cobra.Command) (err error)

func (*Sservicemock) IsAdmin

func (ss *Sservicemock) IsAdmin() (bool, error)

func (*Sservicemock) IsRunning

func (ss *Sservicemock) IsRunning(status string) bool

func (*Sservicemock) NewDaemon

func (ss *Sservicemock) NewDaemon(name, description string, dependencies ...string) (d daemon.Daemon, err error)

func (*Sservicemock) ReadConfig

func (ss *Sservicemock) ReadConfig(serviceName string) (err error)

func (*Sservicemock) UninstallExecutables

func (ss *Sservicemock) UninstallExecutables(serviceName string) error

func (*Sservicemock) UninstallSetup

func (ss *Sservicemock) UninstallSetup(serviceName string) (err error)

Jump to

Keyboard shortcuts

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