refactor: use ports-get plugn trigger for fetching port mappings

This removes use of ports internals from other plugins, which will make it easier to refactor the underlying property storage.
This commit is contained in:
Jose Diaz-Gonzalez committed 2023-08-05 10:58:57 -04:00
1 parent 9bd6e17903
commit 914475f3e4
10 files changed
+48 -24

No files matched your search

+15
View File
@@ -1,9 +1,24 @@
package ports
import (
"fmt"
"github.com/dokku/dokku/plugins/config"
)
// TriggerPortsGet prints out the port mapping for a given app
func TriggerPortsGet(appName string) error {
for _, portMap := range getPortMaps(appName) {
if portMap.AllowsPersistence() {
continue
}
fmt.Println(portMap)
}
return nil
}
// TriggerPostCertsRemove unsets port config vars after SSL cert is added
func TriggerPostCertsRemove(appName string) error {
keys := []string{"DOKKU_PROXY_SSL_PORT"}