Files
ziti/controller/persistence/migration_v23.go
T
2021-04-28 11:08:28 -04:00

45 lines
870 B
Go

package persistence
import (
"github.com/openziti/foundation/storage/boltz"
"time"
)
func (m *Migrations) addProcessMultiPostureCheck(step *boltz.MigrationStep) {
windows := OperatingSystem{
OsType: "Windows",
OsVersions: []string{},
}
linux := OperatingSystem{
OsType: "Linux",
OsVersions: []string{},
}
macOS := OperatingSystem{
OsType: "macOS",
OsVersions: []string{},
}
processCheckType := &PostureCheckType{
BaseExtEntity: boltz.BaseExtEntity{
Id: "PROCESS_MULTI",
CreatedAt: time.Now(),
UpdatedAt: time.Now(),
Tags: map[string]interface{}{},
Migrate: false,
},
Name: "Process Multi Check",
OperatingSystems: []OperatingSystem{
windows,
macOS,
linux,
},
}
if err := m.stores.PostureCheckType.Create(step.Ctx, processCheckType); err != nil {
step.SetError(err)
return
}
}