port

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminSettingsAdapter added in v0.16.0

type AdminSettingsAdapter interface {
	Get() (types.AdminSettings, error)
	SetChannel(channel types.UpdatesChannel) error
	SetWebhook(webhook string) error
}

type AdminSettingsService added in v0.16.0

type AdminSettingsService interface {
	Get() (types.AdminSettings, error)
	Update(settings types.AdminSettings) error
	GetWebhook() (*string, error)
	SetWebhook(webhook string) error
	GetChannel() (types.UpdatesChannel, error)
	SetChannel(channel types.UpdatesChannel) error
}

type AppsHandler

type AppsHandler interface {
	// Get handles the retrieval of all apps.
	Get(c *router.Context)
}

type AppsService

type AppsService interface {
	All() []app.Meta
}

type AuthHandler added in v0.16.0

type AuthHandler interface {
	// Login handles the login of a user.
	Login(c *router.Context)
	// Register handles the registration of a user.
	Register(c *router.Context)
	// Logout handles the logout of a user.
	Logout(c *router.Context)
}

type BaselinesAdapter

type BaselinesAdapter interface {
	// GetLatest returns the latest available Baseline. This
	// will typically fetch the latest Baseline from a remote source.
	GetLatest(ctx context.Context, channel types.UpdatesChannel) (types.Baseline, error)
}

type ChecksHandler added in v0.16.0

type ChecksHandler interface {
	// Check handles the check of all components.
	Check(c *router.Context)
}

type ChecksService added in v0.16.0

type ChecksService interface {
	CheckAll(ctx context.Context) <-chan types.CheckResponse
}

type DatabaseHandler added in v0.16.0

type DatabaseHandler interface {
	// GetCurrentDbms handles the retrieval of the current database management system
	// that Vertex is using.
	GetCurrentDbms(c *router.Context)
	// MigrateTo handles the migration to the given database management system.
	MigrateTo(c *router.Context)
}

type DbAdapter added in v0.16.0

type DbAdapter interface {
	Get() *types.DB
	Connect() error
	GetDbConfig() types.DbConfig
	GetDBMSName() types.DbmsName
	SetDBMSName(name types.DbmsName) error
}

type DbService added in v0.16.0

type DbService interface {
	GetCurrentDbms() types.DbmsName
	MigrateTo(dbms types.DbmsName) error
}

type DebugHandler added in v0.14.0

type DebugHandler interface {
	// HardReset do a hard reset of Vertex.
	HardReset(c *router.Context)
}

type DebugService added in v0.14.0

type DebugService interface {
	HardReset()
}

type HardwareHandler

type HardwareHandler interface {
	// GetHost handles the retrieval of the current host.
	GetHost(c *router.Context)
	// GetCPUs handles the retrieval of all CPUs.
	GetCPUs(c *router.Context)
}

type HardwareService

type HardwareService interface {
	GetHost() (types.Host, error)
	GetCPUs() ([]types.CPU, error)
}

type MockAdminSettingsAdapter added in v0.16.0

type MockAdminSettingsAdapter struct {
	mock.Mock
}

func (*MockAdminSettingsAdapter) Get added in v0.16.0

func (*MockAdminSettingsAdapter) Update added in v0.16.0

func (m *MockAdminSettingsAdapter) Update(settings types.AdminSettings) error

type MockBaselinesAdapter added in v0.14.0

type MockBaselinesAdapter struct {
	mock.Mock
}

func (*MockBaselinesAdapter) GetLatest added in v0.14.0

type MockSshAdapter added in v0.14.0

type MockSshAdapter struct {
	mock.Mock
}

func (*MockSshAdapter) Add added in v0.14.0

func (m *MockSshAdapter) Add(key string, username string) error

func (*MockSshAdapter) GetAll added in v0.14.0

func (m *MockSshAdapter) GetAll() ([]types.PublicKey, error)

func (*MockSshAdapter) GetUsers added in v0.16.0

func (m *MockSshAdapter) GetUsers() ([]user.User, error)

func (*MockSshAdapter) Remove added in v0.14.0

func (m *MockSshAdapter) Remove(fingerprint string, username string) error

type MockSshKernelAdapter added in v0.16.0

type MockSshKernelAdapter struct {
	mock.Mock
}

func (*MockSshKernelAdapter) Add added in v0.16.0

func (m *MockSshKernelAdapter) Add(key string, user user.User) error

func (*MockSshKernelAdapter) GetAll added in v0.16.0

func (m *MockSshKernelAdapter) GetAll(users []user.User) ([]types.PublicKey, error)

func (*MockSshKernelAdapter) GetUsers added in v0.16.0

func (m *MockSshKernelAdapter) GetUsers() ([]user.User, error)

func (*MockSshKernelAdapter) Remove added in v0.16.0

func (m *MockSshKernelAdapter) Remove(fingerprint string, user user.User) error

type SettingsHandler

type SettingsHandler interface {
	// Get handles the retrieval of all settings.
	Get(c *router.Context)
	// Patch handles the update of all settings.
	Patch(c *router.Context)
}

type SshAdapter

type SshAdapter interface {
	GetAll() ([]types.PublicKey, error)
	Add(key string, username string) error
	Remove(fingerprint string, username string) error
	GetUsers() ([]user.User, error)
}

type SshHandler

type SshHandler interface {
	// Get handles the retrieval of all SSH keys.
	Get(c *router.Context)
	// Add handles the addition of an SSH key.
	Add(c *router.Context)
	// Delete handles the deletion of an SSH key.
	Delete(c *router.Context)
	// GetUsers handles the retrieval of all users that have can have SSH keys.
	GetUsers(c *router.Context)
}

type SshKernelAdapter added in v0.16.0

type SshKernelAdapter interface {
	GetAll(users []user.User) ([]types.PublicKey, error)
	Add(key string, user user.User) error
	Remove(fingerprint string, user user.User) error
	GetUsers() ([]user.User, error)
}

type SshKernelHandler

type SshKernelHandler interface {
	// Get handles the retrieval of all SSH keys.
	Get(c *router.Context)
	// Add handles the addition of an SSH key.
	Add(c *router.Context)
	// Delete handles the deletion of an SSH key.
	Delete(c *router.Context)
	// GetUsers handles the retrieval of all users that have can have SSH keys.
	GetUsers(c *router.Context)
}

type SshKernelService added in v0.16.0

type SshKernelService interface {
	GetAll() ([]types.PublicKey, error)
	Add(key string, username string) error
	Delete(fingerprint string, username string) error
	GetUsers() ([]user.User, error)
}

type SshService

type SshService interface {
	GetAll() ([]types.PublicKey, error)
	Add(key string, username string) error
	Delete(fingerprint string, username string) error
	GetUsers() ([]string, error)
}

type UpdateHandler

type UpdateHandler interface {
	// Get handles the retrieval of an update, if any.
	Get(c *router.Context)
	// Install handles the installation of the update.
	Install(c *router.Context)
}

type UpdateService

type UpdateService interface {
	GetUpdate(channel types.UpdatesChannel) (*types.Update, error)
	InstallLatest(channel types.UpdatesChannel) error
}

Jump to

Keyboard shortcuts

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