git

package
v0.0.0-...-530d8eb Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchSHAComment

type BranchSHAComment struct {
	BranchName string `json:"branch"`
	Sha        string `json:"sha"`
	Comment    string `json:"comment"`
}

BranchSHAComment s a struct that combines Branch with latest sha and related comment

type BranchesWithCommits

type BranchesWithCommits map[string][]Commit

BranchesWithCommits is a map with list of commits for each branch

type BranchesWithError

type BranchesWithError struct {
	Repo     string
	Branches []BranchSHAComment
	Error    error
}

type Client

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

Client is a struct that describe necessary fields for describing git with client, context and owner

func NewGitClient

func NewGitClient(v *viper.Viper) *Client

NewGitClient is a static function needed for tests

func (*Client) GetCommit

func (g *Client) GetCommit(sha, repo string) (*github.RepositoryCommit, error)

GetCommit is a function that implements the interface GitClient with a sha and repo param that return a github.RepositoryCommit and an error interface

func (*Client) GetRepos

func (g *Client) GetRepos(reposConf []string) (map[string][]BranchSHAComment, error)

GetRepos is a function that implements the interface GitClient with a RepositoriesProperties param that return a list of of BranchSHAComment and an error interface

func (*Client) ListBranchesByRepo

func (g *Client) ListBranchesByRepo(repo string) ([]*github.Branch, error)

ListBranchesByRepo is a function that implements the interface GitClient with a repo param that return a list of branches and an error interface

func (*Client) ListBranchesByRepoWithComment

func (g *Client) ListBranchesByRepoWithComment(repo string) BranchesWithError

ListBranchesByRepoWithComment is a function that implements the interface GitClient with a repo param that return a list of of BranchSHAComment and an error interface

type Commit

type Commit struct {
	Message string `json:"message,omitempty" yaml:"message,omitempty"`
	Branch  string `json:"branch" yaml:"branch"`
	Sha     string `json:"sha" yaml:"sha"`
}

Commit is a struct needed to define an object `commit` defined with message and sha

type CommitSpec

type CommitSpec map[string]Commit

CommitSpec is a type def as map of string and Commit

type RepositoriesResponse

type RepositoriesResponse map[string]BranchesWithCommits

RepositoriesResponse is a map with name of the repo and BranchesWithCommits

Jump to

Keyboard shortcuts

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