git

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlanBranch  = "plan"
	ApplyBranch = "apply"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewGitClient

func NewGitClient(ctx context.Context, name string, config model.Git) (*Client, error)

func (*Client) UpdateFiles

func (g *Client) UpdateFiles(branch, folder string, files map[string][]byte) error

type FileCache

type FileCache struct {
	// contains filtered or unexported fields
}

func NewFileCache

func NewFileCache(ctx context.Context) *FileCache

func (*FileCache) GetFile

func (fc *FileCache) GetFile(url string) ([]byte, error)

func (*FileCache) GetFileFromUrl added in v1.2.2

func (fc *FileCache) GetFileFromUrl(fileUrl string) ([]byte, error)

func (*FileCache) GetFileWithRetry added in v1.2.2

func (fc *FileCache) GetFileWithRetry(fileUrl string) (*http.Response, error)

type Github

type Github interface {
	GetLatestReleaseTag(repoURL string) (*Release, error)
	GetReleaseByTag(repoURL string, tag string) (*Release, error)
	GetReleases(repoURL string, oldestRelease Release, newestRelease *Release) ([]*version.Version, error)
	GetRawFileContent(repoURL string, path string, release string) ([]byte, error)
}

func NewGithub

func NewGithub(ctx context.Context, token string) Github

type Release

type Release struct {
	Tag         string
	PublishedAt time.Time
}

Jump to

Keyboard shortcuts

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