Initial commit

This commit is contained in:
Alexis Vanier
2020-01-09 17:06:03 -05:00
committed by Alexis Vanier
commit ebbf79ce68
23 changed files with 1443 additions and 0 deletions

27
util/types.go Normal file
View File

@@ -0,0 +1,27 @@
package util
// STDINPayload represents the expected payload passed through stdin for our
// resource.
type STDINPayload struct {
Source SourceConfig
Version PRObject
}
// SourceConfig represents the parameters used to configure the behaviour of our
// resource.
type SourceConfig struct {
AccessToken string `json:"access_token"`
Repo string `json:"repo"`
Owner string `json:"owner"`
Hostname string `json:"hostname"`
Port string `json:"port,omitempty"`
Insecure bool `json:"insecure,omitempty"`
SkipSSLVerification bool `json:"skip_ssl_verification,omitempty"`
}
// PRObject represents a PR number when returned from Concourse for comparison.
// It must also have a default value of 0 for comparing during the pull of the
// first PR.
type PRObject struct {
Number string `json:"number,omitempty"`
}