github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/table/domain/table.go (about) 1 package domainTable 2 3 import ( 4 "strings" 5 6 structureSpec "github.com/taubyte/go-specs/structure" 7 ) 8 9 func getTableData(domain *structureSpec.Domain, showId bool) (toRender [][]string) { 10 if showId { 11 toRender = [][]string{ 12 {"ID", domain.Id}, 13 } 14 } 15 16 toRender = append(toRender, [][]string{ 17 {"Name", domain.Name}, 18 {"Description", domain.Description}, 19 {"Tags", strings.Join(domain.Tags, ", ")}, 20 {"FQDN", domain.Fqdn}, 21 {"Cert-Type", domain.CertType}, 22 }...) 23 24 if domain.CertType != "auto" { 25 toRender = append(toRender, [][]string{ 26 {"Cert-File", domain.CertFile}, 27 {"Key-File", domain.KeyFile}, 28 }...) 29 } 30 31 return toRender 32 }