hostname1

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Integration with the systemd hostnamed API. See http://www.freedesktop.org/wiki/Software/systemd/hostnamed/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

Conn is a connection to systemds dbus endpoint.

func New

func New() (*Conn, error)

New() establishes a connection to the system bus and authenticates.

func (*Conn) Close

func (c *Conn) Close() error

close the connection to the dbus socket

func (*Conn) GetHostname

func (c *Conn) GetHostname() (string, error)

find the dynamic hostname

func (*Conn) GetProperties

func (c *Conn) GetProperties() (map[string]interface{}, error)

GetProperties returns all hostname related properties

func (*Conn) GetProperty

func (c *Conn) GetProperty(propertyName string) (interface{}, error)

GetProperty returns a single hostname property

func (*Conn) GetStaticHostname

func (c *Conn) GetStaticHostname() (string, error)

find the static hostname

func (*Conn) SetChassis

func (c *Conn) SetChassis(name string, askForAuth bool) error

SetChassis asks hostnamed to set the chassis name.

func (*Conn) SetHostname

func (c *Conn) SetHostname(name string, askForAuth bool) error

SetHostname asks hostnamed to set the hostname.

func (*Conn) SetIconName

func (c *Conn) SetIconName(name string, askForAuth bool) error

SetIconName asks hostnamed to set the icon name following the XDG icon naming spec.

func (*Conn) SetPrettyHostname

func (c *Conn) SetPrettyHostname(name string, askForAuth bool) error

SetPrettyHostname asks hostnamed to set the pretty hostname.

func (*Conn) SetStaticHostname

func (c *Conn) SetStaticHostname(name string, askForAuth bool) error

SetStaticHostname asks hostnamed to set the static hostname.

Jump to

Keyboard shortcuts

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