grub2

package
v0.0.0-...-c5429dd Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: GPL-3.0 Imports: 28 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOSNum

func GetOSNum() (uint32, error)

func PrepareGfxmodeDetect

func PrepareGfxmodeDetect() error

func RunAsDaemon

func RunAsDaemon()

func SetLogger

func SetLogger(v *log.Logger)

Types

type EditAuth

type EditAuth struct {

	// dbusutil-gen: equal=nil
	EnabledUsers []string
	// contains filtered or unexported fields
}

EditAuth is a dbus object which provide properties and methods to setup deepin grub2 edit shell authorization.

func NewEditAuth

func NewEditAuth(g *Grub2) *EditAuth

NewEditAuth create EditAuth object.

func (*EditAuth) Disable

func (e *EditAuth) Disable(sender dbus.Sender, username string) *dbus.Error

func (*EditAuth) Enable

func (e *EditAuth) Enable(sender dbus.Sender, username, password string) *dbus.Error

func (*EditAuth) GetExportedMethods

func (v *EditAuth) GetExportedMethods() dbusutil.ExportedMethods

func (*EditAuth) GetInterfaceName

func (e *EditAuth) GetInterfaceName() string

type Entry

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

Entry is a struct to store each entry's data/

type EntryType

type EntryType int

EntryType is used to define entry's type in '/boot/grub/grub.cfg'.

const (
	MENUENTRY EntryType = iota
	SUBMENU
)

type Fstart

type Fstart struct {
	PropsMu sync.RWMutex
	// props:
	IsSkipGrub bool
	// contains filtered or unexported fields
}

Theme is a dbus object which provide properties and methods to setup deepin grub2 theme.

func NewFstart

func NewFstart(g *Grub2) *Fstart

NewTheme create Theme object.

func (*Fstart) GetExportedMethods

func (v *Fstart) GetExportedMethods() dbusutil.ExportedMethods

func (*Fstart) GetInterfaceName

func (*Fstart) GetInterfaceName() string

func (*Fstart) SkipGrub

func (f *Fstart) SkipGrub(sender dbus.Sender, enabled bool) *dbus.Error

type Grub2

type Grub2 struct {
	PropsMu sync.RWMutex

	// props:
	ThemeFile    string
	DefaultEntry string
	EnableTheme  bool
	Gfxmode      string
	Timeout      uint32
	Updating     bool
	// contains filtered or unexported fields
}

func NewGrub2

func NewGrub2(service *dbusutil.Service) *Grub2

func (*Grub2) GetAvailableGfxmodes

func (g *Grub2) GetAvailableGfxmodes(sender dbus.Sender) (gfxModes []string, busErr *dbus.Error)

func (*Grub2) GetExportedMethods

func (v *Grub2) GetExportedMethods() dbusutil.ExportedMethods

func (*Grub2) GetInterfaceName

func (*Grub2) GetInterfaceName() string

func (*Grub2) GetSimpleEntryTitles

func (grub *Grub2) GetSimpleEntryTitles(sender dbus.Sender) (titles []string, busErr *dbus.Error)

GetSimpleEntryTitles return entry titles only in level one and will filter out some useless entries such as sub-menus and "memtest86+".

func (*Grub2) PrepareGfxmodeDetect

func (g *Grub2) PrepareGfxmodeDetect(sender dbus.Sender) *dbus.Error

func (*Grub2) Reset

func (g *Grub2) Reset(sender dbus.Sender) *dbus.Error

Reset reset all configuration.

func (*Grub2) SetDefaultEntry

func (g *Grub2) SetDefaultEntry(sender dbus.Sender, entry string) *dbus.Error

func (*Grub2) SetEnableTheme

func (g *Grub2) SetEnableTheme(sender dbus.Sender, enabled bool) *dbus.Error

func (*Grub2) SetGfxmode

func (g *Grub2) SetGfxmode(sender dbus.Sender, gfxmode string) *dbus.Error

func (*Grub2) SetTimeout

func (g *Grub2) SetTimeout(sender dbus.Sender, timeout uint32) *dbus.Error

type Log

type Log map[string]string

type Theme

type Theme struct {
	PropsMu sync.RWMutex
	// contains filtered or unexported fields
}

Theme is a dbus object which provide properties and methods to setup deepin grub2 theme.

func NewTheme

func NewTheme(g *Grub2) *Theme

NewTheme create Theme object.

func (*Theme) GetBackground

func (theme *Theme) GetBackground(sender dbus.Sender) (background string, busErr *dbus.Error)

func (*Theme) GetExportedMethods

func (v *Theme) GetExportedMethods() dbusutil.ExportedMethods

func (*Theme) GetInterfaceName

func (*Theme) GetInterfaceName() string

func (*Theme) SetBackgroundSourceFile

func (theme *Theme) SetBackgroundSourceFile(sender dbus.Sender, filename string) *dbus.Error

Jump to

Keyboard shortcuts

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