centralizing edge_ctrl sdk; tags, service (#112)

This commit is contained in:
Michael Quigley
2022-12-14 13:06:26 -05:00
parent 3ed31e60e0
commit 06ce17ae8f
8 changed files with 92 additions and 73 deletions

View File

@ -4,6 +4,7 @@ import (
"context"
"fmt"
"github.com/go-openapi/runtime/middleware"
"github.com/openziti-test-kitchen/zrok/controller/edge_ctrl"
"github.com/openziti-test-kitchen/zrok/controller/store"
"github.com/openziti-test-kitchen/zrok/rest_model_zrok"
"github.com/openziti-test-kitchen/zrok/rest_server_zrok/operations/service"
@ -95,7 +96,7 @@ func (h *accessHandler) Handle(params service.AccessParams, principal *rest_mode
}
func createServicePolicyDialForEnvironment(envZId, svcToken, svcZId string, edge *rest_management_api_client.ZitiEdgeManagement, tags ...*rest_model.Tags) error {
allTags := zrokServiceTags(svcToken)
allTags := edge_ctrl.ZrokServiceTags(svcToken)
for _, t := range tags {
for k, v := range t.SubTags {
allTags.SubTags[k] = v