params

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

View Source
const DefaultRunnerPrefix = "garm"

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Address string      `json:"address"`
	Type    AddressType `json:"type"`
}

type AddressType

type AddressType string
const (
	PublicAddress  AddressType = "public"
	PrivateAddress AddressType = "private"
)

type BootstrapInstance

type BootstrapInstance struct {
	Name  string                              `json:"name"`
	Tools []*github.RunnerApplicationDownload `json:"tools"`
	// RepoURL is the URL the github runner agent needs to configure itself.
	RepoURL string `json:"repo_url"`
	// CallbackUrl is the URL where the instance can send a post, signaling
	// progress or status.
	CallbackURL string `json:"callback-url"`
	// MetadataURL is the URL where instances can fetch information needed to set themselves up.
	MetadataURL string `json:"metadata-url"`
	// InstanceToken is the token that needs to be set by the instance in the headers
	// in order to send updated back to the garm via CallbackURL.
	InstanceToken string `json:"instance-token"`
	// SSHKeys are the ssh public keys we may want to inject inside the runners, if the
	// provider supports it.
	SSHKeys []string `json:"ssh-keys"`
	// ExtraSpecs is an opaque raw json that gets sent to the provider
	// as part of the bootstrap params for instances. It can contain
	// any kind of data needed by providers. The contents of this field means
	// nothing to garm itself. We don't act on the information in this field at
	// all. We only validate that it's a proper json.
	ExtraSpecs json.RawMessage `json:"extra_specs,omitempty"`

	// GitHubRunnerGroup is the github runner group in which the newly installed runner
	// should be added to. The runner group must be created by someone with access to the
	// enterprise.
	GitHubRunnerGroup string `json:"github-runner-group"`

	// CACertBundle is a CA certificate bundle which will be sent to instances and which
	// will tipically be installed as a system wide trusted root CA. by either cloud-init
	// or whatever mechanism the provider will use to set up the runner.
	CACertBundle []byte `json:"ca-cert-bundle"`

	// OSArch is the target OS CPU architecture of the runner.
	OSArch OSArch `json:"arch"`

	// OSType is the target OS platform of the runner (windows, linux).
	OSType OSType `json:"os_type"`

	// Flavor is the platform specific abstraction that defines what resources will be allocated
	// to the runner (CPU, RAM, disk space, etc). This field is meaningful to the provider which
	// handles the actual creation.
	Flavor string `json:"flavor"`

	// Image is the platform specific identifier of the operating system template that will be used
	// to spin up a new machine.
	Image string `json:"image"`

	// Labels are a list of github runner labels that will be added to the runner.
	Labels []string `json:"labels"`

	// PoolID is the ID of the garm pool to which this runner belongs.
	PoolID string `json:"pool_id"`

	// UserDataOptions are the options for the user data generation.
	UserDataOptions UserDataOptions `json:"user_data_options"`
}

type ControllerInfo

type ControllerInfo struct {
	ControllerID uuid.UUID `json:"controller_id"`
	Hostname     string    `json:"hostname"`
}

type CreateEnterpriseParams

type CreateEnterpriseParams struct {
	Name            string `json:"name"`
	CredentialsName string `json:"credentials_name"`
	WebhookSecret   string `json:"webhook_secret"`
}

func (*CreateEnterpriseParams) Validate

func (c *CreateEnterpriseParams) Validate() error

type CreateInstanceParams

type CreateInstanceParams struct {
	Name         string
	OSType       OSType
	OSArch       OSArch
	Status       common.InstanceStatus
	RunnerStatus common.RunnerStatus
	CallbackURL  string
	MetadataURL  string
	// GithubRunnerGroup is the github runner group to which the runner belongs.
	// The runner group must be created by someone with access to the enterprise.
	GitHubRunnerGroup string
	CreateAttempt     int `json:"-"`
}

type CreateOrgParams

type CreateOrgParams struct {
	Name            string `json:"name"`
	CredentialsName string `json:"credentials_name"`
	WebhookSecret   string `json:"webhook_secret"`
}

func (*CreateOrgParams) Validate

func (c *CreateOrgParams) Validate() error

type CreatePoolParams

type CreatePoolParams struct {
	RunnerPrefix

	ProviderName           string          `json:"provider_name"`
	MaxRunners             uint            `json:"max_runners"`
	MinIdleRunners         uint            `json:"min_idle_runners"`
	Image                  string          `json:"image"`
	Flavor                 string          `json:"flavor"`
	OSType                 OSType          `json:"os_type"`
	OSArch                 OSArch          `json:"os_arch"`
	Tags                   []string        `json:"tags"`
	Enabled                bool            `json:"enabled"`
	RunnerBootstrapTimeout uint            `json:"runner_bootstrap_timeout"`
	ExtraSpecs             json.RawMessage `json:"extra_specs,omitempty"`
	// GithubRunnerGroup is the github runner group in which the runners of this
	// pool will be added to.
	// The runner group must be created by someone with access to the enterprise.
	GitHubRunnerGroup string `json:"github-runner-group"`
}

func (*CreatePoolParams) Validate

func (p *CreatePoolParams) Validate() error

type CreateRepoParams

type CreateRepoParams struct {
	Owner           string `json:"owner"`
	Name            string `json:"name"`
	CredentialsName string `json:"credentials_name"`
	WebhookSecret   string `json:"webhook_secret"`
}

func (*CreateRepoParams) Validate

func (c *CreateRepoParams) Validate() error

type Enterprise

type Enterprise struct {
	ID                string            `json:"id"`
	Name              string            `json:"name"`
	Pools             []Pool            `json:"pool,omitempty"`
	CredentialsName   string            `json:"credentials_name"`
	PoolManagerStatus PoolManagerStatus `json:"pool_manager_status,omitempty"`
	// Do not serialize sensitive info.
	WebhookSecret string `json:"-"`
}

func (Enterprise) GetID

func (e Enterprise) GetID() string

func (Enterprise) GetName

func (e Enterprise) GetName() string

type Event

type Event string
const (
	// WorkflowJobEvent is the event set in the webhook payload from github
	// when a workflow_job hook is sent.
	WorkflowJobEvent Event = "workflow_job"
)

type EventLevel

type EventLevel string
const (
	EventInfo    EventLevel = "info"
	EventWarning EventLevel = "warning"
	EventError   EventLevel = "error"
)

type EventType

type EventType string
const (
	StatusEvent     EventType = "status"
	FetchTokenEvent EventType = "fetchToken"
)

type GithubCredentials

type GithubCredentials struct {
	Name          string `json:"name,omitempty"`
	Description   string `json:"description,omitempty"`
	BaseURL       string `json:"base_url"`
	APIBaseURL    string `json:"api_base_url"`
	UploadBaseURL string `json:"upload_base_url"`
	CABundle      []byte `json:"ca_bundle,omitempty"`
}

type Instance

type Instance struct {
	// ID is the database ID of this instance.
	ID string `json:"id,omitempty"`

	// PeoviderID is the unique ID the provider associated
	// with the compute instance. We use this to identify the
	// instance in the provider.
	ProviderID string `json:"provider_id,omitempty"`

	// AgentID is the github runner agent ID.
	AgentID int64 `json:"agent_id"`

	// Name is the name associated with an instance. Depending on
	// the provider, this may or may not be useful in the context of
	// the provider, but we can use it internally to identify the
	// instance.
	Name string `json:"name,omitempty"`

	// OSType is the operating system type. For now, only Linux and
	// Windows are supported.
	OSType OSType `json:"os_type,omitempty"`

	// OSName is the name of the OS. Eg: ubuntu, centos, etc.
	OSName string `json:"os_name,omitempty"`

	// OSVersion is the version of the operating system.
	OSVersion string `json:"os_version,omitempty"`

	// OSArch is the operating system architecture.
	OSArch OSArch `json:"os_arch,omitempty"`

	// Addresses is a list of IP addresses the provider reports
	// for this instance.
	Addresses []Address `json:"addresses,omitempty"`

	// Status is the status of the instance inside the provider (eg: running, stopped, etc)
	Status common.InstanceStatus `json:"status,omitempty"`

	// RunnerStatus is the github runner status as it appears on GitHub.
	RunnerStatus common.RunnerStatus `json:"runner_status,omitempty"`

	// PoolID is the ID of the garm pool to which a runner belongs.
	PoolID string `json:"pool_id,omitempty"`

	// ProviderFault holds any error messages captured from the IaaS provider that is
	// responsible for managing the lifecycle of the runner.
	ProviderFault []byte `json:"provider_fault,omitempty"`

	// StatusMessages is a list of status messages sent back by the runner as it sets itself
	// up.
	StatusMessages []StatusMessage `json:"status_messages,omitempty"`

	// UpdatedAt is the timestamp of the last update to this runner.
	UpdatedAt time.Time `json:"updated_at"`

	// GithubRunnerGroup is the github runner group to which the runner belongs.
	// The runner group must be created by someone with access to the enterprise.
	GitHubRunnerGroup string `json:"github-runner-group"`

	// Do not serialize sensitive info.
	CallbackURL   string `json:"-"`
	MetadataURL   string `json:"-"`
	CreateAttempt int    `json:"-"`
	TokenFetched  bool   `json:"-"`
}

func (Instance) GetID

func (i Instance) GetID() string

func (Instance) GetName

func (i Instance) GetName() string

type InstanceRequest

type InstanceRequest struct {
	Name      string `json:"name"`
	OSType    OSType `json:"os_type"`
	OSVersion string `json:"os_version"`
}

type InstanceUpdateMessage

type InstanceUpdateMessage struct {
	Status  common.RunnerStatus `json:"status"`
	Message string              `json:"message"`
	AgentID *int64              `json:"agent_id"`
}

type Internal

type Internal struct {
	OAuth2Token         string `json:"oauth2"`
	ControllerID        string `json:"controller_id"`
	InstanceCallbackURL string `json:"instance_callback_url"`
	InstanceMetadataURL string `json:"instance_metadata_url"`
	JWTSecret           string `json:"jwt_secret"`
	// GithubCredentialsDetails contains all info about the credentials, except the
	// token, which is added above.
	GithubCredentialsDetails GithubCredentials `json:"gh_creds_details"`
}

type JWTResponse

type JWTResponse struct {
	Token string `json:"token"`
}

JWTResponse holds the JWT token returned as a result of a successful auth

type NewUserParams

type NewUserParams struct {
	Email    string `json:"email"`
	Username string `json:"username"`
	FullName string `json:"full_name"`
	Password string `json:"password"`
	IsAdmin  bool   `json:"-"`
	Enabled  bool   `json:"-"`
}

NewUserParams holds the needed information to create a new user

type OSArch

type OSArch string
const (
	Amd64 OSArch = "amd64"
	I386  OSArch = "i386"
	Arm64 OSArch = "arm64"
	Arm   OSArch = "arm"
)

type OSType

type OSType string
const (
	Windows OSType = "windows"
	Linux   OSType = "linux"
	Unknown OSType = "unknown"
)

type Organization

type Organization struct {
	ID                string            `json:"id"`
	Name              string            `json:"name"`
	Pools             []Pool            `json:"pool,omitempty"`
	CredentialsName   string            `json:"credentials_name"`
	PoolManagerStatus PoolManagerStatus `json:"pool_manager_status,omitempty"`
	// Do not serialize sensitive info.
	WebhookSecret string `json:"-"`
}

func (Organization) GetID

func (o Organization) GetID() string

func (Organization) GetName

func (o Organization) GetName() string

type PasswordLoginParams

type PasswordLoginParams struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

PasswordLoginParams holds information used during password authentication, that will be passed to a password login function

func (PasswordLoginParams) Validate

func (p PasswordLoginParams) Validate() error

Validate checks if the username and password are set

type Pool

type Pool struct {
	RunnerPrefix

	ID                     string     `json:"id"`
	ProviderName           string     `json:"provider_name"`
	MaxRunners             uint       `json:"max_runners"`
	MinIdleRunners         uint       `json:"min_idle_runners"`
	Image                  string     `json:"image"`
	Flavor                 string     `json:"flavor"`
	OSType                 OSType     `json:"os_type"`
	OSArch                 OSArch     `json:"os_arch"`
	Tags                   []Tag      `json:"tags"`
	Enabled                bool       `json:"enabled"`
	Instances              []Instance `json:"instances"`
	RepoID                 string     `json:"repo_id,omitempty"`
	RepoName               string     `json:"repo_name,omitempty"`
	OrgID                  string     `json:"org_id,omitempty"`
	OrgName                string     `json:"org_name,omitempty"`
	EnterpriseID           string     `json:"enterprise_id,omitempty"`
	EnterpriseName         string     `json:"enterprise_name,omitempty"`
	RunnerBootstrapTimeout uint       `json:"runner_bootstrap_timeout"`
	// ExtraSpecs is an opaque raw json that gets sent to the provider
	// as part of the bootstrap params for instances. It can contain
	// any kind of data needed by providers. The contents of this field means
	// nothing to garm itself. We don't act on the information in this field at
	// all. We only validate that it's a proper json.
	ExtraSpecs json.RawMessage `json:"extra_specs,omitempty"`
	// GithubRunnerGroup is the github runner group in which the runners will be added.
	// The runner group must be created by someone with access to the enterprise.
	GitHubRunnerGroup string `json:"github-runner-group"`
}

func (Pool) GetID

func (p Pool) GetID() string

func (*Pool) PoolType

func (p *Pool) PoolType() PoolType

func (*Pool) RunnerTimeout

func (p *Pool) RunnerTimeout() uint

type PoolManagerStatus

type PoolManagerStatus struct {
	IsRunning     bool   `json:"running"`
	FailureReason string `json:"failure_reason,omitempty"`
}

type PoolType

type PoolType string
const (
	RepositoryPool   PoolType = "repository"
	OrganizationPool PoolType = "organization"
	EnterprisePool   PoolType = "enterprise"
)

type Provider

type Provider struct {
	Name         string       `json:"name"`
	ProviderType ProviderType `json:"type"`
	Description  string       `json:"description"`
}

type ProviderType

type ProviderType string
const (
	// LXDProvider represents the LXD provider.
	LXDProvider ProviderType = "lxd"
	// ExternalProvider represents an external provider.
	ExternalProvider ProviderType = "external"
)

type Repository

type Repository struct {
	ID                string            `json:"id"`
	Owner             string            `json:"owner"`
	Name              string            `json:"name"`
	Pools             []Pool            `json:"pool,omitempty"`
	CredentialsName   string            `json:"credentials_name"`
	PoolManagerStatus PoolManagerStatus `json:"pool_manager_status,omitempty"`
	// Do not serialize sensitive info.
	WebhookSecret string `json:"-"`
}

func (Repository) GetID

func (r Repository) GetID() string

func (Repository) GetName

func (r Repository) GetName() string

type RunnerInfo

type RunnerInfo struct {
	Name   string
	Labels []string
}

type RunnerPrefix

type RunnerPrefix struct {
	Prefix string `json:"runner_prefix"`
}

func (RunnerPrefix) GetRunnerPrefix

func (p RunnerPrefix) GetRunnerPrefix() string

type StatusMessage

type StatusMessage struct {
	CreatedAt  time.Time  `json:"created_at"`
	Message    string     `json:"message"`
	EventType  EventType  `json:"event_type"`
	EventLevel EventLevel `json:"event_level"`
}

type Tag

type Tag struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type UpdateInstanceParams

type UpdateInstanceParams struct {
	ProviderID string `json:"provider_id,omitempty"`
	// OSName is the name of the OS. Eg: ubuntu, centos, etc.
	OSName string `json:"os_name,omitempty"`
	// OSVersion is the version of the operating system.
	OSVersion string `json:"os_version,omitempty"`
	// Addresses is a list of IP addresses the provider reports
	// for this instance.
	Addresses []Address `json:"addresses,omitempty"`
	// Status is the status of the instance inside the provider (eg: running, stopped, etc)
	Status        common.InstanceStatus `json:"status,omitempty"`
	RunnerStatus  common.RunnerStatus   `json:"runner_status,omitempty"`
	ProviderFault []byte                `json:"provider_fault,omitempty"`
	AgentID       int64                 `json:"-"`
	CreateAttempt int                   `json:"-"`
	TokenFetched  *bool                 `json:"-"`
}

type UpdatePoolParams

type UpdatePoolParams struct {
	RunnerPrefix

	Tags                   []string        `json:"tags,omitempty"`
	Enabled                *bool           `json:"enabled,omitempty"`
	MaxRunners             *uint           `json:"max_runners,omitempty"`
	MinIdleRunners         *uint           `json:"min_idle_runners,omitempty"`
	RunnerBootstrapTimeout *uint           `json:"runner_bootstrap_timeout,omitempty"`
	Image                  string          `json:"image"`
	Flavor                 string          `json:"flavor"`
	OSType                 OSType          `json:"os_type"`
	OSArch                 OSArch          `json:"os_arch"`
	ExtraSpecs             json.RawMessage `json:"extra_specs,omitempty"`
	// GithubRunnerGroup is the github runner group in which the runners of this
	// pool will be added to.
	// The runner group must be created by someone with access to the enterprise.
	GitHubRunnerGroup *string `json:"github-runner-group,omitempty"`
}

type UpdatePoolStateParams

type UpdatePoolStateParams struct {
	WebhookSecret string
}

type UpdateRepositoryParams

type UpdateRepositoryParams struct {
	CredentialsName string `json:"credentials_name"`
	WebhookSecret   string `json:"webhook_secret"`
}

type UpdateUserParams

type UpdateUserParams struct {
	FullName string `json:"full_name"`
	Password string `json:"password"`
	Enabled  *bool  `json:"enabled"`
}

type User

type User struct {
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	Email     string    `json:"email"`
	Username  string    `json:"username"`
	FullName  string    `json:"full_name"`
	Password  string    `json:"-"`
	Enabled   bool      `json:"enabled"`
	IsAdmin   bool      `json:"is_admin"`
}

Users holds information about a particular user

type UserDataOptions

type UserDataOptions struct {
	DisableUpdatesOnBoot bool     `json:"disable_updates_on_boot"`
	ExtraPackages        []string `json:"extra_packages"`
}

type WorkflowJob

type WorkflowJob struct {
	Action      string `json:"action"`
	WorkflowJob struct {
		ID          int64     `json:"id"`
		RunID       int64     `json:"run_id"`
		RunURL      string    `json:"run_url"`
		RunAttempt  int64     `json:"run_attempt"`
		NodeID      string    `json:"node_id"`
		HeadSha     string    `json:"head_sha"`
		URL         string    `json:"url"`
		HTMLURL     string    `json:"html_url"`
		Status      string    `json:"status"`
		Conclusion  string    `json:"conclusion"`
		StartedAt   time.Time `json:"started_at"`
		CompletedAt time.Time `json:"completed_at"`
		Name        string    `json:"name"`
		Steps       []struct {
			Name        string    `json:"name"`
			Status      string    `json:"status"`
			Conclusion  string    `json:"conclusion"`
			Number      int64     `json:"number"`
			StartedAt   time.Time `json:"started_at"`
			CompletedAt time.Time `json:"completed_at"`
		} `json:"steps"`
		CheckRunURL     string   `json:"check_run_url"`
		Labels          []string `json:"labels"`
		RunnerID        int64    `json:"runner_id"`
		RunnerName      string   `json:"runner_name"`
		RunnerGroupID   int64    `json:"runner_group_id"`
		RunnerGroupName string   `json:"runner_group_name"`
	} `json:"workflow_job"`
	Repository struct {
		ID       int64  `json:"id"`
		NodeID   string `json:"node_id"`
		Name     string `json:"name"`
		FullName string `json:"full_name"`
		Private  bool   `json:"private"`
		Owner    struct {
			Login             string `json:"login"`
			ID                int64  `json:"id"`
			NodeID            string `json:"node_id"`
			AvatarURL         string `json:"avatar_url"`
			GravatarID        string `json:"gravatar_id"`
			URL               string `json:"url"`
			HTMLURL           string `json:"html_url"`
			FollowersURL      string `json:"followers_url"`
			FollowingURL      string `json:"following_url"`
			GistsURL          string `json:"gists_url"`
			StarredURL        string `json:"starred_url"`
			SubscriptionsURL  string `json:"subscriptions_url"`
			OrganizationsURL  string `json:"organizations_url"`
			ReposURL          string `json:"repos_url"`
			EventsURL         string `json:"events_url"`
			ReceivedEventsURL string `json:"received_events_url"`
			Type              string `json:"type"`
			SiteAdmin         bool   `json:"site_admin"`
		} `json:"owner"`
		HTMLURL          string    `json:"html_url"`
		Description      string    `json:"description"`
		Fork             bool      `json:"fork"`
		URL              string    `json:"url"`
		ForksURL         string    `json:"forks_url"`
		KeysURL          string    `json:"keys_url"`
		CollaboratorsURL string    `json:"collaborators_url"`
		TeamsURL         string    `json:"teams_url"`
		HooksURL         string    `json:"hooks_url"`
		IssueEventsURL   string    `json:"issue_events_url"`
		EventsURL        string    `json:"events_url"`
		AssigneesURL     string    `json:"assignees_url"`
		BranchesURL      string    `json:"branches_url"`
		TagsURL          string    `json:"tags_url"`
		BlobsURL         string    `json:"blobs_url"`
		GitTagsURL       string    `json:"git_tags_url"`
		GitRefsURL       string    `json:"git_refs_url"`
		TreesURL         string    `json:"trees_url"`
		StatusesURL      string    `json:"statuses_url"`
		LanguagesURL     string    `json:"languages_url"`
		StargazersURL    string    `json:"stargazers_url"`
		ContributorsURL  string    `json:"contributors_url"`
		SubscribersURL   string    `json:"subscribers_url"`
		SubscriptionURL  string    `json:"subscription_url"`
		CommitsURL       string    `json:"commits_url"`
		GitCommitsURL    string    `json:"git_commits_url"`
		CommentsURL      string    `json:"comments_url"`
		IssueCommentURL  string    `json:"issue_comment_url"`
		ContentsURL      string    `json:"contents_url"`
		CompareURL       string    `json:"compare_url"`
		MergesURL        string    `json:"merges_url"`
		ArchiveURL       string    `json:"archive_url"`
		DownloadsURL     string    `json:"downloads_url"`
		IssuesURL        string    `json:"issues_url"`
		PullsURL         string    `json:"pulls_url"`
		MilestonesURL    string    `json:"milestones_url"`
		NotificationsURL string    `json:"notifications_url"`
		LabelsURL        string    `json:"labels_url"`
		ReleasesURL      string    `json:"releases_url"`
		DeploymentsURL   string    `json:"deployments_url"`
		CreatedAt        time.Time `json:"created_at"`
		UpdatedAt        time.Time `json:"updated_at"`
		PushedAt         time.Time `json:"pushed_at"`
		GitURL           string    `json:"git_url"`
		SSHURL           string    `json:"ssh_url"`
		CloneURL         string    `json:"clone_url"`
		SvnURL           string    `json:"svn_url"`
		Homepage         *string   `json:"homepage"`
		Size             int64     `json:"size"`
		StargazersCount  int64     `json:"stargazers_count"`
		WatchersCount    int64     `json:"watchers_count"`
		Language         *string   `json:"language"`
		HasIssues        bool      `json:"has_issues"`
		HasProjects      bool      `json:"has_projects"`
		HasDownloads     bool      `json:"has_downloads"`
		HasWiki          bool      `json:"has_wiki"`
		HasPages         bool      `json:"has_pages"`
		ForksCount       int64     `json:"forks_count"`
		MirrorURL        *string   `json:"mirror_url"`
		Archived         bool      `json:"archived"`
		Disabled         bool      `json:"disabled"`
		OpenIssuesCount  int64     `json:"open_issues_count"`
		License          struct {
			Key    string `json:"key"`
			Name   string `json:"name"`
			SpdxID string `json:"spdx_id"`
			URL    string `json:"url"`
			NodeID string `json:"node_id"`
		} `json:"license"`
		AllowForking bool `json:"allow_forking"`
		IsTemplate   bool `json:"is_template"`
		// Topics        []interface{} `json:"topics"`
		Visibility    string `json:"visibility"`
		Forks         int64  `json:"forks"`
		OpenIssues    int64  `json:"open_issues"`
		Watchers      int64  `json:"watchers"`
		DefaultBranch string `json:"default_branch"`
	} `json:"repository"`
	Organization struct {
		Login            string `json:"login"`
		ID               int64  `json:"id"`
		NodeID           string `json:"node_id"`
		URL              string `json:"url"`
		ReposURL         string `json:"repos_url"`
		EventsURL        string `json:"events_url"`
		HooksURL         string `json:"hooks_url"`
		IssuesURL        string `json:"issues_url"`
		MembersURL       string `json:"members_url"`
		PublicMembersURL string `json:"public_members_url"`
		AvatarURL        string `json:"avatar_url"`
		Description      string `json:"description"`
	} `json:"organization"`
	Enterprise struct {
		ID        int64  `json:"id"`
		Slug      string `json:"slug"`
		Name      string `json:"name"`
		NodeID    string `json:"node_id"`
		AvatarURL string `json:"avatar_url"`
		// Description interface{} `json:"description"`
		// WebsiteURL  interface{} `json:"website_url"`
		HTMLURL   string    `json:"html_url"`
		CreatedAt time.Time `json:"created_at"`
		UpdatedAt time.Time `json:"updated_at"`
	} `json:"enterprise"`
	Sender struct {
		Login             string `json:"login"`
		ID                int64  `json:"id"`
		NodeID            string `json:"node_id"`
		AvatarURL         string `json:"avatar_url"`
		GravatarID        string `json:"gravatar_id"`
		URL               string `json:"url"`
		HTMLURL           string `json:"html_url"`
		FollowersURL      string `json:"followers_url"`
		FollowingURL      string `json:"following_url"`
		GistsURL          string `json:"gists_url"`
		StarredURL        string `json:"starred_url"`
		SubscriptionsURL  string `json:"subscriptions_url"`
		OrganizationsURL  string `json:"organizations_url"`
		ReposURL          string `json:"repos_url"`
		EventsURL         string `json:"events_url"`
		ReceivedEventsURL string `json:"received_events_url"`
		Type              string `json:"type"`
		SiteAdmin         bool   `json:"site_admin"`
	} `json:"sender"`
}

WorkflowJob holds the payload sent by github when a workload_job is sent.

Jump to

Keyboard shortcuts

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