Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TableCENKeys stores the mapping between CENKeys and CENReports. TableCENKeys = "CENKeys" // TableCENKeys stores the mapping between CENKeys and CENReports. TableCENReport = "CENReport" // Default Conn String DefaultConnString = "[change this to your server]" )
Variables ¶
This section is empty.
Functions ¶
func Computehash ¶
Computehash returns the hash of its inputs
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend holds a client to connect to the BigTable backend
func NewBackend ¶
NewBackend sets up a client connection to BigTable to manage incoming payloads
func (*Backend) ProcessCENReport ¶
ProcessCENReport manages the API Endpoint to POST /cenreport
Input: CENReport Output: error Behavior: write report bytes to "report" table; write row for each CENKey with reportID
func (*Backend) ProcessGetCENKeys ¶
ProcessGetCENKeys manages the GET API endpoint /cenkeys
Input: timestamp Output: array of CENKeys (in string form) for the last hour
type CENReport ¶
type CENReport struct { ReportID string `json:"reportID,omitempty"` Report []byte `json:"report,omitempty"` // this is expected to be a JSON blob but the server doesn't need to parse it CENKeys string `json:"cenKeys,omitempty"` // comma separated list of hex AES-128 Keys (COMMENT WAS: base64 AES Keys) ReportMimeType string `json:"reportMimeType,omitempty"` ReportTimeStamp uint64 `json:"reportTimeStamp,omitempty"` }
CENReport payload is sent by client to /cenreport when user reports symptoms
func GetSampleCENReportAndCENKeys ¶
GetSampleCENReportAndCENKeys generates a CENReport and an array of CENKeys (in string form)
Click to show internal directories.
Click to hide internal directories.