server

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient interface {
	Do(req *http.Request) (*http.Response, error)
}

APIClient defines the methods for the API in Server object

type Server

type Server struct {
	API APIClient
	// contains filtered or unexported fields
}

Server struct defines the data fields in bitbucket-server object

func New

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

New returns a new bitbucket-server object with metadata

func (*Server) Authenticate

func (server *Server) Authenticate() (bool, error)

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

func (*Server) Credentials

func (server *Server) Credentials() (string, string, error)

Credentials fetches amd returns the accountID and accessToken from environment variables

func (*Server) Repositories

func (server *Server) Repositories(metadata bool) ([]common.Repository, error)

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

Jump to

Keyboard shortcuts

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