bitbucket

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuth

type BasicAuth struct {
	Username string
	Password string
}

type Client

type Client struct {
	Auth         interface{}
	HttpClient   *http.Client
	Projects     Projects
	Repositories Repositories
	// contains filtered or unexported fields
}

func NewClientWithBasicAuth

func NewClientWithBasicAuth(endpoint, username, password string, writer io.Writer) *Client

func NewClientWithTokenAuth

func NewClientWithTokenAuth(endpoint, token string, writer io.Writer) *Client

func (*Client) RawRequest

func (c *Client) RawRequest(method, url, text string) (io.ReadCloser, error)

func (*Client) SetSocksProxy

func (c *Client) SetSocksProxy(url string) error
type CloneLink struct {
	Href string `json:"href"`
	Name string `json:"name"`
}
type Links struct {
	Clone []CloneLink `json:"clone,omitempty"`
	Self  *[]struct {
		Href string `json:"href"`
	} `json:"self,omitempty"`
}

type PagedResponse

type PagedResponse struct {
	Size          int  `json:"size"`
	Limit         int  `json:"limit"`
	Start         int  `json:"start"`
	IsLastPage    bool `json:"isLastPage"`
	NextPageStart int  `json:"nextPageStart"`
}

type Project

type Project struct {
	Key         string `json:"key"`
	ID          int    `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Public      bool   `json:"public"`
	Type        string `json:"type"`
	Links       Links  `json:"links"`
}

type Projects

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

func (*Projects) List

func (r *Projects) List(start int) (*ProjectsResponse, error)

type ProjectsResponse

type ProjectsResponse struct {
	*PagedResponse
	Values []Project `json:"values"`
}

type Repositories

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

func (*Repositories) List

func (r *Repositories) List(project string) (*RepositoriesResponse, error)

type RepositoriesResponse

type RepositoriesResponse struct {
	*PagedResponse
	Values []Repository `json:"values"`
}

type Repository

type Repository struct {
	Slug          string  `json:"slug"`
	ID            int     `json:"id"`
	Name          string  `json:"name"`
	Description   string  `json:"description"`
	ScmID         string  `json:"scmId"`
	State         string  `json:"state"`
	StatusMessage string  `json:"statusMessage"`
	Forkable      bool    `json:"forkable"`
	Project       Project `json:"project"`
	Public        bool    `json:"public"`
	Links         Links   `json:"links"`
}

type TokenAuth

type TokenAuth struct {
	Token string
}

Jump to

Keyboard shortcuts

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