Files
zeekay 873220f90b rebrand: openziti → hanzozt (Hanzo Zero Trust)
Global rebrand of all OpenZiti references to Hanzo ZT:
- Go module paths: github.com/openziti/* → github.com/hanzozt/*
- Docker images: openziti/* → hanzozt/*
- Java packages: org.openziti.* → org.hanzozt.*
- Brand: OpenZiti → Hanzo ZT
- URLs: openziti.io → hanzozt.dev
2026-02-18 16:13:53 -08:00

30 lines
904 B
Go

package db
import (
"github.com/hanzozt/storage/boltz"
)
func (stores *stores) migrateTerminatorIdentityFields(step *boltz.MigrationStep) {
terminatorIds, _, err := stores.terminator.QueryIds(step.Ctx.Tx(), "true")
step.SetError(err)
fieldIdentity := "identity"
fieldIdentitySecret := "identitySecret"
for _, terminatorId := range terminatorIds {
bucket := stores.terminator.GetEntityBucket(step.Ctx.Tx(), []byte(terminatorId))
if instanceId := bucket.GetString(fieldIdentity); instanceId != nil {
bucket.SetString(FieldTerminatorInstanceId, *instanceId, nil)
}
if instanceSecret := bucket.Get([]byte(fieldIdentitySecret)); instanceSecret != nil {
bucket.PutValue([]byte(FieldTerminatorInstanceSecret), instanceSecret)
}
step.SetError(bucket.Delete([]byte(fieldIdentity)))
step.SetError(bucket.Delete([]byte(fieldIdentitySecret)))
step.SetError(bucket.GetError())
}
}