Documentation ¶
Index ¶
- func APICronfilePoll(HOSTNAME string, API_URL string, CRONFILE string)
- func APIGetSystemId(url string, hostname string) (int, error)
- func APILogCapture(url string, system_id int, system_update_id int, ...) bool
- func CreateSytemUpdate(url string, system_id int) (int, error)
- func FinishSystemUpdate(url string, system_id int) (bool, error)
- func ValidateCronExpr(expr string) bool
- func WriteCronFile(cronfile_path string, cronfile_contents string) (err error)
- type CreateSystemUpdateResp
- type GetSystemIdResp
- type SystemIdResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APICronfilePoll ¶
func APILogCapture ¶
func APILogCapture(url string, system_id int, system_update_id int, log_object *logobject.LogObject) bool
LogCapture sends the log update to the centralized API
func CreateSytemUpdate ¶
CreateSystemUpdate starts the update process with the api Example json output from REST API: ****************
{ "id": 557, "limit": 1, "offset": 0, "total_count": 1 }
****************
func ValidateCronExpr ¶
CreateClient creates a napping takes the REST API endpoint and the system hostname returns a bool of the success of creating the database file. Example json output from REST API: ************************************************
{ "limit": 1, "offset": 0, "system": { "created_at": "Tue, 16 Sep 2014 11:49:01 GMT", "hostname": "localhost.localdomain", "id": 14 }, "total_count": 1 }
*************************************************
func WriteCronFile ¶
Types ¶
type CreateSystemUpdateResp ¶
type GetSystemIdResp ¶
type GetSystemIdResp struct { TotalCount int `json: "total_count"` Limit int `json: "limit"` Offset int `json: "offset"` System SystemIdResp `json: "system"` }
Click to show internal directories.
Click to hide internal directories.