members.tpl 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {{ define "members" }}
  2. {{ range .Members }}
  3. {{ if not (hiddenMember .)}}
  4. <tr>
  5. <td>
  6. <code>{{ fieldName . }}</code><br/>
  7. <em>
  8. {{ if linkForType .Type }}
  9. <a href="{{ linkForType .Type}}">
  10. {{ typeDisplayName .Type }}
  11. </a>
  12. {{ else }}
  13. {{ typeDisplayName .Type }}
  14. {{ end }}
  15. </em>
  16. </td>
  17. <td>
  18. {{ if fieldEmbedded . }}
  19. <p>
  20. (Members of <code>{{ fieldName . }}</code> are embedded into this type.)
  21. </p>
  22. {{ end}}
  23. {{ if isOptionalMember .}}
  24. <em>(Optional)</em>
  25. {{ end }}
  26. {{ safe (renderComments .CommentLines) }}
  27. {{ if and (eq (.Type.Name.Name) "ObjectMeta") }}
  28. Refer to the Kubernetes API documentation for the fields of the
  29. <code>metadata</code> field.
  30. {{ end }}
  31. {{ if or (eq (fieldName .) "spec") }}
  32. <br/>
  33. <br/>
  34. <table>
  35. {{ template "members" .Type }}
  36. </table>
  37. {{ end }}
  38. </td>
  39. </tr>
  40. {{ end }}
  41. {{ end }}
  42. {{ end }}