-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.go
29 lines (25 loc) · 919 Bytes
/
app.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package catalog
import (
"fmt"
"time"
)
type App struct {
Vendor string // must be present and match a client's installation
Product string // must be present and match a client's installation
Name string // for printing; if not given, "<vendor> <product>" will be used
Active bool // if this app is "delivered" or "handled" at all
Locked bool // if updates of this app are "delivered" at all
AllowRegister bool // if clients are allowed to register
UpgradeTarget UpgradeTarget // If empty, the default upgrade target will be used
Created time.Time
Updated time.Time
Groups []string
DefaultGroups []string // empty means "public" by default
Variants []string
}
func (app *App) String() string {
if app.Name != "" {
return app.Name
}
return fmt.Sprintf("%s %s", app.Vendor, app.Product)
}