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, specproto ActionSpec, resultproto ActionResult, ...) error
- func RegisterType(kind string, version string, 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"
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 RegisterAction(name string, specproto ActionSpec, resultproto ActionResult, description string, attrs ...string) error
func RegisterType ¶
func RegisterType(kind string, version string, typ ActionType) error
func SupportedActionVersions ¶
Types ¶
type Action ¶
type ActionResult ¶
type ActionResult interface { runtime.VersionedTypedObject SetType(string) GetMessage() string }
func DecodeActionResult ¶
func DecodeActionResult(data []byte, unmarshaler runtime.Unmarshaler) (ActionResult, error)
type ActionResultType ¶
type ActionResultType scheme.Type[ActionResult]
type ActionSpec ¶
type ActionSpec interface { runtime.VersionedTypedObject SetType(name string) Selector() Selector GetConsumerAttributes() common.Properties }
func DecodeActionSpec ¶
func DecodeActionSpec(data []byte, unmarshaler runtime.Unmarshaler) (ActionSpec, error)
type ActionSpecType ¶
type ActionSpecType scheme.Type[ActionSpec]
type ActionType ¶
type ActionType interface { SpecificationType() ActionSpecType ResultType() ActionResultType }
func NewActionTypeByProtoTypes ¶
func NewActionTypeByProtoTypes(specproto scheme.Object, specconv scheme.Converter[ActionSpec], resultproto scheme.Object, resconv scheme.Converter[ActionResult]) ActionType
type ActionTypeRegistry ¶
type ActionTypeRegistry interface { RegisterAction(name string, specproto ActionSpec, resultproto ActionResult, description string, attrs ...string) error RegisterActionType(name string, 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 }
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.