people

package
v1.0.46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package people provides a client for the Google People API focused on the authenticated user's own profile (people/me). It is separate from internal/contacts so the cmd/me command and the cmd/contacts command can evolve independently.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInsufficientScopeError

func IsInsufficientScopeError(err error) bool

IsInsufficientScopeError reports whether err is a 403 caused by missing OAuth scopes (as opposed to a 403 caused by API-not-enabled, project-not-permitted, etc.). Distinguishing these matters because only scope errors should suggest `gro init` re-auth.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client wraps the Google People API service for the authenticated user.

func NewClient

func NewClient(ctx context.Context) (*Client, error)

NewClient creates a new People client with OAuth2 authentication.

func (*Client) GetMe

func (c *Client) GetMe(ctx context.Context) (*Profile, error)

GetMe returns the authenticated user's profile via people/me.

type Profile

type Profile struct {
	ResourceName string
	DisplayName  string
	PrimaryEmail string
}

Profile is the subset of People API data we surface for `gro me`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL