Documentation ¶
Index ¶
- Constants
- func EncodeActionResult(spec ActionResult, marshaler runtime.Marshaler) ([]byte, error)
- func EncodeActionSpec(spec ActionSpec, marshaler runtime.Marshaler) ([]byte, error)
- func RegisterAction(name string, description string, usage string, attrs []string) error
- func RegisterType(typ ActionType) error
- func SupportedActionVersions(name string) []string
- type Action
- type ActionResult
- type ActionResultType
- type ActionSpec
- type ActionSpecType
- type ActionType
- type ActionTypeRegistry
- type CommonResult
- type Option
- type Options
- type Selector
Constants ¶
View Source
const ( KIND_ACTION = "action" KIND_ACTIONTYPE = "action type" )
Variables ¶
This section is empty.
Functions ¶
func EncodeActionResult ¶
func EncodeActionResult(spec ActionResult, marshaler runtime.Marshaler) ([]byte, error)
func EncodeActionSpec ¶
func EncodeActionSpec(spec ActionSpec, marshaler runtime.Marshaler) ([]byte, error)
func RegisterAction ¶
func RegisterType ¶
func RegisterType(typ ActionType) error
func SupportedActionVersions ¶
Types ¶
type Action ¶
type ActionResult ¶
type ActionResult interface { runtime.VersionedTypedObject SetVersion(string) SetType(string) GetMessage() string }
func DecodeActionResult ¶
func DecodeActionResult(data []byte, unmarshaler runtime.Unmarshaler) (ActionResult, error)
type ActionResultType ¶
type ActionResultType runtime.VersionedTypedObjectType[ActionResult]
type ActionSpec ¶
type ActionSpec interface { runtime.VersionedTypedObject SetVersion(string) Selector() Selector GetConsumerAttributes() common.Properties }
func DecodeActionSpec ¶
func DecodeActionSpec(data []byte, unmarshaler runtime.Unmarshaler) (ActionSpec, error)
type ActionSpecType ¶
type ActionSpecType runtime.VersionedTypedObjectType[ActionSpec]
type ActionType ¶
type ActionType interface { runtime.VersionedTypedObject SpecificationType() ActionSpecType ResultType() ActionResultType }
func NewActionType ¶
func NewActionType[IS ActionSpec, IR ActionResult](kind, version string) ActionType
func NewActionTypeByConverter ¶
func NewActionTypeByConverter[IS ActionSpec, VS runtime.TypedObject, IR ActionResult, VR runtime.TypedObject](kind, version string, specconv runtime.Converter[IS, VS], resconv runtime.Converter[IR, VR]) ActionType
type ActionTypeRegistry ¶
type ActionTypeRegistry interface { RegisterAction(name string, description string, usage string, attrs []string) error RegisterActionType(typ ActionType) error DecodeActionSpec(data []byte, unmarshaler runtime.Unmarshaler) (ActionSpec, error) EncodeActionSpec(spec ActionSpec, marshaler runtime.Marshaler) ([]byte, error) DecodeActionResult(data []byte, unmarshaler runtime.Unmarshaler) (ActionResult, error) EncodeActionResult(spec ActionResult, marshaler runtime.Marshaler) ([]byte, error) GetAction(name string) Action SupportedActionVersions(name string) []string Copy() ActionTypeRegistry }
func DefaultRegistry ¶
func DefaultRegistry() ActionTypeRegistry
func NewActionTypeRegistry ¶
func NewActionTypeRegistry() ActionTypeRegistry
type CommonResult ¶
type CommonResult struct { runtime.ObjectVersionedType `json:",inline"` Message string `json:"message,omitempty"` }
CommonResult is the minimal action result.
func (*CommonResult) GetMessage ¶
func (r *CommonResult) GetMessage() string
func (*CommonResult) SetType ¶
func (r *CommonResult) SetType(typ string)
Click to show internal directories.
Click to hide internal directories.