Documentation
¶
Index ¶
- func FetchKitBody(ctx context.Context, client FileFetcher, registryRepo string, ...) (*kit.Kit, error)
- func FindKit(ctx context.Context, client FileFetcher, registryRepo, name string) (manifest.KitEntry, error)
- type CommitResult
- type FileFetcher
- type GitHubPusher
- type KitPusher
- type ManifestKit
- type PushResult
- type TreeEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchKitBody ¶
Types ¶
type CommitResult ¶
CommitResult describes the commit created by a push.
type FileFetcher ¶
type GitHubPusher ¶
type GitHubPusher interface {
GetTree(ctx context.Context, owner, repo, ref string) ([]TreeEntry, error)
LatestCommitSHA(ctx context.Context, owner, repo, branch string) (string, error)
PushFilesAtomic(ctx context.Context, owner, repo, branch string, files map[string][]byte, message, expectedHead string) (CommitResult, error)
}
GitHubPusher is the GitHub API surface needed to push a skill.
type KitPusher ¶
type KitPusher interface {
GitHubPusher
FetchFile(ctx context.Context, owner, repo, path, ref string) ([]byte, error)
}
func NewGitHubPusher ¶
NewGitHubPusher adapts the shared GitHub client to the push interface.
type ManifestKit ¶
type ManifestKit struct {
Registry string
Name string
Path string
Description string
Author string
}
func ListKits ¶
func ListKits(ctx context.Context, client FileFetcher, registryRepo string) ([]ManifestKit, error)
type PushResult ¶
PushResult is returned after a successful skill push.
func PushKit ¶
func PushKit(ctx context.Context, client KitPusher, kitName, registryRepo string, body []byte, entry manifest.KitEntry, expectedContentHash string) (PushResult, error)
PushKit publishes one local kit YAML file and updates the registry manifest.
func PushSkill ¶
func PushSkill(ctx context.Context, client GitHubPusher, skillName, skillDir string, source state.SkillSource) (PushResult, error)
PushSkill publishes all files in skillDir back to source in one commit.
Click to show internal directories.
Click to hide internal directories.