bitbucketapi

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 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

View Source
const (
	DEFAULT_HOST string = "bitbucket.org"
)

Variables

This section is empty.

Functions

Types

type BitBucketAPI

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

func NewBitBucketAPI

func NewBitBucketAPI() *BitBucketAPI

func (*BitBucketAPI) GetDefaultBranchName

func (gl *BitBucketAPI) GetDefaultBranchName(owner, repo string, headers *Headers) (string, error)

func (*BitBucketAPI) GetLatestCommit

func (gl *BitBucketAPI) GetLatestCommit(owner, repo, branch string, headers *Headers) (*Commit, error)

func (*BitBucketAPI) GetRepoTree

func (gl *BitBucketAPI) GetRepoTree(owner, repo, branch string, headers *Headers) (*Tree, error)

type Commit

type Commit struct {
	Type   string    `json:"type"`
	Hash   string    `json:"hash"`
	Date   time.Time `json:"date"`
	Author struct {
		Type string `json:"type"`
		Raw  string `json:"raw"`
	} `json:"author"`
	Message string `json:"message"`
}

type Commits

type Commits struct {
	Values  []Commit `json:"values"`
	Pagelen int      `json:"pagelen"`
	Next    string   `json:"next"`
}

type Headers

type Headers struct {
	Token string
}

func (*Headers) ToMap

func (h *Headers) ToMap() map[string]string

ToMap convert headers to map[string]string

type IBitBucketAPI

type IBitBucketAPI interface {
	GetRepoTree(owner, repo, branch string, headers *Headers) (*Tree, error)
	GetDefaultBranchName(owner, repo string, headers *Headers) (string, error)
	GetLatestCommit(owner, repo, branch string, headers *Headers) (*Commit, error)
}

type ObjectType

type ObjectType string

type Tree

type Tree struct{}

Jump to

Keyboard shortcuts

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