Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
frantjc committed Dec 4, 2024
1 parent ceb15ff commit 30704b8
Show file tree
Hide file tree
Showing 18 changed files with 2,257 additions and 18 deletions.
5 changes: 5 additions & 0 deletions cloudbuild/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// package cloudbuild contains types compatible with the data
// structures in Google CloudBuild build config file schema as
// well as commonly used filepaths and environment variables.
// Such types are used by Forge but are not specific to it.
package cloudbuild
3 changes: 3 additions & 0 deletions command/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// package command exports functions that return (*github.com/spf13/cobra.Command)s
// which act as the entrypoint to `forge` and its subcommands.
package command
5 changes: 5 additions & 0 deletions concourse/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// package concourse contains types compatible with the data
// structures in Concourse such as its pipeline schema and the
// inputs and outputs to and from Concourse Resources. Such types
// are used by Forge but are not specific to it.
package concourse
16 changes: 0 additions & 16 deletions concourse/resource_type.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
package concourse

import "context"

type resourceTypesKey struct{}

// WithResourceTypes embeds the given resource types into the given context.
func WithResourceTypes(ctx context.Context, resourceTypes ...*ResourceType) context.Context {
return context.WithValue(ctx, resourceTypesKey{}, resourceTypes)
}

// ResourceTypesFrom returns whatever resource types have been embedded in
// given context.
func ResourceTypesFrom(ctx context.Context) (resourceTypes []ResourceType, ok bool) {
resourceTypes, ok = ctx.Value(resourceTypesKey{}).([]ResourceType)
return
}

// ResourceType has the YAML encoding of a resource type as it would appear
// in the `resource_types` array of a Concourse pipeline configuration file.
type ResourceType struct {
Expand Down
5 changes: 3 additions & 2 deletions docs/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- `make` is _required_
- `go` >=1.20 is _required_ for multi-error handling
- `docker` is _required_ to test as it is its only runtime
- [`upx`](https://github.com/upx/upx) is _required_ for compressing [`shim`](internal/cmd/shim/main.go)
- `node` >=20 is _required_ for developing the [`action`](.github/action)
- [`upx`](https://github.com/upx/upx) is _required_ for compressing [`shim`](https://github.com/frantjc/forge/blob/main/internal/cmd/shim/main.go)
- `node` >=20 is _required_ for developing the [`action`](https://github.com/frantjc/forge/blob/main/.github/action)

![Diagram](diag.dark.png)
Binary file added docs/diag.dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 30704b8

Please sign in to comment.