Clarify label types (#820)

This commit is contained in:
Zachary Wasserman 2017-01-09 12:02:21 -08:00 committed by GitHub
parent ede7f9773d
commit cb23dab4be
2 changed files with 5 additions and 5 deletions

View file

@ -23,7 +23,7 @@ func Up_20161118212557(tx *sql.Tx) error {
"`description` varchar(255) DEFAULT NULL," +
"`query` varchar(255) NOT NULL," +
"`platform` varchar(255) DEFAULT NULL," +
fmt.Sprintf("`label_type` INT UNSIGNED NOT NULL DEFAULT %d,", kolide.LabelTypeDefault) +
fmt.Sprintf("`label_type` INT UNSIGNED NOT NULL DEFAULT %d,", kolide.LabelTypeBuiltIn) +
"PRIMARY KEY (`id`)," +
"UNIQUE KEY `idx_label_unique_name` (`name`)," +
"FULLTEXT KEY `labels_search` (`name`)" +

View file

@ -53,10 +53,10 @@ type LabelPayload struct {
type LabelType uint
const (
// LabelTypeDefault - the label can change, this is the default
LabelTypeDefault LabelType = iota
// LabelTypeBuiltIn - this type of label is created by Kolide on start up
// and can't be removed by end user.
// LabelTypeRegular is for user created labels that can be modified.
LabelTypeRegular LabelType = iota
// LabelTypeBuiltIn is for labels built into Kolide that cannot be
// modified by users.
LabelTypeBuiltIn
)