web

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GHExistGitHubRepositoryFunc = gh.ExistGitHubRepository
	GHListRunnersFunc           = gh.ListRunners
	GHIsInstalledGitHubApp      = gh.IsInstalledGitHubApp
	GHGenerateGitHubAppsToken   = gh.GenerateGitHubAppsToken
	GHNewClientApps             = gh.NewClientGitHubApps
)

function pointer (for testing)

Functions

func NewMux added in v1.4.2

func NewMux(ds datastore.Datastore) *goji.Mux

NewMux create routed mux

func Serve

func Serve(ctx context.Context, ds datastore.Datastore) error

Serve start webhook receiver

Types

type TargetCreateParam added in v1.8.5

type TargetCreateParam struct {
	datastore.Target

	RunnerUser    string `json:"runner_user"`
	GHEDomain     string `json:"ghe_domain"`
	RunnerVersion string `json:"runner_version"`
	ProviderURL   string `json:"provider_url"`
}

TargetCreateParam is parameter for POST /target

func (*TargetCreateParam) ToDS added in v1.8.5

func (t *TargetCreateParam) ToDS(appToken string, tokenExpired time.Time) datastore.Target

ToDS convert to datastore.Target

type UserTarget added in v1.8.0

type UserTarget struct {
	UUID              uuid.UUID              `json:"id"`
	Scope             string                 `json:"scope"`
	TokenExpiredAt    time.Time              `json:"token_expired_at"`
	GHEDomain         string                 `json:"ghe_domain"`
	ResourceType      string                 `json:"resource_type"`
	RunnerUser        string                 `json:"runner_user"`
	RunnerVersion     string                 `json:"runner_version"`
	ProviderURL       string                 `json:"provider_url"`
	Status            datastore.TargetStatus `json:"status"`
	StatusDescription string                 `json:"status_description"`
	CreatedAt         time.Time              `json:"created_at"`
	UpdatedAt         time.Time              `json:"updated_at"`
}

UserTarget is format for user

Jump to

Keyboard shortcuts

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