Documentation
¶
Index ¶
- Constants
- func ClearCleanup(thread *starlark.Thread, key string)
- func CreatePluginApi(f StarlarkFunction, opType PluginFunctionType) plugin.PluginFunc
- func CreatePluginApiName(...) plugin.PluginFunc
- func CreatePluginConstant(name string, value starlark.Value) plugin.PluginFunc
- func DeferCleanup(thread *starlark.Thread, key string, deferFunc DeferFunc, strict bool)
- func FetchPluginState(thread *starlark.Thread, key string) any
- func GetContext(thread *starlark.Thread) context.Context
- func RegisterPlugin(name string, builder plugin.NewPluginFunc, funcs []plugin.PluginFunc)
- func SavePluginState(thread *starlark.Thread, key string, value any)
- type App
- type AppPlugins
- type DeferEntry
- type DeferFunc
- type DryRun
- type PluginFunctionType
- type PluginResponse
- func (r *PluginResponse) Attr(name string) (starlark.Value, error)
- func (r *PluginResponse) AttrNames() []string
- func (r *PluginResponse) Freeze()
- func (r *PluginResponse) Hash() (uint32, error)
- func (r *PluginResponse) String() string
- func (r *PluginResponse) Truth() starlark.Bool
- func (r *PluginResponse) Type() string
- func (r *PluginResponse) UnmarshalStarlarkType() (any, error)
- type SSEMessage
- type StarlarkFunction
Constants ¶
View Source
const ( CONTAINERFILE = "Containerfile" DOCKERFILE = "Dockerfile" )
Variables ¶
This section is empty.
Functions ¶
func ClearCleanup ¶ added in v0.4.1
ClearCleanup clears a defer function from the thread local
func CreatePluginApi ¶ added in v0.3.0
func CreatePluginApi(f StarlarkFunction, opType PluginFunctionType) plugin.PluginFunc
func CreatePluginApiName ¶ added in v0.4.0
func CreatePluginApiName( f func(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error), opType PluginFunctionType, name string) plugin.PluginFunc
CreatePluginApiName creates a Clace plugin function
func CreatePluginConstant ¶ added in v0.6.0
func CreatePluginConstant(name string, value starlark.Value) plugin.PluginFunc
func DeferCleanup ¶ added in v0.4.1
DeferCleanup defers a close function to call when the API handler is done
func FetchPluginState ¶ added in v0.4.1
FetchPluginState fetches a value from the thread local for the plugin
func RegisterPlugin ¶
func RegisterPlugin(name string, builder plugin.NewPluginFunc, funcs []plugin.PluginFunc)
RegisterPlugin registers a plugin with Clace
Types ¶
type App ¶
type App struct { *types.Logger *types.AppEntry Name string CustomLayout bool Config *apptype.AppConfig // contains filtered or unexported fields }
App is the main object that represents a Clace app. It is created when the app is loaded
func (*App) Initialize ¶
type AppPlugins ¶ added in v0.4.0
func NewAppPlugins ¶ added in v0.4.0
func NewAppPlugins(app *App, pluginConfig map[string]types.PluginSettings, appAccounts []types.AccountLink) *AppPlugins
func (*AppPlugins) GetPlugin ¶ added in v0.4.0
func (p *AppPlugins) GetPlugin(pluginInfo *plugin.PluginInfo, accountName string) (any, error)
type DeferEntry ¶ added in v0.4.1
type PluginFunctionType ¶ added in v0.4.0
type PluginFunctionType int
const ( READ PluginFunctionType = iota WRITE READ_WRITE )
type PluginResponse ¶ added in v0.4.4
type PluginResponse struct {
// contains filtered or unexported fields
}
PluginResponse is a starlark.Value that represents the response to a plugin request
func NewErrorCodeResponse ¶ added in v0.4.4
func NewErrorCodeResponse(errorCode int, err error, value any) *PluginResponse
func NewErrorResponse ¶ added in v0.4.4
func NewResponse ¶ added in v0.4.4
func NewResponse(value any) *PluginResponse
func (*PluginResponse) Attr ¶ added in v0.4.4
func (r *PluginResponse) Attr(name string) (starlark.Value, error)
func (*PluginResponse) AttrNames ¶ added in v0.4.4
func (r *PluginResponse) AttrNames() []string
func (*PluginResponse) Freeze ¶ added in v0.4.4
func (r *PluginResponse) Freeze()
func (*PluginResponse) Hash ¶ added in v0.4.4
func (r *PluginResponse) Hash() (uint32, error)
func (*PluginResponse) String ¶ added in v0.4.4
func (r *PluginResponse) String() string
func (*PluginResponse) Truth ¶ added in v0.4.4
func (r *PluginResponse) Truth() starlark.Bool
func (*PluginResponse) Type ¶ added in v0.4.4
func (r *PluginResponse) Type() string
func (*PluginResponse) UnmarshalStarlarkType ¶ added in v0.4.4
func (r *PluginResponse) UnmarshalStarlarkType() (any, error)
type SSEMessage ¶
type SSEMessage struct {
// contains filtered or unexported fields
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.