ui

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BACKGROUND_COLOR   = "#282828"
	HEADER_COLOR       = "#fe8019"
	RUN_NUMBER_COLOR   = "#83a598"
	WORKFLOW_COLOR     = "#d3869b"
	SUCCESS_COLOR      = "#b8bb26"
	FAILURE_COLOR      = "#fb4934"
	ERROR_COLOR        = "#fabd2f"
	ERROR_DETAIL_COLOR = "#665c54"
	CONTEXT_COLOR      = "#665c54"
)
View Source
const (
	RUN_NUMBER_WIDTH    = 30
	WORKFLOW_NAME_WIDTH = 30
)
View Source
const (
	ErrorFetchingVersion = "error"
	SystemNotFound       = "not found"
)
View Source
const (
	HTMLTemplText = `` /* 3138-byte string literal not displayed */

)
View Source
const (
	NUM_RUNS_TO_DISPLAY = 3
)

Variables

This section is empty.

Functions

func InitialModel

func InitialModel(ghClient *githubv4.Client, workflows []Workflow, outputFmt OutputFmt, htmlTemplate string) model

func RenderUI

func RenderUI(ghClient *githubv4.Client, workflows []Workflow, outputFmt OutputFmt, htmlTemplate string)

func RightPadTrim

func RightPadTrim(s string, length int) string

func Trim

func Trim(s string, length int) string

Types

type CommitResult

type CommitResult struct {
	Oid     string
	Message string
}

type NodeResult

type NodeResult struct {
	Id       string
	Workflow WorkflowResult `graphql:"... on Workflow"`
}

type OutputFmt

type OutputFmt uint
const (
	UnspecifiedFmt OutputFmt = iota
	HTMLFmt
)

type QueryResult

type QueryResult struct {
	NodeResult `graphql:"node(id: $workflowId)"`
}

type Workflow

type Workflow struct {
	ID   string  `yaml:"id"`
	Repo string  `yaml:"repo"`
	Name string  `yaml:"name"`
	Key  *string `yaml:"key"`
}

type WorkflowResult

type WorkflowResult struct {
	Name string
	Id   string
	Runs struct {
		Nodes []WorkflowRunNodesResult
	} `graphql:"runs(first: $numWorkflowRuns)"`
}

type WorkflowRunNodesResult

type WorkflowRunNodesResult struct {
	Id         string
	RunNumber  int
	Url        string
	CreatedAt  githubv4.DateTime
	CheckSuite struct {
		Commit     CommitResult
		Conclusion string
	}
}

type WorkflowRunsFetchedMsg

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

Jump to

Keyboard shortcuts

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