github

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListEntities

func ListEntities(ctx context.ServiceContext, options *ListOptions) (interface{}, error)

func Sync

func Sync(ctx context.ServiceContext, options *SyncOptions) error

-- Flow -- 1. Get repository's action secrets public key. 2. Encrypt the secret data. 3. Post the secrets to Github actions endpoint.

Types

type InstallationAccessTokenResponse

type InstallationAccessTokenResponse struct {
	Token                string `json:"token"`
	ExpiresAt            string `json:"expires_at"`
	RespositorySelection string `json:"repository_selection"`
	Permissions          struct {
		ActionsVariables  string `json:"actions_variables"`
		CodespacesSecrets string `json:"codespaces_secrets"`
		Deployments       string `json:"deployments"`
		Metadata          string `json:"metadata"`
		Secrets           string `json:"secrets"`
	} `json:"permissions"`
}

func GetInstallationAccessToken

func GetInstallationAccessToken(ctx context.ServiceContext, installationID string) (*InstallationAccessTokenResponse, error)

type ListOptions added in v1.1.5

type ListOptions struct {
	InstallationID string
}

type ListRepositoriesResponse

type ListRepositoriesResponse struct {
	TotalCount           int          `json:"total_count"`
	RespositorySelection string       `json:"repository_selection"`
	Repositories         []Repository `json:"repositories"`
}

type Repository

type Repository struct {
	ID       int    `json:"id"`
	Name     string `json:"name"`
	FullName string `json:"full_name"`
	HTMLURL  string `json:"html_url"`
	Owner    struct {
		Login string `json:"login"`
	} `json:"owner"`
}

type RepositoryActionsSecretsPublicKeyResponse

type RepositoryActionsSecretsPublicKeyResponse struct {
	Key   string `json:"key"`
	KeyID string `json:"key_id"`
}

type SetupOptions

type SetupOptions struct {
	InstallationID string
	SetupAction    string
	State          string
	OrgID          string
}

type SyncOptions

type SyncOptions struct {
	InstallationID string                 `json:"installation_id"`
	EntityDetails  map[string]interface{} `json:"entity_details"`
	Data           *keypayload.KPMap      `json:"data"`
}

Jump to

Keyboard shortcuts

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