provider

package
v0.0.0-...-2798f75 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitlabContextType = "git.gitlab"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GitProvider

type GitProvider interface {
	// GetManifestRepoInfo information about manifest repo that include author, commits and other info
	GetManifestRepoInfo(repoUrl string, revision string) (error, *codefreshSdk.Gitops)
	// GetCommitByRevision retrieve git commit by sha
	GetCommitByRevision(repoUrl string, revision string) (error, *ResourceCommit)
}

GitProvider interface for git providers

func GetGitProvider

func GetGitProvider() GitProvider

func NewGithubProvider

func NewGithubProvider() GitProvider

func NewGitlabProvider

func NewGitlabProvider() GitProvider

type Github

type Github struct {
}

func (*Github) GetCommitByRevision

func (github *Github) GetCommitByRevision(repoUrl string, revision string) (error, *ResourceCommit)

func (*Github) GetManifestRepoInfo

func (github *Github) GetManifestRepoInfo(repoUrl string, revision string) (error, *codefreshSdk.Gitops)

type Gitlab

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

func (*Gitlab) GetCommitByRevision

func (gitlabInstance *Gitlab) GetCommitByRevision(repoUrl string, revision string) (error, *ResourceCommit)

func (*Gitlab) GetManifestRepoInfo

func (gitlabInstance *Gitlab) GetManifestRepoInfo(repoUrl string, revision string) (error, *codefreshSdk.Gitops)

type ResourceCommit

type ResourceCommit struct {
	Time    *time.Time `json:"time,omitempty"`
	Message *string    `json:"message,omitempty"`
	Avatar  *string    `json:"avatar,omitempty"`
	Sha     *string    `json:"sha,omitempty"`
	Link    *string    `json:"link,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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