package access
import "github.com/safing/portmaster/spn/access/account"
// Feature describes a notable part of the program.
type Feature struct {
Name string
ID string
RequiredFeatureID account.FeatureID
ConfigKey string
ConfigScope string
InPackage *Package
Comment string
Beta bool
ComingSoon bool
icon string
}
// Package combines a set of features.
type Package struct {
Name string
HexColor string
InfoURL string
}
var (
infoURL = "https://safing.io/pricing/"
packageFree = &Package{
Name: "Free",
HexColor: "#ffffff",
InfoURL: infoURL,
}
packagePlus = &Package{
Name: "Plus",
HexColor: "#2fcfae",
InfoURL: infoURL,
}
packagePro = &Package{
Name: "Pro",
HexColor: "#029ad0",
InfoURL: infoURL,
}
features = []Feature{
{
Name: "Secure DNS",
ID: "dns",
ConfigScope: "dns/",
InPackage: packageFree,
icon: `
`,
},
{
Name: "Privacy Filter",
ID: "filter",
ConfigScope: "filter/",
InPackage: packageFree,
icon: `
`,
},
{
Name: "Network History",
ID: string(account.FeatureHistory),
RequiredFeatureID: account.FeatureHistory,
ConfigKey: "history/enable",
ConfigScope: "history/",
InPackage: packagePlus,
icon: `
`,
},
{
Name: "Bandwidth Visibility",
ID: string(account.FeatureBWVis),
RequiredFeatureID: account.FeatureBWVis,
InPackage: packagePlus,
Beta: true,
icon: `
`,
},
{
Name: "Safing Support",
ID: string(account.FeatureSafingSupport),
RequiredFeatureID: account.FeatureSafingSupport,
InPackage: packagePlus,
icon: `
`,
},
{
Name: "Safing Privacy Network",
ID: string(account.FeatureSPN),
RequiredFeatureID: account.FeatureSPN,
ConfigKey: "spn/enable",
ConfigScope: "spn/",
InPackage: packagePro,
icon: `
`,
},
}
)