connection

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package connection implements `hadron connection ...` — management of a user's external connections (email/calendar) and the scoped grants that delegate access on them to Apps (spec-042; hadron-server #593/#599).

Today the surface is the `grant` subgroup: a ConnectionGrant lets a connection OWNER hand a specific App install scoped access (mail.read / mail.send / calendar.freebusy / calendar.read) to their own connection. Create/revoke are owner-only and enforced server-side; this group only manages and lists the grant rows.

Index

Constants

This section is empty.

Variables

View Source
var Hooks = struct {
	Open  func(string) error
	Sleep func(context.Context, time.Duration) error
	Now   func() time.Time
}{
	Open: auth.OpenInBrowser,
	Sleep: func(ctx context.Context, d time.Duration) error {
		t := time.NewTimer(d)
		defer t.Stop()
		select {
		case <-ctx.Done():
			return ctx.Err()
		case <-t.C:
			return nil
		}
	},
	Now: time.Now,
}

Hooks are the process seams `connection connect` touches: the browser launcher, the clock and the wait between polls. Production values are the real ones; tests swap them so a poll loop runs without real time or a real browser.

Functions

func NewCmdConnection

func NewCmdConnection(f *cmdutil.Factory) *cobra.Command

NewCmdConnection builds the `connection` command group.

Types

This section is empty.

Jump to

Keyboard shortcuts

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