Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crhntr/resource
A package to reduce boilerplate when writing custom Concourse Resources.
https://github.com/crhntr/resource
cloudfoundry concourse-ci go
Last synced: 4 days ago
JSON representation
A package to reduce boilerplate when writing custom Concourse Resources.
- Host: GitHub
- URL: https://github.com/crhntr/resource
- Owner: crhntr
- License: mit
- Created: 2024-02-24T05:18:54.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-08-07T00:15:18.000Z (3 months ago)
- Last Synced: 2024-08-07T04:16:49.978Z (3 months ago)
- Topics: cloudfoundry, concourse-ci, go
- Language: Go
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Concourse Resource Boilerplate [![Go Reference](https://pkg.go.dev/badge/github.com/crhntr/resource.svg)](https://pkg.go.dev/github.com/crhntr/resource)
A package to reduce boilerplate when writing [custom Concourse Resource Types](https://concourse-ci.org/implementing-resource-types.html).
## Start with this
```go
package main
import (
"context"
"log"
"os""github.com/crhntr/resource"
)func main() {
cmd := resource.Run(get, put, check)
if err := cmd(os.Stdout, os.Stderr, os.Stdin, os.Args); err != nil {
log.Fatal(err)
}
}type (
ResourceParams struct{}
GetParams struct{}
PutParams struct{}
Version struct{}
)func get(context.Context, *log.Logger, ResourceParams, GetParams, Version, string) ([]resource.MetadataField, error) {
panic("not implemented")
}func put(context.Context, *log.Logger, ResourceParams, PutParams, string) (Version, []resource.MetadataField, error) {
panic("not implemented")
}func check(context.Context, *log.Logger, ResourceParams, Version) ([]Version, error) {
panic("not implemented")
}```