model

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SyncSymbol

func SyncSymbol(state SyncState, ahead int, behind int) string

Types

type AccountIssueItem

type AccountIssueItem struct {
	Number       int
	Title        string
	RepoFull     string
	UpdatedAt    time.Time
	HTMLURL      string
	StateLabel   string
	CreatedByMe  bool
	AssignedToMe bool
}

type AccountPullRequestItem

type AccountPullRequestItem struct {
	Number     int
	Title      string
	RepoFull   string
	UpdatedAt  time.Time
	HTMLURL    string
	StateLabel string
	CIStatus   string
}

type BranchInfo

type BranchInfo struct {
	Name       string
	Upstream   string
	Ahead      int
	Behind     int
	Current    bool
	Dirty      bool
	SyncSymbol string
}

type IssueItem

type IssueItem struct {
	Number    int
	Title     string
	Labels    []string
	UpdatedAt time.Time
	HTMLURL   string
	Body      string
}

type PullRequestItem

type PullRequestItem struct {
	Number      int
	Title       string
	Author      string
	HeadBranch  string
	BaseBranch  string
	UpdatedAt   time.Time
	Draft       bool
	HTMLURL     string
	DiffContent string
}

type RepoError

type RepoError string
const (
	RepoErrNone     RepoError = ""
	RepoErrFetch    RepoError = "fetch"
	RepoErrAuth     RepoError = "auth"
	RepoErrNoRemote RepoError = "no-remote"
	RepoErrNotARepo RepoError = "not-a-repo"
	RepoErrUpstream RepoError = "no-upstream"
	RepoErrUnknown  RepoError = "unknown"
)

type RepoStatus

type RepoStatus struct {
	Name      string
	Path      string
	Branch    string
	Upstream  string
	Ahead     int
	Behind    int
	Dirty     bool
	Sync      SyncState
	PROpen    *int
	IssueOpen *int
	Error     RepoError
	UpdatedAt time.Time
}

type SyncState

type SyncState int
const (
	SyncUnknown SyncState = iota
	SyncSynced
	SyncAhead
	SyncBehind
	SyncDiverged
)

Jump to

Keyboard shortcuts

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