Files
gitea-resource/util/types.go
Alexis Vanier ebbf79ce68 Initial commit
2020-01-11 01:43:50 -05:00

28 lines
894 B
Go

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"`
}