Documentation
¶
Index ¶
- type Component
- type ComponentBindable
- type ComponentBindableFn
- type ComponentContainer
- type ComponentDefinition
- type ComponentExecuteResponse
- type ComponentFunctionFn
- type ComponentInput
- type ComponentKeychain
- type ComponentLogger
- type ComponentManifest
- type ComponentMount
- type ComponentResultPayload
- type ComponentReturn
- type ComponentSetupFn
- type ComponentStorage
- func (c *ComponentStorage) GetBool(k string) bool
- func (c *ComponentStorage) GetDate(k string) time.Time
- func (c *ComponentStorage) GetFloat(k string) float64
- func (c *ComponentStorage) GetInt(k string) int
- func (c *ComponentStorage) GetString(k string) string
- func (c *ComponentStorage) SetDate(key string, value time.Time) error
- func (c *ComponentStorage) SetInt(k string, v int) error
- func (c *ComponentStorage) SetString(k, v string) error
- type ComponentTrigger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
func CreateComponent ¶
func CreateComponent(manifest ComponentManifest, fns ...ComponentBindable) *Component
func (*Component) StartWithSetup ¶
func (c *Component) StartWithSetup(setup ComponentSetupFn)
type ComponentBindable ¶
type ComponentBindable interface {
Execute(args []byte, context *ComponentContainer) *ComponentResultPayload
// contains filtered or unexported methods
}
type ComponentBindableFn ¶
type ComponentBindableFn[I any, O any] = func(input *ComponentInput[I, O], ctx *ComponentContainer) *ComponentReturn[O]
type ComponentContainer ¶
type ComponentContainer struct {
Storage core.Storage
Keychain core.Keychain
Logger core.Logger
// contains filtered or unexported fields
}
func (*ComponentContainer) OpenUrl ¶
func (c *ComponentContainer) OpenUrl(url string) bool
func (*ComponentContainer) RequestOauth ¶
func (c *ComponentContainer) RequestOauth(url, callback string) (string, bool)
func (*ComponentContainer) RequestSecret ¶
func (c *ComponentContainer) RequestSecret(prompt string) (string, bool)
func (*ComponentContainer) Run ¶
func (c *ComponentContainer) Run(program string, args ...string) ComponentExecuteResponse
type ComponentDefinition ¶
func Define ¶
func Define[I any, O any](manifest core.ComponentManifest, name string) *ComponentDefinition[I, O]
func (*ComponentDefinition[I, O]) Execute ¶
func (c *ComponentDefinition[I, O]) Execute(mod core.ForeignComponent, input I) (O, bool)
type ComponentFunctionFn ¶
type ComponentFunctionFn = func(body []byte, ctx *ComponentContainer) *ComponentResultPayload
type ComponentInput ¶
func (*ComponentInput[I, O]) Error ¶
func (c *ComponentInput[I, O]) Error(msg string) *ComponentReturn[O]
func (*ComponentInput[I, O]) Return ¶
func (c *ComponentInput[I, O]) Return(ret O) *ComponentReturn[O]
type ComponentKeychain ¶
type ComponentKeychain struct {
// contains filtered or unexported fields
}
func (*ComponentKeychain) Get ¶
func (c *ComponentKeychain) Get(k string) string
func (*ComponentKeychain) Set ¶
func (c *ComponentKeychain) Set(k, v string)
type ComponentLogger ¶
type ComponentLogger struct {
// contains filtered or unexported fields
}
func (*ComponentLogger) Event ¶
func (cl *ComponentLogger) Event(ev string, payload any)
func (*ComponentLogger) Log ¶
func (cl *ComponentLogger) Log(v string, args ...any)
func (*ComponentLogger) LogLiteral ¶
func (cl *ComponentLogger) LogLiteral(v string)
type ComponentManifest ¶
type ComponentManifest = core.ComponentManifest
type ComponentMount ¶
type ComponentMount[I any, O any] struct { Definition *ComponentDefinition[I, O] Function ComponentBindableFn[I, O] }
func Mount ¶
func Mount[I any, O any](definition *ComponentDefinition[I, O], fn ComponentBindableFn[I, O]) *ComponentMount[I, O]
func (*ComponentMount[I, O]) Execute ¶
func (m *ComponentMount[I, O]) Execute(args []byte, ctx *ComponentContainer) *ComponentResultPayload
type ComponentResultPayload ¶
type ComponentResultPayload = componentipc.ComponentResultPayload
type ComponentReturn ¶
type ComponentSetupFn ¶
type ComponentSetupFn = func(ctx *ComponentContainer) string
type ComponentStorage ¶
type ComponentStorage struct {
// contains filtered or unexported fields
}
func (*ComponentStorage) GetBool ¶
func (c *ComponentStorage) GetBool(k string) bool
func (*ComponentStorage) GetFloat ¶
func (c *ComponentStorage) GetFloat(k string) float64
func (*ComponentStorage) GetInt ¶
func (c *ComponentStorage) GetInt(k string) int
func (*ComponentStorage) GetString ¶
func (c *ComponentStorage) GetString(k string) string
func (*ComponentStorage) SetDate ¶
func (c *ComponentStorage) SetDate(key string, value time.Time) error
func (*ComponentStorage) SetString ¶
func (c *ComponentStorage) SetString(k, v string) error
type ComponentTrigger ¶
func NewComponentTrigger ¶
func NewComponentTrigger[T any](m ComponentManifest, name string) ComponentTrigger[T]
func (*ComponentTrigger[T]) Send ¶
func (c *ComponentTrigger[T]) Send(cc *ComponentContainer, payload T)
Click to show internal directories.
Click to hide internal directories.