cloud

package
v0.0.0-...-1fc5b01 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cloud

type Cloud struct {
	API struct {
		Teams        Teams
		Repositories Repositories
	}
	// contains filtered or unexported fields
}

Cloud struct defines data fields in bitbucket-cloud object

func New

func New(source config.Source) (*Cloud, error)

New returns a new bitbucket-cloud object

func (Cloud) Authenticate

func (cloud Cloud) Authenticate() (bool, error)

Authenticate checks the account ID and access tokens' validity for the kind defined

func (Cloud) Credentials

func (cloud Cloud) Credentials() (string, string, error)

Credentials fetches amd returns the accountID and accessToken from environment variables

func (Cloud) Repositories

func (cloud Cloud) Repositories(metadata bool) ([]common.Repository, error)

Repositories queries the API and returns a list of repositories mentioned by the kind

type Repositories

type Repositories interface {
	ListForAccount(*bitbucket.RepositoriesOptions) (*bitbucket.RepositoriesRes, error)
}

Repositories interface declares methods to implement in the API object

type Teams

type Teams interface {
	Projects(string) (interface{}, error)
	Repositories(string) (interface{}, error)
}

Teams interface declares methods to implement in the API object

Jump to

Keyboard shortcuts

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