bitbucket

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: Apache-2.0 Imports: 16 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 {
	LoadReposList(ctx context.Context) ([]repository.Repository, error)
	CreatePR(ctx context.Context, r repository.Repository, name string) (CreatePRResponse, error)
}

func UseDryRun

func UseDryRun(realAPIClient APIClient, log *zap.SugaredLogger) APIClient

type Client

type Client struct {
	http.Client
	Organization string
	Login        string
	AppPassword  string
}

func (*Client) CreatePR

func (c *Client) CreatePR(
	ctx context.Context,
	repo repository.Repository,
	branchName string) (CreatePRResponse, error)

func (*Client) LoadReposList

func (c *Client) LoadReposList(ctx context.Context) ([]repository.Repository, error)

type Config

type Config struct {
	config.Config
	Login        string `env:"BITBUCKET_LOGIN"`
	AppPassword  string `env:"BITBUCKET_APP_PASSWORD"`
	Organization string `env:"BITBUCKET_ORGANIZATION"`
}

type CreatePRResponse

type CreatePRResponse struct {
	Links struct {
		HTML linkWrapper `json:"html"`
	} `json:"links"`
}

type DryRunAPIClient

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

func (*DryRunAPIClient) CreatePR

func (*DryRunAPIClient) LoadReposList

func (c *DryRunAPIClient) LoadReposList(ctx context.Context) ([]repository.Repository, error)

type Runner

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

func NewRunner

func NewRunner(
	gcp *git.ClientProvider,
	expectedFile []byte,
	log *zap.SugaredLogger,
	client APIClient,
	cfg *Config) *Runner

func (*Runner) Run

func (runner *Runner) Run(ctx context.Context)

type RunnerBuilder

type RunnerBuilder struct{}

func (RunnerBuilder) Config

func (r RunnerBuilder) Config() interface{}

func (RunnerBuilder) CreateRunner

func (r RunnerBuilder) CreateRunner(log *zap.SugaredLogger, config interface{}) runner.Runner

Jump to

Keyboard shortcuts

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