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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDbIfNotExists

func CreateDbIfNotExists(db_file string) bool

CreateDbIfNotExists creates a sqlite database at db_file path if it doesn't exist. returns a bool of the success of creating the database file.

func CreateIdToGUIDMapping

func CreateIdToGUIDMapping(db *sql.DB, update_id int, update_guid string)

CreateIdToGUIDMapping inserts into the local database a mapping of the remote id to the local update_guid

func DBPoll

func DBPoll(db *sql.DB, HOSTNAME string, API_URL string, system_id int)

DBPoll is a separate go routine that queries the database for logs to push to the centralized API

func GetUpdateId

func GetUpdateId(db *sql.DB, update_guid string) int

GetUpdateId returns the mapping of the local update to the centalized API mapping If a mapping does not exist, return 0

func SetToSynced

func SetToSynced(db *sql.DB, system_log_id_slice []int) bool

SetToSynced updates the entry in system_logs to 1 meaning that it has been synced

Types

type UpdateIdToUpdateGuid

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

Jump to

Keyboard shortcuts

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