qri: github.com/qri-io/qri/startf/qri Index | Files

package qri

import "github.com/qri-io/qri/startf/qri"


Package Files

entry_writer.go qri.go


const ModuleName = "qri.star"

ModuleName defines the expected name for this module when used in starlark's load() function, eg: load('qri.star', 'qri')

type Module Uses

type Module struct {
    // contains filtered or unexported fields

Module encapsulates state for a qri starlark module

func NewModule Uses

func NewModule(repo repo.Repo) *Module

NewModule creates a new qri module instance

func (*Module) AddAllMethods Uses

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 Uses

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 Uses

func (m *Module) Namespace() starlark.StringDict

Namespace produces this module's exported namespace

func (*Module) Struct Uses

func (m *Module) Struct() *starlarkstruct.Struct

Struct returns this module's methods as a starlark Struct

type StarlarkEntryWriter Uses

type StarlarkEntryWriter struct {
    IsDict bool
    Struct *dataset.Structure
    Object starlark.Value

StarlarkEntryWriter creates a starlark.Value as an EntryWriter

func NewStarlarkEntryWriter Uses

func NewStarlarkEntryWriter(st *dataset.Structure) (*StarlarkEntryWriter, error)

NewStarlarkEntryWriter returns a new StarlarkEntryWriter

func (*StarlarkEntryWriter) Close Uses

func (w *StarlarkEntryWriter) Close() error

Close is a no-op

func (*StarlarkEntryWriter) Structure Uses

func (w *StarlarkEntryWriter) Structure() *dataset.Structure

Structure returns the EntryWriter's dataset structure

func (*StarlarkEntryWriter) Value Uses

func (w *StarlarkEntryWriter) Value() starlark.Value

Value returns the underlying starlark.Value

func (*StarlarkEntryWriter) WriteEntry Uses

func (w *StarlarkEntryWriter) WriteEntry(ent dsio.Entry) error

WriteEntry adds an entry to the underlying starlark.Value

Package qri imports 8 packages (graph) and is imported by 1 packages. Updated 2019-10-25. Refresh now. Tools for package owners.