api

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: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api interface {
	GetCommitBySha(sha string) (error, *github.RepositoryCommit)
	GetUserByUsername(username string) (error, *github.User)
	GetCommitsBySha(sha string) (error, []*github.RepositoryCommit)
	GetComittersByCommits(commits []*github.RepositoryCommit) (error, []codefreshSdk.GitopsUser)
	GetIssuesAndPrsByCommits(commits []*github.RepositoryCommit) (error, []codefreshSdk.Annotation, []codefreshSdk.Annotation)
}

func GetInstance

func GetInstance(repoUrl string) (error, Api)

type CachedGithub

type CachedGithub struct {
	GitClient Api
	// contains filtered or unexported fields
}

func New

func New(gitClient Api) *CachedGithub

func (*CachedGithub) GetCommitBySha

func (cachedGithub *CachedGithub) GetCommitBySha(revision string) (error, *github.RepositoryCommit)

func (*CachedGithub) GetCommitsBySha

func (cachedGithub *CachedGithub) GetCommitsBySha(revision string) (error, []*github.RepositoryCommit)

func (*CachedGithub) GetUserByUsername

func (cachedGithub *CachedGithub) GetUserByUsername(username string) (error, *github.User)

type GitlabApi

type GitlabApi interface {
	ListProjects(page int) (error, []*gitlab.Project)
	RetrieveAvatar(email string) (error, string)
	GetCommit(projectId int, revision string) (error, *gitlab.Commit)
	GetCommitsBySha(projectId int, revision string) (error, []*gitlab.Commit)
	GetComittersByCommits(commits []*gitlab.Commit) (error, []codefreshSdk.GitopsUser)
	GetPrsByCommits(projectId int, commits []*gitlab.Commit) (error, []codefreshSdk.Annotation)
}

func NewGitlabApi

func NewGitlabApi() GitlabApi

Jump to

Keyboard shortcuts

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