Documentation ¶
Index ¶
Constants ¶
const ModuleName = "qri.star"
ModuleName defines the expected name for this module when used in starlark's load() function, eg: load('qri.star', 'qri')
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module encapsulates state for a qri starlark module
func (*Module) AddAllMethods ¶
func (m *Module) AddAllMethods(sd starlark.StringDict) starlark.StringDict
AddAllMethods augments a starlark.StringDict with all qri builtins. Should really only be used during "transform" step
func (*Module) ListDatasets ¶
func (m *Module) ListDatasets(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)
ListDatasets shows current local datasets
func (*Module) Namespace ¶
func (m *Module) Namespace() starlark.StringDict
Namespace produces this module's exported namespace
func (*Module) Struct ¶
func (m *Module) Struct() *starlarkstruct.Struct
Struct returns this module's methods as a starlark Struct
type StarlarkEntryWriter ¶ added in v0.2.0
StarlarkEntryWriter creates a starlark.Value as an EntryWriter
func NewStarlarkEntryWriter ¶ added in v0.2.0
func NewStarlarkEntryWriter(st *dataset.Structure) (*StarlarkEntryWriter, error)
NewStarlarkEntryWriter returns a new StarlarkEntryWriter
func (*StarlarkEntryWriter) Close ¶ added in v0.2.0
func (w *StarlarkEntryWriter) Close() error
Close is a no-op
func (*StarlarkEntryWriter) Structure ¶ added in v0.2.0
func (w *StarlarkEntryWriter) Structure() *dataset.Structure
Structure returns the EntryWriter's dataset structure
func (*StarlarkEntryWriter) Value ¶ added in v0.2.0
func (w *StarlarkEntryWriter) Value() starlark.Value
Value returns the underlying starlark.Value
func (*StarlarkEntryWriter) WriteEntry ¶ added in v0.2.0
func (w *StarlarkEntryWriter) WriteEntry(ent dsio.Entry) error
WriteEntry adds an entry to the underlying starlark.Value