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

ghfixture

package
v1.25.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MPL-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const CertificatePath = "/usr/local/share/ca-certificates/devsy-gh-fixture.crt"
View Source
const ReportVersion = 1

Variables

View Source
var ExpectedChecks = []string{}/* 273 elements not displayed */
View Source
var ExpectedRelayLossChecks = []string{
	"original CLI retrieves same token from keyring after relay stops",
	"original CLI authenticates after relay stops",
	"wrapper preserves local keyring identity after relay stops",
	"original CLI logout removes keyring credential",
	"recovery leaves no forwarded session credentials",
}
View Source
var Hosts = []string{githubHost, "enterprise.one.test", "enterprise.two.test"}

Functions

func Run

func Run(ctx context.Context, root string, args []string, out io.Writer) int

Types

type APIServer

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

func StartAPI

func StartAPI(root, certificatePath, address string, accounts Accounts) (*APIServer, error)

func (*APIServer) Address

func (s *APIServer) Address() string

func (*APIServer) Close

func (s *APIServer) Close(ctx context.Context) error

type Accounts

type Accounts map[string]Tokens

type Check

type Check struct {
	Name string `json:"check"`
	OK   bool   `json:"ok"`
}

type Failure

type Failure struct {
	Exit         int  `json:"exit"`
	TLS          bool `json:"tls"`
	Lookup       bool `json:"lookup"`
	Readiness    bool `json:"readiness"`
	Unauthorized bool `json:"unauthorized"`
	EmptyStderr  bool `json:"empty_stderr"`
}

type Observation

type Observation struct {
	Host   string `json:"host"`
	Route  string `json:"route"`
	User   string `json:"user"`
	Status int    `json:"status"`
}

type Report

type Report struct {
	Version      int      `json:"version"`
	Completed    bool     `json:"completed"`
	CLI          string   `json:"cli"`
	Architecture string   `json:"architecture"`
	Checks       []Check  `json:"checks"`
	Failure      *Failure `json:"failure,omitempty"`
}

func ValidateReport

func ValidateReport(data []byte, expected []string) (Report, error)

type Tokens

type Tokens struct {
	Forwarded string `json:"forwarded"`
	Local     string `json:"local"`
	Second    string `json:"second"`
	Invalid   string `json:"invalid"`
	Refresh   string `json:"refresh"`
}

Jump to

Keyboard shortcuts

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