notehub

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

View Source
const DefaultAPIService = "api.notefile.net"

DefaultAPIService (golint)

View Source
const HubAppGetSchemas = "hub.app.schemas.get"

HubAppGetSchemas (golint)

View Source
const HubAppUpload = "hub.app.upload.add"

HubAppUpload (golint)

View Source
const HubAppUploadDelete = "hub.app.upload.delete"

HubAppUploadDelete (golint)

View Source
const HubAppUploadRead = "hub.app.upload.get"

HubAppUploadRead (golint)

View Source
const HubAppUploadSet = "hub.app.upload.set"

HubAppUploadSet (golint)

View Source
const HubAppUploads = "hub.app.upload.query"

HubAppUploads (golint)

View Source
const HubDeviceContact = "hub.device.contact"

HubDeviceContact (golint)

View Source
const HubEnvGet = "hub.env.get"

HubEnvGet (golint)

View Source
const HubEnvScopeApp = "app"

HubEnvScopeApp (golint)

View Source
const HubEnvScopeDevice = "device"

HubEnvScopeDevice (golint)

View Source
const HubEnvScopeFleet = "fleet"

HubEnvScopeFleet (golint)

View Source
const HubEnvScopeProject = "project"

HubEnvScopeProject (golint)

View Source
const HubEnvSet = "hub.env.set"

HubEnvSet (golint)

View Source
const HubFileTypeCardFirmware = "notecard"

HubFileTypeCardFirmware (golint)

View Source
const HubFileTypeModemFirmware = "modem"

HubFileTypeModemFirmware (golint)

View Source
const HubFileTypeNotefarm = "notefarm"

HubFileTypeNotefarm (golint)

View Source
const HubFileTypeUnknown = ""

HubFileTypeUnknown (golint)

View Source
const HubFileTypeUserFirmware = "firmware"

HubFileTypeUserFirmware (golint)

View Source
const HubQuery = "hub.app.data.query"

HubQuery (golint)

View Source
const HubRequestFileTagPublish = "publish"

HubRequestFileTagPublish indicates that this should be published in the UI

View Source
const HubUpload = "hub.upload.add"

HubUpload (golint)

View Source
const HubUploadDelete = "hub.upload.delete"

HubUploadDelete (golint)

View Source
const HubUploadRead = "hub.upload.get"

HubUploadRead (golint)

View Source
const HubUploadSet = "hub.upload.set"

HubUploadSet (golint)

View Source
const HubUploads = "hub.upload.query"

HubUploads (golint)

Variables

This section is empty.

Functions

This section is empty.

Types

type DbQuery

type DbQuery struct {
	Columns    string `json:"columns,omitempty"`
	Format     string `json:"format,omitempty"`
	Count      bool   `json:"count,omitempty"`
	Offset     int    `json:"offset,omitempty"`
	Limit      int    `json:"limit,omitempty"`
	NoHeader   bool   `json:"noheader,omitempty"`
	Where      string `json:"where,omitempty"`
	Last       string `json:"last,omitempty"`
	Order      string `json:"order,omitempty"`
	Descending bool   `json:"descending,omitempty"`
}

DbQuery is the structure for a database query

type HubRequest

type HubRequest struct {
	notecard.Request `json:",omitempty"`
	Contact          *note.EventContact `json:"contact,omitempty"`
	AppUID           string             `json:"app,omitempty"`
	FleetUID         string             `json:"fleet,omitempty"`
	EventSerials     []string           `json:"events,omitempty"`
	DbQuery          *DbQuery           `json:"query,omitempty"`
	Uploads          *[]HubRequestFile  `json:"uploads,omitempty"`
	Contains         string             `json:"contains,omitempty"`
	Handlers         *[]string          `json:"handlers,omitempty"`
	FileType         string             `json:"type,omitempty"`
	FileTags         string             `json:"tags,omitempty"`
	FileNotes        string             `json:"filenotes,omitempty"`
	Provision        bool               `json:"provision,omitempty"`
	Scope            string             `json:"scope,omitempty"`
	Env              *map[string]string `json:"env,omitempty"`
	PIN              string             `json:"pin,omitempty"`
}

HubRequest is is the core data structure for notehub-specific requests

type HubRequestFile

type HubRequestFile struct {
	Name     string                  `json:"name,omitempty"`
	Length   int                     `json:"length,omitempty"`
	MD5      string                  `json:"md5,omitempty"`
	CRC32    uint32                  `json:"crc32,omitempty"`
	Created  int64                   `json:"created,omitempty"`
	Modified int64                   `json:"modified,omitempty"`
	Source   string                  `json:"source,omitempty"`
	Contains string                  `json:"contains,omitempty"`
	Found    string                  `json:"found,omitempty"`
	FileType string                  `json:"type,omitempty"`
	Tags     string                  `json:"tags,omitempty"`  // comma-separated, no spaces, case-insensitive
	Notes    string                  `json:"notes,omitempty"` // markdown
	Firmware *HubRequestFileFirmware `json:"firmware,omitempty"`
	// Arbitrary metadata that the user may define - we don't interpret the schema at all
	Info *map[string]interface{} `json:"info,omitempty"`
}

HubRequestFile is is the body of the object uploaded for each file

type HubRequestFileFirmware

type HubRequestFileFirmware struct {
	// The organization accountable for the firmware - a display string
	Organization string `json:"org,omitempty"`
	// A description of the firmware - a display string
	Description string `json:"description,omitempty"`
	// The name and model number of the product containing the firmware - a display string
	Product string `json:"product,omitempty"`
	// The identifier of the only firmware that will be acceptable and downloaded to this device
	Firmware string `json:"firmware,omitempty"`
	// The composite version number of the firmware, generally major.minor.patch as a string
	Version string `json:"version,omitempty"`
	// The build number of the firmware, for numeric comparison
	Major uint32 `json:"ver_major,omitempty"`
	Minor uint32 `json:"ver_minor,omitempty"`
	Patch uint32 `json:"ver_patch,omitempty"`
	Build uint32 `json:"ver_build,omitempty"`
	// The build number of the firmware, generally just a date and time
	Built string `json:"built,omitempty"`
	// The entity who built or is responsible for the firmware - a display string
	Builder string `json:"builder,omitempty"`
}

HubRequestFileFirmware is firmware-specific metadata

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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