-
Notifications
You must be signed in to change notification settings - Fork 99
action: Add standard validation methods/interfaces for ValidateActionConfig RPCs
#1188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
9ec6758
go mod
austinvalle 5eeac4c
generate RPC methods
austinvalle bf10880
protov5 and fwserver impl
austinvalle 3c21a45
protov6 copy
austinvalle 61eadc9
add initial schema attributes and unlinked schema
austinvalle 0e5df9c
implement unlinked schemas, some attributes, and the rpcs
austinvalle 32b2083
the rest of the tests
austinvalle dcd6748
Merge branch 'main' into av/action-schema
austinvalle 3a1048c
fix double import
austinvalle 7e5fd9f
external interfaces for plan / configure
austinvalle 95e7673
plan action impl and fwserver tests
austinvalle 5d5960a
proto server tests
austinvalle 7ec37c2
from/to plan tests
austinvalle e43f576
from invoke
austinvalle 2f08b28
add invoke impl with just completed event
austinvalle 261ef7d
fix map access in unit tests
austinvalle 8fdf71d
Merge branch 'main' into av/unlinked-action-impl
austinvalle 47f9631
implementation of sending progress events
austinvalle 119f4c5
mention progress events
austinvalle 98f7232
comments
austinvalle ea2deb8
all attributes (primitive, collection, nested)
austinvalle 21ffee7
add blocks and docs
austinvalle 1503be5
update all commented out custom type tests
austinvalle 68a38e4
Merge branch 'main' into av/all-schemas-types
austinvalle 43f5717
go mod
austinvalle 2f341cb
external interface
austinvalle 8361ea6
test provider
austinvalle 3789aad
add validators to schemas
austinvalle 6d3cff2
fwserver
austinvalle e4bcbbf
proto5 and proto6 impl
austinvalle 8dd8241
Merge branch 'main' into av/action-validation-rpc
austinvalle dcde327
Merge branch 'main' into av/action-validation-rpc
austinvalle f90b4f1
update config validator comments
austinvalle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,30 @@ | ||
| // Copyright (c) HashiCorp, Inc. | ||
| // SPDX-License-Identifier: MPL-2.0 | ||
|
|
||
| package action | ||
|
|
||
| import "context" | ||
|
|
||
| // ConfigValidator describes reusable Action configuration validation functionality. | ||
| type ConfigValidator interface { | ||
| // Description describes the validation in plain text formatting. | ||
| // | ||
| // This information may be automatically added to action plain text | ||
| // descriptions by external tooling. | ||
| Description(context.Context) string | ||
|
|
||
| // MarkdownDescription describes the validation in Markdown formatting. | ||
| // | ||
| // This information may be automatically added to action Markdown | ||
| // descriptions by external tooling. | ||
| MarkdownDescription(context.Context) string | ||
|
|
||
| // ValidateAction performs the validation. | ||
| // | ||
| // This method name is separate from the datasource.ConfigValidator | ||
| // interface ValidateDataSource method name, provider.ConfigValidator | ||
| // interface ValidateProvider method name, ephemeral.ConfigValidator | ||
| // interface ValidateEphemeralResource method name, and resource.ConfigValidator | ||
| // interface ValidateResource method name to allow generic validators. | ||
| ValidateAction(context.Context, ValidateConfigRequest, *ValidateConfigResponse) | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.