getbibucket

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const PrefixMsg = "Get Projects..."

Variables

This section is empty.

Functions

func CloudProjects

func CloudProjects(url string, accessToken string, isProjectResponse bool) (interface{}, error)

func CloudRepos

func CloudRepos(url string, accessToken string, isProjectResponse bool) (interface{}, error)

Types

type AnalysisResult

type AnalysisResult struct {
	NumProjects     int
	NumRepositories int
	ProjectBranches []ProjectBranch
}

type Branch

type Branch struct {
	Name             string   `json:"name"`
	DefaultMergeType string   `json:"default_merge_strategy"`
	MergeStrategies  []string `json:"merge_strategies"`
	Links            struct {
		Self    Link `json:"self"`
		Commits Link `json:"commits"`
		HTML    Link `json:"html"`
	} `json:"links"`
}

func CloudAllBranches

func CloudAllBranches(url string, accessToken string) ([]Branch, error)

type BranchResponse

type BranchResponse struct {
	Values  []Branch `json:"values"`
	Pagelen int      `json:"pagelen"`
	Size    int      `json:"size"`
	Page    int      `json:"page"`
	Next    string   `json:"next"`
}

func CloudBranches

func CloudBranches(url string, accessToken string) (*BranchResponse, error)

type Commit

type Commit struct {
	Hash  string `json:"hash"`
	Links struct {
		Self struct {
			Href string `json:"href"`
		} `json:"self"`
	} `json:"links"`
	Type string `json:"type"`
}

type ExclusionList

type ExclusionList struct {
	Projectcs map[string]bool `json:"Projects"`
	Repos     map[string]bool `json:"repos"`
}

type FileInfo

type FileInfo struct {
	Path     string `json:"path"`
	Commit   Commit `json:"commit"`
	Type     string `json:"type"`
	Size     int    `json:"size,omitempty"`
	MimeType string `json:"mimetype,omitempty"`
	Links    struct {
		Self struct {
			Href string `json:"href"`
		} `json:"self"`
	} `json:"links"`
}
type Link struct {
	Href string `json:"href"`
}

type ParamsReposCloud

type ParamsReposCloud struct {
	Projects         string
	Repos            []Reposc
	URL              string
	BaseAPI          string
	APIVersion       string
	AccessToken      string
	BitbucketURLBase string
	Workspace        string
	ExclusionList    *ExclusionList
	Branch           string
}

type ParamsReposProjectCloud

type ParamsReposProjectCloud struct {
	Projects         []Projectc
	URL              string
	BaseAPI          string
	APIVersion       string
	AccessToken      string
	BitbucketURLBase string
	Workspace        string
	NBRepos          int
	ExclusionList    *ExclusionList
	Spin             *spinner.Spinner
	Branch           string
}

type Path

type Path struct {
	Components []string `json:"components"`
	Name       string   `json:"name"`
	ToString   string   `json:"toString"`
}

type ProjectBranch

type ProjectBranch struct {
	ProjectKey  string
	RepoSlug    string
	MainBranch  string
	LargestSize int
}

func GetProjectBitbucketListCloud

func GetProjectBitbucketListCloud(url, baseapi, apiver, accessToken, workspace, exlusionfile, project, repo, branchmain string) ([]ProjectBranch, error)

func GetRepos

func GetRepos(parms ParamsReposCloud) ([]ProjectBranch, int, int)

func GetReposProjectCloud

func GetReposProjectCloud(parms ParamsReposProjectCloud) ([]ProjectBranch, int, int)

type ProjectRepo

type ProjectRepo struct {
	Type string `json:"type"`
	Key  string `json:"key"`
	UUID string `json:"uuid"`
	Name string `json:"name"`
}

type Projectc

type Projectc struct {
	Key         string `json:"key"`
	UUID        string `json:"uuid"`
	IsPrivate   bool   `json:"is_private"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Links       struct {
		Self struct {
			Href string `json:"href"`
		} `json:"self"`
	} `json:"links"`
}

func CloudAllProjects

func CloudAllProjects(url string, accessToken string, exclusionList *ExclusionList) ([]Projectc, error)

func CloudOnelProjects

func CloudOnelProjects(url string, accessToken string, exclusionList *ExclusionList) ([]Projectc, error)

type ProjectcsResponse

type ProjectcsResponse struct {
	Values  []Projectc `json:"values"`
	PageLen int        `json:"pagelen"`
	Size    int        `json:"size"`
	Page    int        `json:"page"`
	Next    string     `json:"next"`
}

type ReposResponse

type ReposResponse struct {
	Values  []Reposc `json:"values"`
	Pagelen int      `json:"pagelen"`
	Size    int      `json:"size"`
	Page    int      `json:"page"`
	Next    string   `json:"next"`
}

type Reposc

type Reposc struct {
	Name        string      `json:"name"`
	Slug        string      `json:"slug"`
	Description string      `json:"description"`
	Size        int         `json:"size"`
	Language    string      `json:"language"`
	Project     ProjectRepo `json:"project"`
}

func CloudAllRepos

func CloudAllRepos(url string, accessToken string, exclusionList *ExclusionList) ([]Reposc, error)

type Response1

type Response1 struct {
	Values  []FileInfo `json:"values"`
	Pagelen int        `json:"pagelen"`
	Page    int        `json:"page"`
	Next    string     `json:"next"`
}

type SizeResponse

type SizeResponse struct {
	Size int `json:"size"`
}

Jump to

Keyboard shortcuts

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