presenter

package
v0.0.0-...-d13d548 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 1 Imported by: 3

Documentation

Overview

Package presenter defines domain types for Go Package Store presenters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	Message  string   // Commit message of this change.
	URL      string   // URL of this change.
	Comments Comments // Comments on this change.
}

Change represents a single commit message.

type Comments

type Comments struct {
	Count int    // Count of comments on this change.
	URL   string // URL of change discussion. Optional (empty string means none available).
}

Comments represents change discussion.

type Presentation

type Presentation struct {
	HomeURL  string   // Home URL of the Go package. Optional (empty string means none available).
	ImageURL string   // Image representing the Go package, typically its owner.
	Changes  []Change // List of changes, starting with the most recent.
	Error    error    // Any error that occurred during presentation, to be displayed to user.
}

Presentation provides information about a Go package repo with an available update. It contains the output of a Presenter.

type Presenter

type Presenter func(ctx context.Context, r Repo) *Presentation

Presenter returns a Presentation for r, or nil if it can't.

type Repo

type Repo struct {
	// Root is the import path corresponding to the root of the repository.
	Root string

	// RepoURL is the repository URL, including scheme, as determined dynamically from the import path.
	RepoURL string

	LocalRevision  string
	RemoteRevision string
}

Repo represents a single repository to be presented. It contains the input for a Presenter.

Directories

Path Synopsis
Package github provides a GitHub API-powered presenter.
Package github provides a GitHub API-powered presenter.
Package gitiles provides a Gitiles API-powered presenter.
Package gitiles provides a Gitiles API-powered presenter.

Jump to

Keyboard shortcuts

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