libchorizo

package
v0.0.0-...-ee5d75e Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2015 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	Id                    int
	Update_guid           string
	Last_script_completed string
	Finished              int
}

func GetMostRecentState

func GetMostRecentState(db *sql.DB) (State, error)

GetStateByGUID returns a State struct as found by it's guid

func GetStateByGUID

func GetStateByGUID(db *sql.DB, guid string) (State, error)

GetStateByGUID returns a State struct as found by it's guid

func (*State) Create

func (state *State) Create(db *sql.DB) (bool, error)

Create inserts into the database a new state entry takes the guid as an argument and sets completed = 0 (false)

func (*State) Finish

func (state *State) Finish(db *sql.DB) (bool, error)

Finish sets the finished column to 1 marking the update process as completed

func (*State) SetLastScriptCompleted

func (state *State) SetLastScriptCompleted(db *sql.DB, last_script string) (bool, error)

SetLastScriptCompleted updates the state entry to the last successfully completed script that ran this is used to track state after a reboot so the update process can continue

Jump to

Keyboard shortcuts

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