api

package
v0.0.0-...-e4e8516 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2016 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	system.Controller
}

Controller blah

func (*Controller) FileInfoJSON

func (controller *Controller) FileInfoJSON(c web.C, r *http.Request) (string, int)

FileInfoJSON route

func (*Controller) FilesJSON

func (controller *Controller) FilesJSON(c web.C, r *http.Request) (string, int)

FilesJSON route

func (*Controller) HelpAPI

func (controller *Controller) HelpAPI(c web.C, r *http.Request) (string, int)

HelpAPI route

func (*Controller) PostChangePasswordJSON

func (controller *Controller) PostChangePasswordJSON(c web.C, r *http.Request) (string, int)

PostChangePasswordJSON route

func (*Controller) PostProfileJSON

func (controller *Controller) PostProfileJSON(c web.C, r *http.Request) (string, int)

PostProfileJSON route

func (*Controller) PostResetPasswordJSON

func (controller *Controller) PostResetPasswordJSON(c web.C, r *http.Request) (string, int)

PostResetPasswordJSON route

func (*Controller) PrivacyAPI

func (controller *Controller) PrivacyAPI(c web.C, r *http.Request) (string, int)

PrivacyAPI route

func (*Controller) ProcessesJSON

func (controller *Controller) ProcessesJSON(c web.C, r *http.Request) (string, int)

ProcessesJSON route

func (*Controller) ProfileJSON

func (controller *Controller) ProfileJSON(c web.C, r *http.Request) (string, int)

ProfileJSON route

func (*Controller) SystemInfoJSON

func (controller *Controller) SystemInfoJSON(c web.C, r *http.Request) (string, int)

SystemInfoJSON route

func (*Controller) SystemsJSON

func (controller *Controller) SystemsJSON(c web.C, r *http.Request) (string, int)

SystemsJSON route

func (*Controller) TermsAPI

func (controller *Controller) TermsAPI(c web.C, r *http.Request) (string, int)

TermsAPI route

type FilterFiles

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

FilterFiles is a class used to return data about a customer's files, given various filters

func NewFilterFiles

func NewFilterFiles(db *gorp.DbMap, customerID int64) *FilterFiles

NewFilterFiles contructs a FilterFiles object

func (*FilterFiles) AddDateRestriction

func (ff *FilterFiles) AddDateRestriction(sqlVar string, operator string, secondsFromEpoch int64)

AddDateRestriction returns a SQL string for a date restriction

func (*FilterFiles) AddOuterRestriction

func (ff *FilterFiles) AddOuterRestriction(restriction string, varName string, varValue interface{})

AddOuterRestriction adds a WHERE clause to the view that can acces the group variables

func (*FilterFiles) AddRestriction

func (ff *FilterFiles) AddRestriction(restriction string, varName string, varValue interface{})

AddRestriction adds a WHERE clause to the view

func (*FilterFiles) GetCount

func (ff *FilterFiles) GetCount() (int64, error)

GetCount returns the count of the view

func (*FilterFiles) GetFilteredFiles

func (ff *FilterFiles) GetFilteredFiles() (files []FilteredFile, err error)

GetFilteredFiles returns the sql data in a FilteredFile array

func (*FilterFiles) GetSQL

func (ff *FilterFiles) GetSQL(whatToSelect string, ordering string) (sqlstring string)

GetSQL returns a SQL string for the given select string

func (*FilterFiles) InitOuterRestrictions

func (ff *FilterFiles) InitOuterRestrictions()

InitOuterRestrictions initialize th SQL view to use, this gets called automatically if you don't call it yourself.

func (*FilterFiles) InitRestrictedView

func (ff *FilterFiles) InitRestrictedView()

InitRestrictedView initialize th SQL view to use, this gets called automatically if you don't call it yourself.

func (*FilterFiles) SetFilterVar

func (ff *FilterFiles) SetFilterVar(name string, value interface{})

SetFilterVar sets a variable to be used in the SQL

type FilteredFile

type FilteredFile struct {
	FileID                 int64
	Sha256                 []byte
	FilePath               string
	FirstSeen              int64
	LastSeen               int64
	ProductName            string
	CompanyName            string
	NumSystems             int
	SignerSubjectShortName sql.NullString
}

FilteredFile contains the database information returned by FilterFiles

func (*FilteredFile) GetSha256

func (ff *FilteredFile) GetSha256() string

GetSha256 returns the hex encoded value

func (*FilteredFile) GetSignerSubjectShortName

func (ff *FilteredFile) GetSignerSubjectShortName() string

GetSignerSubjectShortName returns the SignerSubjectShortName with nulls taken into account

type SystemData

type SystemData struct {
	SystemUUID   []byte
	MachineGUID  string
	AgentVersion string
	Comment      string
	OSHumanName  string
	OSVersion    string
	Manufacturer string
	Model        string
	Arch         string
	MachineName  string
	FirstSeen    int64
	LastSeen     int64
}

SystemData is received directly from the database

type SystemDataJSON

type SystemDataJSON struct {
	System       string
	MachineGUID  string
	AgentVersion string
	Comment      string
	OSHumanName  string
	OSVersion    string
	Manufacturer string
	Model        string
	Arch         string
	MachineName  string
	FirstSeen    string
	LastSeen     string
}

SystemDataJSON is sent in json responses

Jump to

Keyboard shortcuts

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