Documentation
¶
Overview ¶
Package me implements the `gro me` command — a token-dense one-liner describing the currently authenticated Google user, modeled on `jtk me`.
Index ¶
- Variables
- func NewCommand() *cobra.Command
- func RenderExtended(w io.Writer, p *people.Profile, e Extras)
- func RenderID(w io.Writer, p *people.Profile)
- func RenderJSON(w io.Writer, p *people.Profile, e Extras, idOnly, extended bool) error
- func RenderOneLiner(w io.Writer, p *people.Profile)
- type Extras
- type PeopleClient
Constants ¶
This section is empty.
Variables ¶
var ClientFactory = func(ctx context.Context) (PeopleClient, error) { return people.NewClient(ctx) }
ClientFactory is the function used to create People clients. Override in tests to inject mocks.
Functions ¶
func RenderExtended ¶
RenderExtended writes the one-liner plus extended rows to w.
func RenderJSON ¶
RenderJSON emits one of three JSON shapes depending on (idOnly, extended). It routes through output.JSON so the §1.8 one-time-migration block is spliced in on the first post-migration `gro me --json` (`gro me` is the §445 installer smoke command, so its JSON must carry _migration).
func RenderOneLiner ¶
RenderOneLiner writes the canonical `resourceName | displayName | primaryEmail` pipe one-liner to w. Empty fields render as "-"; embedded pipes are escaped to `\|`; embedded newlines collapse to spaces. Exported so the init wizard can render the same line as part of its success message.