providers

package
v0.0.0-...-05593c5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commander

type Commander interface {
	Test(ctx context.Context, owner string, repoURL string, repo string, number int, branch string, commentID int)
	Help(ctx context.Context, owner string, repo string, number int)
}

Commander represents the commands which this bot is capable of performing

type Commenter

type Commenter interface {
	AddComment(ctx context.Context, owner string, repo string, number int, comment string) error
}

Commenter will add a comment of failed, success, ack to a PR.

type EnvironmentConverter

type EnvironmentConverter interface {
	// LoadValueFromFile provides the ability to load a secret from a docker
	// mounted secret file if the value contains `/run/secret`.
	LoadValueFromFile(f string) (string, error)
}

EnvironmentConverter provides an option to parse the environment. This is needed in case we are running in a docker swarm where secrets come from a mounted file instead of an environment variable.

type Executer

type Executer interface {
	// Run a command over an executioning medium.
	Execute(ctx context.Context, script string, args map[string]string) error
}

Executer defines an execution method.

type Processor

type Processor interface {
	// Process processes a single pr comment.
	Process(ctx context.Context, handle string, commentURL string, pullURL string) error
}

Processor processes a comment event created on a PR.

type Storer

type Storer interface {
	// GetUser returns the full user entity.
	GetUser(ctx context.Context, handle string) (*models.User, error)
}

Storer represents the functionality of a storage medium which deals with retrieving and managing users who have access to the gaia-bot.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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