setup

package
v0.0.0-...-eabde3b Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package setup provides some simple facilities to help bootstrap things.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	// Main runs everything for this setup item.
	Main(context.Context) error
}

API is the simple interface we expect for any setup items.

type Config

type Config struct {
}

Config is a struct of all the configuration values which are shared by all of the setup utilities. By including this as a separate struct, it can be used as part of the API if we want.

type Firstboot

type Firstboot struct {
	*cliUtil.SetupFirstbootArgs // embedded config
	Config                      // embedded Config

	// Program is the name of this program, usually set at compile time.
	Program string

	// Version is the version of this program, usually set at compile time.
	Version string

	// Debug represents if we're running in debug mode or not.
	Debug bool

	// Logf is a logger which should be used.
	Logf func(format string, v ...interface{})
}

Firstboot is the standalone entry program for the firstboot setup component.

func (*Firstboot) Main

func (obj *Firstboot) Main(ctx context.Context) error

Main runs everything for this setup item.

func (*Firstboot) Run

func (obj *Firstboot) Run(ctx context.Context) error

Run performs the desired actions. This templates and installs a systemd service and enables and starts it if so desired.

func (*Firstboot) Validate

func (obj *Firstboot) Validate() error

Validate verifies that the structure has acceptable data stored within.

type Pkg

type Pkg struct {
	*cliUtil.SetupPkgArgs // embedded config
	Config                // embedded Config

	// Program is the name of this program, usually set at compile time.
	Program string

	// Version is the version of this program, usually set at compile time.
	Version string

	// Debug represents if we're running in debug mode or not.
	Debug bool

	// Logf is a logger which should be used.
	Logf func(format string, v ...interface{})
}

Pkg is the standalone entry program for the pkg setup component.

func (*Pkg) Main

func (obj *Pkg) Main(ctx context.Context) error

Main runs everything for this setup item.

func (*Pkg) Run

func (obj *Pkg) Run(ctx context.Context) error

Run performs the desired actions. This generates a list of bash commands to run since we might not be able to run this binary to install these packages! The output (stdout) of this command can be run from a shell.

func (*Pkg) Validate

func (obj *Pkg) Validate() error

Validate verifies that the structure has acceptable data stored within.

type Svc

type Svc struct {
	*cliUtil.SetupSvcArgs // embedded config
	Config                // embedded Config

	// Program is the name of this program, usually set at compile time.
	Program string

	// Version is the version of this program, usually set at compile time.
	Version string

	// Debug represents if we're running in debug mode or not.
	Debug bool

	// Logf is a logger which should be used.
	Logf func(format string, v ...interface{})
}

Svc is the standalone entry program for the svc setup component.

func (*Svc) Main

func (obj *Svc) Main(ctx context.Context) error

Main runs everything for this setup item.

func (*Svc) Run

func (obj *Svc) Run(ctx context.Context) error

Run performs the desired actions. This templates and installs a systemd service and enables and starts it if so desired.

func (*Svc) Validate

func (obj *Svc) Validate() error

Validate verifies that the structure has acceptable data stored within.

Jump to

Keyboard shortcuts

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