library

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Base = rbxmk.Library{
	Name:       "base",
	ImportedAs: "",
	Open:       openBase,
	Dump:       dumpBase,
}
View Source
var Clipboard = rbxmk.Library{
	Name:       "clipboard",
	ImportedAs: "clipboard",
	Open:       openClipboard,
	Dump:       dumpClipboard,
	Types: []func() rbxmk.Reflector{
		reflect.FormatSelector,
		reflect.Variant,
	},
}
View Source
var FS = rbxmk.Library{
	Name:       "fs",
	ImportedAs: "fs",
	Open:       openFS,
	Dump:       dumpFS,
	Types: []func() rbxmk.Reflector{
		reflect.Bool,
		reflect.FormatSelector,
		reflect.String,
		reflect.Variant,
	},
}
View Source
var HTTP = rbxmk.Library{
	Name:       "http",
	ImportedAs: "http",
	Open:       openHTTP,
	Dump:       dumpHTTP,
	Types: []func() rbxmk.Reflector{
		reflect.HTTPHeaders,
		reflect.HTTPOptions,
		reflect.HTTPRequest,
		reflect.HTTPResponse,
	},
}
View Source
var Math = rbxmk.Library{
	Name:       "math",
	ImportedAs: "math",
	Open:       openMath,
	Dump:       dumpMath,
}
View Source
var OS = rbxmk.Library{
	Name:       "os",
	ImportedAs: "os",
	Open:       openOS,
	Dump:       dumpOS,
}
View Source
var Path = rbxmk.Library{
	Name:       "path",
	ImportedAs: "path",
	Open:       openPath,
	Dump:       dumpPath,
}
View Source
var RBXAssetID = rbxmk.Library{
	Name:       "rbxassetid",
	ImportedAs: "rbxassetid",
	Open:       openRBXAssetID,
	Dump:       dumpRBXAssetID,
	Types: []func() rbxmk.Reflector{
		reflect.RBXAssetOptions,
	},
}
View Source
var RBXMK = rbxmk.Library{
	Name:       "rbxmk",
	ImportedAs: "rbxmk",
	Open:       openRBXMK,
	Dump:       dumpRBXMK,
	Types: []func() rbxmk.Reflector{
		reflect.AttrConfig,
		reflect.Enums,
		reflect.FormatSelector,
		reflect.Nil,
		reflect.RootDesc,
		reflect.String,
		reflect.Symbol,
		reflect.Table,
	},
}
View Source
var String = rbxmk.Library{
	Name:       "string",
	ImportedAs: "string",
	Open:       openString,
	Dump:       dumpString,
}
View Source
var Sym = rbxmk.Library{
	Name:       "sym",
	ImportedAs: "sym",
	Open:       openSym,
	Dump:       dumpSym,
	Types: []func() rbxmk.Reflector{
		reflect.Symbol,
	},
}
View Source
var Table = rbxmk.Library{
	Name:       "table",
	ImportedAs: "table",
	Open:       openTable,
	Dump:       dumpTable,
}
View Source
var Types = rbxmk.Library{
	Name:       "types",
	ImportedAs: "types",
	Open:       openTypes,
	Dump:       dumpTypes,
}

Functions

func All

func All() []rbxmk.Library

All returns a list of Libraries defined in the package, ordered by ascending priority.

Types

type ClipboardSource added in v0.6.0

type ClipboardSource struct {
	*rbxmk.World
}

ClipboardSource provides access to the clipboard of the operating system.

func (ClipboardSource) Read added in v0.6.0

func (s ClipboardSource) Read(formats ...rtypes.FormatSelector) (v types.Value, err error)

Read reads a value from the clipboard according to the given formats. If no formats are given, or no data is found, then nil is returned with no error.

func (ClipboardSource) Write added in v0.6.0

func (s ClipboardSource) Write(value types.Value, formats ...rtypes.FormatSelector) error

Write writes a value to the clipboard according to the given formats. If no formats are given, then the clipboard is cleared.

type FSSource added in v0.6.0

type FSSource struct {
	*rbxmk.World
}

FSSource provides access to the file system.

func (FSSource) Dir added in v0.6.0

func (s FSSource) Dir(dirname string) (files []fs.DirEntry, err error)

Dir returns a list of files in the given directory.

func (FSSource) MkDir added in v0.6.0

func (s FSSource) MkDir(path string, all bool) (ok bool, err error)

MkDir creates a new directory.

func (FSSource) Read added in v0.6.0

func (s FSSource) Read(filename string, selector rtypes.FormatSelector) (v types.Value, err error)

Read reads the content of a file.

func (FSSource) Remove added in v0.6.0

func (s FSSource) Remove(path string, all bool) (ok bool, err error)

Remove removes a file or directory.

func (FSSource) Rename added in v0.6.0

func (s FSSource) Rename(from, to string) (ok bool, err error)

Rename moves a file or directory.

func (FSSource) Stat added in v0.6.0

func (s FSSource) Stat(filename string) (info fs.FileInfo, err error)

Stat gets metadata of the given file.

func (FSSource) Write added in v0.6.0

func (s FSSource) Write(filename string, value types.Value, selector rtypes.FormatSelector) error

Write writes a value to a file.

type RBXAssetIDSource added in v0.6.0

type RBXAssetIDSource struct {
	*rbxmk.World
}

RBXAssetIDSource provides access to assets on the Roblox website.

func (RBXAssetIDSource) Create added in v0.6.0

func (s RBXAssetIDSource) Create(options rtypes.RBXAssetOptions) (assetID int64, err error)

Create creates and uploads a new asset according to the given options. Returns the ID of the created asset.

func (RBXAssetIDSource) Read added in v0.6.0

func (s RBXAssetIDSource) Read(options rtypes.RBXAssetOptions) (body types.Value, err error)

Read downloads an asset according to the given options.

func (RBXAssetIDSource) Write added in v0.6.0

func (s RBXAssetIDSource) Write(options rtypes.RBXAssetOptions) error

Write uploads an asset according to the given options.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL