Working on portmaster restructure

This commit is contained in:
Daniel
2018-11-29 18:44:31 +01:00
parent be8a1d1739
commit 3990790f17
26 changed files with 351 additions and 263 deletions

View File

@@ -29,7 +29,7 @@ type Profile struct {
// The mininum security level to apply to connections made with this profile
SecurityLevel uint8
Flags ProfileFlags
Flags Flags
Domains Domains
Ports Ports
@@ -42,6 +42,7 @@ type Profile struct {
ApproxLastUsed int64
}
// New returns a new Profile.
func New() *Profile {
return &Profile{}
}
@@ -49,12 +50,10 @@ func New() *Profile {
// Save saves the profile to the database
func (profile *Profile) Save(namespace string) error {
if profile.ID == "" {
// FIXME: this is weird, the docs says that it also returns an error
u := uuid.NewV4()
// u, err := uuid.NewV4()
// if err != nil {
// return err
// }
u, err := uuid.NewV4()
if err != nil {
return err
}
profile.ID = u.String()
}