-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parse module calls + build module schema based on Registry data (#113)
* progress * add failing test + TODOs * Use cty for variable type & default * implement dependent schema for registry module * adjust names & interfaces to reflect other module sources * reflect module input types of default vals * make input & output descriptions markup-type-aware Co-authored-by: Radek Simko <radek.simko@gmail.com>
- Loading branch information
1 parent
c432f4c
commit 9aece33
Showing
8 changed files
with
334 additions
and
10 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package registry | ||
|
||
import ( | ||
"github.com/hashicorp/go-version" | ||
"github.com/hashicorp/hcl-lang/lang" | ||
"github.com/zclconf/go-cty/cty" | ||
) | ||
|
||
type ModuleData struct { | ||
Version *version.Version | ||
Inputs []Input | ||
Outputs []Output | ||
} | ||
|
||
type Input struct { | ||
Name string | ||
Type cty.Type | ||
Description lang.MarkupContent | ||
Default cty.Value | ||
Required bool | ||
} | ||
|
||
type Output struct { | ||
Name string | ||
Description lang.MarkupContent | ||
} |
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.