github

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceTypeRepository = "repository"
	ResourceTypeWorkflow   = "workflow"
	ResourceTypeWebHook    = "webhook"
)

Variables

This section is empty.

Functions

func NewGitHubResourceManager

func NewGitHubResourceManager(ctx context.Context, URL string, authenticate integrations.AuthenticateFn) (integrations.ResourceManager, error)

Types

type GitHubEvent

type GitHubEvent struct {
	EventType        string
	PayloadSignature string
}

func (*GitHubEvent) Signature

func (e *GitHubEvent) Signature() string

func (*GitHubEvent) Type

func (e *GitHubEvent) Type() string

type GitHubEventHandler

type GitHubEventHandler struct{}

func (*GitHubEventHandler) EventTypes

func (i *GitHubEventHandler) EventTypes() []string

func (*GitHubEventHandler) Handle

func (i *GitHubEventHandler) Handle(data []byte, header http.Header) (integrations.Event, error)

func (*GitHubEventHandler) Status

func (i *GitHubEventHandler) Status(eventType string, eventPayload []byte) (integrations.StatefulResource, error)

type GitHubOIDCVerifier

type GitHubOIDCVerifier struct{}

func (*GitHubOIDCVerifier) Verify

type GitHubResourceManager

type GitHubResourceManager struct {
	URL   string
	Owner string
	// contains filtered or unexported fields
}

func (*GitHubResourceManager) Cancel

func (i *GitHubResourceManager) Cancel(resourceType, id string, parentResource integrations.Resource) error

func (*GitHubResourceManager) CleanupWebhook

func (i *GitHubResourceManager) CleanupWebhook(options integrations.WebhookOptions) error

func (*GitHubResourceManager) Get

func (i *GitHubResourceManager) Get(resourceType, id string) (integrations.Resource, error)

func (*GitHubResourceManager) List

func (i *GitHubResourceManager) List(resourceType string) ([]integrations.Resource, error)

func (*GitHubResourceManager) SetupWebhook

func (i *GitHubResourceManager) SetupWebhook(options integrations.WebhookOptions) (any, error)

func (*GitHubResourceManager) Status

func (i *GitHubResourceManager) Status(resourceType, id string, parentResource integrations.Resource) (integrations.StatefulResource, error)

type Repository

type Repository struct {
	ID             int64
	RepositoryName string
	RepositoryURL  string
}

func (*Repository) Id

func (r *Repository) Id() string

func (*Repository) Name

func (r *Repository) Name() string

func (*Repository) Type

func (r *Repository) Type() string

func (*Repository) URL

func (r *Repository) URL() string

type Webhook

type Webhook struct {
	ID          int64  `json:"id"`
	WebhookName string `json:"name"`
	WebhookURL  string `json:"-"`
}

func (*Webhook) Id

func (h *Webhook) Id() string

func (*Webhook) Name

func (h *Webhook) Name() string

func (*Webhook) Type

func (h *Webhook) Type() string

func (*Webhook) URL

func (h *Webhook) URL() string

type WebhookConfiguration

type WebhookConfiguration struct {
	EventType string `json:"eventType"`
}

type WorkflowRun

type WorkflowRun struct {
	ID         int64
	Status     string
	Conclusion string
	HTMLURL    string
}

func (*WorkflowRun) Finished

func (w *WorkflowRun) Finished() bool

func (*WorkflowRun) Id

func (w *WorkflowRun) Id() string

func (*WorkflowRun) Successful

func (w *WorkflowRun) Successful() bool

func (*WorkflowRun) Type

func (w *WorkflowRun) Type() string

func (*WorkflowRun) URL

func (w *WorkflowRun) URL() string

Jump to

Keyboard shortcuts

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