2021-09-22 13:36:45 +00:00
|
|
|
package plugins
|
|
|
|
|
|
|
|
type (
|
2024-01-01 16:52:18 +00:00
|
|
|
// ActionDocumentation contains the documentation for a single actor
|
|
|
|
// to be rendered into the documentation site
|
2021-09-22 13:36:45 +00:00
|
|
|
ActionDocumentation struct {
|
|
|
|
Description string `json:"description"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
|
|
|
|
Fields []ActionDocumentationField `json:"fields"`
|
|
|
|
}
|
|
|
|
|
2024-01-01 16:52:18 +00:00
|
|
|
// ActionDocumentationField documents fields available in the actor
|
2021-09-22 13:36:45 +00:00
|
|
|
ActionDocumentationField struct {
|
|
|
|
Default string `json:"default"`
|
2023-08-14 14:03:06 +00:00
|
|
|
DefaultComment string `json:"default_comment"`
|
2021-09-22 13:36:45 +00:00
|
|
|
Description string `json:"description"`
|
|
|
|
Key string `json:"key"`
|
|
|
|
Long bool `json:"long"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Optional bool `json:"optional"`
|
|
|
|
SupportTemplate bool `json:"support_template"`
|
|
|
|
Type ActionDocumentationFieldType `json:"type"`
|
|
|
|
}
|
|
|
|
|
2024-01-01 16:52:18 +00:00
|
|
|
// ActionDocumentationFieldType defines known field types
|
2021-09-22 13:36:45 +00:00
|
|
|
ActionDocumentationFieldType string
|
|
|
|
)
|
|
|
|
|
2024-01-01 16:52:18 +00:00
|
|
|
// Enum of available field types
|
2021-09-22 13:36:45 +00:00
|
|
|
const (
|
|
|
|
ActionDocumentationFieldTypeBool ActionDocumentationFieldType = "bool"
|
|
|
|
ActionDocumentationFieldTypeDuration ActionDocumentationFieldType = "duration"
|
|
|
|
ActionDocumentationFieldTypeInt64 ActionDocumentationFieldType = "int64"
|
|
|
|
ActionDocumentationFieldTypeString ActionDocumentationFieldType = "string"
|
|
|
|
ActionDocumentationFieldTypeStringSlice ActionDocumentationFieldType = "stringslice"
|
|
|
|
)
|