Documentation
¶
Index ¶
- func GetPlugins() map[string]StepPlugin
- type CreateIssueResponse
- type DynamoDBClientInterface
- type DynamoDBRecord
- type ForcemergeImpl
- type IssueType
- type JiraADFDescription
- type JiraFields
- type JiraIssue
- type JiraParagraph
- type JiraProject
- type JiraText
- type NoopImpl
- type RepositoryGoliacApprovers
- type SlackMessage
- type StepPlugin
- type StepPluginDynamoDB
- type StepPluginJira
- type StepPluginSlack
- type Workflow
- type WorkflowGithubClient
- type WorkflowLocalResource
- type WorkflowRemoteResource
- type WorkflowService
- type WorkflowServiceImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPlugins ¶ added in v0.18.16
func GetPlugins() map[string]StepPlugin
GetPlugins returns a map of all the plugins
Types ¶
type CreateIssueResponse ¶
type DynamoDBClientInterface ¶ added in v0.18.13
type DynamoDBClientInterface interface {
PutItem(ctx context.Context, params *dynamodb.PutItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error)
}
DynamoDBClientInterface defines the interface for DynamoDB operations
type DynamoDBRecord ¶ added in v0.18.13
type DynamoDBRecord struct {
PullRequest string `dynamodbav:"pull_request"`
Timestamp int64 `dynamodbav:"timestamp"`
GithubCaller string `dynamodbav:"github_caller"`
Organization string `dynamodbav:"organization"`
Repository string `dynamodbav:"repository"`
PRNumber string `dynamodbav:"pr_number"`
Explanation string `dynamodbav:"explanation"`
}
type ForcemergeImpl ¶
type ForcemergeImpl struct {
// contains filtered or unexported fields
}
type JiraADFDescription ¶
type JiraADFDescription struct {
Type string `json:"type"`
Version int `json:"version"`
Content []JiraParagraph `json:"content"`
}
type JiraFields ¶
type JiraFields struct {
Project JiraProject `json:"project"`
Summary string `json:"summary"`
Description JiraADFDescription `json:"description"`
Issuetype IssueType `json:"issuetype"`
}
type JiraIssue ¶
type JiraIssue struct {
Fields JiraFields `json:"fields"`
}
type JiraParagraph ¶
type JiraProject ¶
type JiraProject struct {
Key string `json:"key"`
}
type RepositoryGoliacApprovers ¶ added in v0.18.9
type SlackMessage ¶
type StepPlugin ¶ added in v0.17.2
type StepPlugin interface {
Execute(ctx context.Context, username, workflowDescription, explanation string, url *url.URL, properties map[string]interface{}) (string, error)
}
func NewStepPluginDynamoDB ¶ added in v0.18.13
func NewStepPluginDynamoDB() StepPlugin
NewStepPluginDynamoDB creates a new DynamoDB plugin with default AWS client
func NewStepPluginDynamoDBWithClient ¶ added in v0.18.13
func NewStepPluginDynamoDBWithClient(client DynamoDBClientInterface) StepPlugin
NewStepPluginDynamoDBWithClient creates a new DynamoDB plugin with a custom client This is used for testing
func NewStepPluginJira ¶ added in v0.17.2
func NewStepPluginJira() StepPlugin
func NewStepPluginSlack ¶ added in v0.17.2
func NewStepPluginSlack() StepPlugin
type StepPluginDynamoDB ¶ added in v0.18.13
type StepPluginDynamoDB struct {
TableName string
// contains filtered or unexported fields
}
type StepPluginJira ¶ added in v0.17.2
type StepPluginJira struct {
AtlassianUrlDomain string // something like "https://mycompany.atlassian.net"
ProjectKey string
Email string
ApiToken string //generate a Jira API token here: https://id.atlassian.com/manage/api-tokens
IssueType string
}
type StepPluginSlack ¶ added in v0.17.2
type Workflow ¶ added in v0.17.2
type Workflow interface {
ExecuteWorkflow(ctx context.Context, repoconfigForceMergeworkflows []string, username, workflowName, explanation string, properties map[string]string, dryrun bool) ([]string, error)
}
func NewForcemergeImpl ¶
func NewForcemergeImpl(ws WorkflowService) Workflow
func NewNoopImpl ¶ added in v0.17.2
func NewNoopImpl(ws WorkflowService) Workflow
type WorkflowGithubClient ¶ added in v0.18.9
type WorkflowGithubClient interface {
CallRestAPI(ctx context.Context, endpoint, parameters, method string, body map[string]interface{}, githubToken *string) ([]byte, error)
}
strip down version of GithubClient
type WorkflowLocalResource ¶ added in v0.17.2
type WorkflowLocalResource interface {
Workflows() map[string]*entity.Workflow
Teams() map[string]*entity.Team
Users() map[string]*entity.User // github username, user definition
}
strip down version of Goliac Local
type WorkflowRemoteResource ¶ added in v0.17.2
type WorkflowRemoteResource interface {
// return the teams from github (with the slugified name as)
Teams(ctx context.Context, current bool) map[string]*engine.GithubTeam
}
strip down version of Goliac Remote (if we have an externally managed team)
type WorkflowService ¶ added in v0.18.9
type WorkflowService interface {
GetWorkflow(ctx context.Context, repoconfigForceMergeworkflows []string, workflowName, repo, githubId string) (*entity.Workflow, error)
CallRestAPI(ctx context.Context, endpoint, parameters, method string, body map[string]interface{}, githubToken *string) ([]byte, error)
}
WorkflowService is here to select the right workflow and check the ACL
func NewWorkflowService ¶ added in v0.18.9
func NewWorkflowService(organization string, local WorkflowLocalResource, remote WorkflowRemoteResource, ghclient WorkflowGithubClient) WorkflowService
type WorkflowServiceImpl ¶ added in v0.18.9
type WorkflowServiceImpl struct {
// contains filtered or unexported fields
}
func (*WorkflowServiceImpl) CallRestAPI ¶ added in v0.18.9
func (*WorkflowServiceImpl) GetWorkflow ¶ added in v0.18.9
Click to show internal directories.
Click to hide internal directories.