github

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AccessTokenCtx    = &contextKey{"AccessToken"}
	PrivateKeyCtx     = &contextKey{"PrivateKey"}
	AppIDCtx          = &contextKey{"AppID"}
	InstallationIDCtx = &contextKey{"InstallationID"}
)

Functions

This section is empty.

Types

type Client

type Client interface {
	ListRepos(repoType string) ([]Repo, error)
	GetWorkflow(org, repo string, id int64) (*Workflow, error)
	ListWorkflows(org, repo string) ([]Workflow, error)
	ListWorkflowRuns(org, repo string, workflowID int64, created string) ([]WorkflowRun, error)
	CreateWorkflowDispatch(org, repo string, workflowID int64, ref string, inputs map[string]interface{}) error
	ValidateWorkflow(org, repo, path string) ([]string, map[string]string, error)
	ValidateWorkflowFull(org, repo, path string) (string, string, error)
	ListOrgsForUser() ([]Org, error)
}
var (
	DefaultClient Client = &Github{Context: context.Background()}
)

type Github

type Github struct {
	context.Context
}

func (*Github) CreateWorkflowDispatch

func (g *Github) CreateWorkflowDispatch(org, repo string, workflowID int64, ref string, inputs map[string]interface{}) error

func (*Github) GetWorkflow

func (g *Github) GetWorkflow(org, repo string, id int64) (*Workflow, error)

func (*Github) ListOrgsForUser

func (g *Github) ListOrgsForUser() ([]Org, error)

func (*Github) ListRepos

func (g *Github) ListRepos(repoType string) ([]Repo, error)

func (*Github) ListWorkflowRuns

func (g *Github) ListWorkflowRuns(org, repo string, workflowID int64, created string) ([]WorkflowRun, error)

func (*Github) ListWorkflows

func (g *Github) ListWorkflows(org, repo string) ([]Workflow, error)

func (*Github) New

func (g *Github) New() (*github.Client, error)

func (*Github) ValidateWorkflow

func (g *Github) ValidateWorkflow(org, repo, path string) ([]string, map[string]string, error)

func (*Github) ValidateWorkflowFull

func (g *Github) ValidateWorkflowFull(org, repo, path string) (string, string, error)

type Org

type Org struct {
	Name, Login, Url, Company, AvatarURL string
	Id                                   int64
}

func (Org) Description

func (i Org) Description() string

func (Org) FilterValue

func (i Org) FilterValue() string

func (Org) Title

func (i Org) Title() string

type Repo

type Repo struct {
	Name, Url, Detail string
}

func (Repo) Description

func (i Repo) Description() string

func (Repo) FilterValue

func (i Repo) FilterValue() string

func (Repo) Title

func (i Repo) Title() string

type Workflow

type Workflow struct {
	Name, Url, State, Path string
	Id                     int64
}

func (Workflow) Description

func (i Workflow) Description() string

func (Workflow) FilterValue

func (i Workflow) FilterValue() string

func (Workflow) Title

func (i Workflow) Title() string

type WorkflowRun

type WorkflowRun struct {
	Name, Status, Url, Conclusion string
	Id, WorkflowID                int64
	RunStartedAt, UpdatedAt       time.Time
}

func (WorkflowRun) Description

func (i WorkflowRun) Description() string

func (WorkflowRun) FilterValue

func (i WorkflowRun) FilterValue() string

func (WorkflowRun) Title

func (i WorkflowRun) Title() string

Jump to

Keyboard shortcuts

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