-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[create-pull-request] automated change (#284)
Co-authored-by: nicolasparada <[email protected]>
- Loading branch information
1 parent
db65f73
commit cade88a
Showing
8 changed files
with
154 additions
and
70 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 |
---|---|---|
@@ -1,54 +1,6 @@ | ||
package types | ||
|
||
// ValidatingConfig request body for validating a config. | ||
type ValidatingConfig struct { | ||
Configs []ValidatingConfigEntry `json:"config"` | ||
} | ||
|
||
// ValidatingConfigEntry defines a single config to the validated. See `ValidatingConfig`. | ||
type ValidatingConfigEntry struct { | ||
Command string `json:"command"` | ||
Name string `json:"name"` | ||
Optional map[string]string `json:"optional,omitempty"` | ||
ID string `json:"id"` | ||
} | ||
|
||
// ValidatedConfig response body after validating an agent config successfully. | ||
type ValidatedConfig struct { | ||
Errors ConfigValidity `json:"errors"` | ||
} | ||
|
||
// ConfigValidity details. | ||
type ConfigValidity struct { | ||
Runtime []string `json:"runtime" ` | ||
Input map[string][]string `json:"input"` | ||
Output map[string][]string `json:"output"` | ||
Filter map[string][]string `json:"filter"` | ||
} | ||
|
||
// ConfigValidityV2Property property details. | ||
type ConfigValidityV2Property struct { | ||
ID string `json:"id"` | ||
Property string `json:"property"` | ||
Text string `json:"text"` | ||
Errors []string `json:"errors"` | ||
} | ||
|
||
// ConfigValidityV2Runtime runtime details. | ||
type ConfigValidityV2Runtime struct { | ||
ID string `json:"id"` | ||
Errors []string `json:"errors"` | ||
} | ||
|
||
// ConfigValidityV2 details. | ||
type ConfigValidityV2 struct { | ||
Runtime []ConfigValidityV2Runtime `json:"runtime" ` | ||
Input map[string][]ConfigValidityV2Property `json:"input"` | ||
Output map[string][]ConfigValidityV2Property `json:"output"` | ||
Filter map[string][]ConfigValidityV2Property `json:"filter"` | ||
} | ||
|
||
// ValidatedConfigV2 response body after validating an agent config successfully against the v2 endpoint. | ||
type ValidatedConfigV2 struct { | ||
Errors ConfigValidityV2 `json:"errors"` | ||
type ValidateFluentbitConfig struct { | ||
RawConfig string `json:"rawConfig"` | ||
ConfigFormat ConfigFormat `json:"configFormat"` | ||
} |
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,54 @@ | ||
package legacy | ||
|
||
// ValidatingConfig request body for validating a config. | ||
type ValidatingConfig struct { | ||
Configs []ValidatingConfigEntry `json:"config"` | ||
} | ||
|
||
// ValidatingConfigEntry defines a single config to the validated. See `ValidatingConfig`. | ||
type ValidatingConfigEntry struct { | ||
Command string `json:"command"` | ||
Name string `json:"name"` | ||
Optional map[string]string `json:"optional,omitempty"` | ||
ID string `json:"id"` | ||
} | ||
|
||
// ValidatedConfig response body after validating an agent config successfully. | ||
type ValidatedConfig struct { | ||
Errors ConfigValidity `json:"errors"` | ||
} | ||
|
||
// ConfigValidity details. | ||
type ConfigValidity struct { | ||
Runtime []string `json:"runtime" ` | ||
Input map[string][]string `json:"input"` | ||
Output map[string][]string `json:"output"` | ||
Filter map[string][]string `json:"filter"` | ||
} | ||
|
||
// ConfigValidityV2Property property details. | ||
type ConfigValidityV2Property struct { | ||
ID string `json:"id"` | ||
Property string `json:"property"` | ||
Text string `json:"text"` | ||
Errors []string `json:"errors"` | ||
} | ||
|
||
// ConfigValidityV2Runtime runtime details. | ||
type ConfigValidityV2Runtime struct { | ||
ID string `json:"id"` | ||
Errors []string `json:"errors"` | ||
} | ||
|
||
// ConfigValidityV2 details. | ||
type ConfigValidityV2 struct { | ||
Runtime []ConfigValidityV2Runtime `json:"runtime" ` | ||
Input map[string][]ConfigValidityV2Property `json:"input"` | ||
Output map[string][]ConfigValidityV2Property `json:"output"` | ||
Filter map[string][]ConfigValidityV2Property `json:"filter"` | ||
} | ||
|
||
// ValidatedConfigV2 response body after validating an agent config successfully against the v2 endpoint. | ||
type ValidatedConfigV2 struct { | ||
Errors ConfigValidityV2 `json:"errors"` | ||
} |
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,17 @@ | ||
package types | ||
|
||
const ( | ||
PermCreateAll = "create:*" | ||
PermReadAll = "read:*" | ||
PermUpdateAll = "update:*" | ||
PermDeleteAll = "delete:*" | ||
) | ||
|
||
func AllPermissions() []string { | ||
return []string{ | ||
PermCreateAll, | ||
PermReadAll, | ||
PermUpdateAll, | ||
PermDeleteAll, | ||
} | ||
} |
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