Initial commit
This commit is contained in:
27
util/types.go
Normal file
27
util/types.go
Normal 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"`
|
||||
}
|
Reference in New Issue
Block a user