From 6718920108d9782e607adea72ccb42ecc6dcb4d0 Mon Sep 17 00:00:00 2001 From: Matty Evans Date: Fri, 20 Dec 2024 15:46:28 +1000 Subject: [PATCH] feat: Add display name methods for network and run method --- pkg/config/v1/config.go | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pkg/config/v1/config.go diff --git a/pkg/config/v1/config.go b/pkg/config/v1/config.go new file mode 100644 index 0000000..7f62ad6 --- /dev/null +++ b/pkg/config/v1/config.go @@ -0,0 +1,29 @@ +package config + +// DisplayName returns the display name of the network. +func (n NetworkName) DisplayName() string { + switch n { + case NetworkName_NETWORK_NAME_MAINNET: + return "Mainnet" + case NetworkName_NETWORK_NAME_SEPOLIA: + return "Sepolia" + case NetworkName_NETWORK_NAME_HOLESKY: + return "Holesky" + default: + return "Unknown" + } +} + +// DisplayName returns the display name of the run method. +func (r RunMethod) DisplayName() string { + switch r { + case RunMethod_RUN_METHOD_DOCKER: + return "Docker" + case RunMethod_RUN_METHOD_SYSTEMD: + return "Systemd" + case RunMethod_RUN_METHOD_BINARY: + return "Binary" + default: + return "Unknown" + } +}