config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	GitlabAuthConfig *GitlabClient `json:"gitlab" description:"auth config a gitlab client"`
	GithubAuthConfig *GithubClient `json:"github" description:"auth config a github client"`
	Name             string        `json:"name" description:"name of the client, used for referencing in webhook config"`
	OrganizationName string        `json:"organization" description:"name of the organization that this client will act on"`
}

type Configuration

type Configuration struct {
	Clients  []Client  `json:"clients" description:"client configurations"`
	Webhooks []Webhook `json:"webhooks" description:"webhook configurations"`
	Raw      []byte
}

func New

func New(configPath string) (*Configuration, error)

type DocsPreviewCommentConfig

type DocsPreviewCommentConfig struct {
	CommentTemplate *string `mapstructure:"comment-tpl" description:"template to be used for the docs PR comment"`
	RepositoryName  string  `mapstructure:"repository" description:"the name of the docs repo"`
}

type GithubClient

type GithubClient struct {
	AppID              int64  `json:"app-id" description:"application id of github app"`
	PrivateKeyCertPath string `json:"key-path" description:"private key pem path of github app"`
}

type GitlabClient

type GitlabClient struct {
	Token string `json:"token" description:"auth token for gitlab client"`
}

type LinePatchConfig

type LinePatchConfig struct {
	File            string  `mapstructure:"file" description:"the name of the file to be patched"`
	Line            int     `mapstructure:"line" description:"the line number in the file to be patched"`
	ReplaceTemplate *string `mapstructure:"template" description:"a special template to be used for patching the line"`
}

type Modifier

type Modifier struct {
	Type string                 `json:"type" description:"name of the modifier"`
	Args map[string]interface{} `json:"args" description:"modifier configuration"`
}

type ReleaseVectorConfig

type ReleaseVectorConfig struct {
	RepositoryName    string                `mapstructure:"repository" description:"the name of the release repo"`
	RepositoryURL     string                `mapstructure:"repository-url" description:"the url of the release repo"`
	Branch            *string               `mapstructure:"branch" description:"the branch to push in the release vector repo"`
	CommitMsgTemplate *string               `mapstructure:"commit-tpl" description:"template of the commit message"`
	PullRequestTitle  *string               `mapstructure:"pull-request-title" description:"title of the pull request"`
	Repos             map[string][]Modifier `mapstructure:"repos" description:"the repositories that will be pushed to the release vector"`
}

type RepositoryMaintainersConfig

type RepositoryMaintainersConfig struct {
	Suffix *string `mapstructure:"suffix" description:"suffix for maintainers group"`
}

type SwaggerClientRepo

type SwaggerClientRepo struct {
	RepositoryName string     `mapstructure:"repository" description:"the name of the swagger client repo"`
	RepositoryURL  string     `mapstructure:"repository-url" description:"the name of the swagger client repo"`
	Patches        []Modifier `mapstructure:"modifiers" description:"the name of the swagger client repo"`
}

type SwaggerClientsConfig

type SwaggerClientsConfig struct {
	BranchTemplate    *string                        `mapstructure:"branch-template" description:"the branch to push in the swagger client repo"`
	CommitMsgTemplate *string                        `mapstructure:"commit-tpl" description:"template of the commit message in the swagger client repo"`
	Repos             map[string][]SwaggerClientRepo `mapstructure:"repos" description:"the swagger client repositories that will be updated"`
}

type VCSType

type VCSType string
const (
	Github VCSType = "github"
	Gitlab VCSType = "gitlab"
)

type Webhook

type Webhook struct {
	VCS       VCSType        `json:"vcs" description:"type of the vcs"`
	ServePath string         `json:"serve-path" description:"path of the webhook to serve on"`
	Secret    string         `json:"secret" description:"the webhook secret"`
	Actions   WebhookActions `json:"actions" description:"webhook actions"`
}

type WebhookAction

type WebhookAction struct {
	Type   string                 `json:"type" description:"name of the webhook action"`
	Client string                 `json:"client" description:"client that this webhook action uses"`
	Args   map[string]interface{} `json:"args" description:"action configuration"`
}

type WebhookActions

type WebhookActions []WebhookAction

func (WebhookActions) String

func (w WebhookActions) String() string

type YAMLPathPatchConfig

type YAMLPathPatchConfig struct {
	File           string  `mapstructure:"file" description:"the name of the file to be patched"`
	YAMLPath       string  `mapstructure:"yaml-path" description:"the yaml path to the version"`
	Template       *string `mapstructure:"template" description:"a special template to be used for patching the version"`
	VersionCompare *bool   `` /* 143-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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