batch

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package batch contains both interactive and non-interactive maintenence commands.

The interactive batch commands are as follows:

  • `install` does the initial install for bulletin. This will create and seed the database and create the initial user. It will also create the user's crontab entries.
  • `new-user` creates a new user.

The non-interactive batch commands are run from the user's crontab.

  • `reboot` is supposed to be run on system reboot and will delete all shutdown messages.
  • `expire` removes all expired messages and deletes broadcast messages older than 3 days.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expire

func Expire() int

Expire deletes all messages that have hit their expiration date.

func Install

func Install() int

Install is an interactive command used to install the crontab.

func NewUser

func NewUser(args []string) int

NewUser creates a new user based on command line arguments.

func Reboot

func Reboot() int

Reboot deletes all messages with `shutdown` set.

Types

type SeedMessage

type SeedMessage struct {
	Login   string
	Name    string
	Date    time.Time
	Subject string
	Message string
}

SeedMessage is the struct version of the messages.

func GetSeedMessages

func GetSeedMessages() ([]SeedMessage, error)

GetSeedMessages gets the embedded seed messages and returns them in a data structure.

Source Files

  • batch.go
  • file.go
  • messages.go

Jump to

Keyboard shortcuts

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