bitbucket

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: MIT Imports: 9 Imported by: 0

README

bitbucket

Access to Bitbucket Server REST API on the Go!

Core REST API Reference

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	Scheme   string
	Host     string
	Prefix   string
	Version  string
	Category string
	Auth     string
	Timeout  time.Duration
}

func NewApi

func NewApi(host, category string) *Api

func (*Api) Get

func (a *Api) Get(url string) (resp *Response, err error)

func (*Api) Post

func (a *Api) Post(url string, body io.Reader) (resp *Response, err error)

func (*Api) Url

func (a *Api) Url(pathElems []string, queryParams map[string]string) string

type Project

type Project struct {
	*Api
	Key string
}

func NewProject

func NewProject(host, key string) *Project

func (*Project) GetRepo

func (p *Project) GetRepo(slug string) (resp *Response, err error)

func (*Project) PostRepo

func (p *Project) PostRepo(name string) (resp *Response, err error)

type Response

type Response struct {
	StatusCode int
	Body       []byte
}

Jump to

Keyboard shortcuts

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