Help us shape the future of Go! Take the 2026 Go Developer Survey

devtunnels

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package devtunnels owns connecting a Dev Tunnels account and its HTTP surface. The broker binds device authorizations to principals, bounds pending work, and seals the connected Microsoft or GitHub tokens in protected principal files. Provider protocol and cryptography remain internal; routes and stored metadata never expose tokens.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountStatus

type AccountStatus struct {
	Connected   bool      `json:"connected"`
	Provider    string    `json:"provider,omitempty"`
	Account     string    `json:"account,omitempty"`
	ConnectedAt time.Time `json:"connectedAt,omitzero"`
}

type AuthorizationPoll

type AuthorizationPoll struct {
	Status          string `json:"status"`
	IntervalSeconds int64  `json:"intervalSeconds,omitempty"`
	AccountStatus   `tstype:",extends"`
}

type AuthorizationRequest

type AuthorizationRequest struct {
	Provider string `json:"provider"`
}

type AuthorizationStart

type AuthorizationStart struct {
	Handle           string `json:"handle"`
	UserCode         string `json:"userCode"`
	VerificationURI  string `json:"verificationUri"`
	ExpiresInSeconds int64  `json:"expiresInSeconds"`
	IntervalSeconds  int64  `json:"intervalSeconds"`
}

type Service

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

func NewService

func NewService(stateDir, principalDir string, client *http.Client) (*Service, error)

func (*Service) Close

func (s *Service) Close()

func (*Service) Credential

func (s *Service) Credential(ctx context.Context, principal security.Principal) (result devtunnel.Credential, err error)

func (*Service) Routes

func (s *Service) Routes() router.Routes

Jump to

Keyboard shortcuts

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