-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from ckaznocha/multiple-response-codes
Multiple response codes
- Loading branch information
Showing
8 changed files
with
112 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package actions | ||
|
||
//Params holds the values supported in by the concourse `params` array | ||
type Params struct { | ||
AppJSON string `json:"app_json"` | ||
Replacements []Metadata `json:"replacements"` | ||
} | ||
|
||
//AuthCreds will be used for HTTP basic auth | ||
type AuthCreds struct { | ||
UserName string `json:"user_name"` | ||
Password string `json:"password"` | ||
} | ||
|
||
//Source holds the values supported in by the concourse `source` array | ||
type Source struct { | ||
AppID string `json:"app_id"` | ||
URI string `json:"uri"` | ||
BasicAuth *AuthCreds `json:"basic_auth"` | ||
} | ||
|
||
//Version maps to a concousre version | ||
type Version struct { | ||
Ref string `json:"ref"` | ||
} | ||
|
||
//InputJSON is what all concourse actions will pass to us | ||
type InputJSON struct { | ||
Params Params `json:"params"` | ||
Source Source `json:"source"` | ||
Version Version `json:"version"` | ||
} | ||
|
||
//CheckOutput is what concourse expects as the result of a `check` | ||
type CheckOutput []Version | ||
|
||
//Metadata holds a concourse metadata entry | ||
type Metadata struct { | ||
Name string `json:"name"` | ||
Value string `json:"value"` | ||
} | ||
|
||
//IOOutput is the return concourse expects from an `in` or and `out` | ||
type IOOutput struct { | ||
Version Version `json:"version"` | ||
Metadata []Metadata `json:"metadata"` | ||
} |
16 changes: 9 additions & 7 deletions
16
cmd/marathon-resource/dates.go → cmd/marathon-resource/actions/dates.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.