extensions

package
v0.0.0-...-1dc4900 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: BSD-2-Clause Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssocRecordField

func AssocRecordField(name string) glisp.UserFunction

func Base64StringToBytes

func Base64StringToBytes(name string) glisp.UserFunction

func BytesToBase64String

func BytesToBase64String(name string) glisp.UserFunction

func ChanTxFunction

func ChanTxFunction(name string) glisp.UserFunction

func CheckIsRecord

func CheckIsRecord(name string) glisp.UserFunction

func CheckIsRecordClass

func CheckIsRecordClass(name string) glisp.UserFunction

func CheckIsRecordOf

func CheckIsRecordOf(name string) glisp.UserFunction

func ClassDefinition

func ClassDefinition(name string) glisp.UserFunction

func ComplementFunction

func ComplementFunction(name string) glisp.UserFunction

func CreateCoroutineMacro

func CreateCoroutineMacro(env *glisp.Environment, args []glisp.Sexp) (glisp.Sexp, error)

func DefineRecord

func DefineRecord(name string) glisp.UserFunction

(defrecord MyType (name type) (name2 type2) )

func DelJSONSexp

func DelJSONSexp(name string) glisp.UserFunction

func DoHTTP

func DoHTTP(withRespStatus bool) glisp.NamedUserFunction

(http/get|post|put|patch|delete OPTIONS URL)

func DoHTTPMacro

func DoHTTPMacro(withRespStatus bool) glisp.NamedUserFunction

func ExecCommand

func ExecCommand(opts *CommandOptions) glisp.NamedUserFunction

func ExplainColonMacro

func ExplainColonMacro(name string) glisp.UserFunction

func FormatInt

func FormatInt(bit int) glisp.NamedUserFunction

func GetBinaryIntFunction

func GetBinaryIntFunction(name string) glisp.UserFunction

func GetBitwiseFunction

func GetBitwiseFunction(name string) glisp.UserFunction

func GetCeilFloat

func GetCeilFloat(name string) glisp.UserFunction

func GetCompareFunction

func GetCompareFunction(name string) glisp.UserFunction

func GetComposeFunction

func GetComposeFunction(name string) glisp.UserFunction

func GetDocFunction

func GetDocFunction(name string) glisp.UserFunction

func GetExistFile

func GetExistFile(name string) glisp.UserFunction

func GetFloorFloat

func GetFloorFloat(name string) glisp.UserFunction

func GetLogicalShiftFunction

func GetLogicalShiftFunction(name string) glisp.UserFunction

func GetNumericFunction

func GetNumericFunction(name string) glisp.UserFunction

func GetOSArgs

func GetOSArgs(name string) glisp.UserFunction

func GetOpenFile

func GetOpenFile(name string) glisp.UserFunction

func GetPrintFunction

func GetPrintFunction(w io.Writer) glisp.NamedUserFunction

func GetReadFile

func GetReadFile(name string) glisp.UserFunction

func GetRecordClass

func GetRecordClass(name string) glisp.UserFunction

func GetRemoveFile

func GetRemoveFile(name string) glisp.UserFunction

func GetRoundFloat

func GetRoundFloat(name string) glisp.UserFunction

func GetSortFunction

func GetSortFunction(name string) glisp.UserFunction

func GetWriteFile

func GetWriteFile(name string) glisp.UserFunction

func Getenv

func Getenv(name string) glisp.UserFunction

func ImportAll

func ImportAll(env *glisp.Environment) error

func ImportBase64

func ImportBase64(vm *glisp.Environment) error

func ImportCSV

func ImportCSV(vm *glisp.Environment) error

func ImportChannels

func ImportChannels(vm *glisp.Environment) error

func ImportCoreUtils

func ImportCoreUtils(vm *glisp.Environment) error

func ImportCoroutines

func ImportCoroutines(env *glisp.Environment) error

func ImportHTTP

func ImportHTTP(vm *glisp.Environment) error

func ImportJSON

func ImportJSON(vm *glisp.Environment) error

func ImportMathUtils

func ImportMathUtils(vm *glisp.Environment) error

func ImportOS

func ImportOS(vm *glisp.Environment) error

func ImportRandom

func ImportRandom(vm *glisp.Environment) error

func ImportRegex

func ImportRegex(vm *glisp.Environment) error

func ImportString

func ImportString(vm *glisp.Environment) error

func ImportTime

func ImportTime(vm *glisp.Environment) error

func IntegerDo

func IntegerDo(op IntegerOp, a, b glisp.Sexp) (glisp.Sexp, error)

func IsRecord

func IsRecord(args glisp.Sexp) bool

func IsRecordClass

func IsRecordClass(args glisp.Sexp) bool

func IsRecordOf

func IsRecordOf(r glisp.Sexp, typ string) bool

func IsStream

func IsStream(expr glisp.Sexp) bool

func IsStreamFunction

func IsStreamFunction(name string) glisp.UserFunction

func IsStreamable

func IsStreamable(expr glisp.Sexp) bool

func IsStreamableFunction

func IsStreamableFunction(name string) glisp.UserFunction

func MakeChanFunction

func MakeChanFunction(name string) glisp.UserFunction

func Mkdir

func Mkdir(name string) glisp.UserFunction

func NumericDo

func NumericDo(op NumericOp, a, b glisp.Sexp) (glisp.Sexp, error)

func NumericFloatDo

func NumericFloatDo(op NumericOp, a, b glisp.SexpFloat) glisp.Sexp

func NumericIntDo

func NumericIntDo(op NumericOp, a, b glisp.SexpInt) glisp.Sexp

func NumericMatchChar

func NumericMatchChar(op NumericOp, a glisp.SexpChar, b glisp.Sexp) (glisp.Sexp, error)

func NumericMatchFloat

func NumericMatchFloat(op NumericOp, a glisp.SexpFloat, b glisp.Sexp) (glisp.Sexp, error)

func NumericMatchInt

func NumericMatchInt(op NumericOp, a glisp.SexpInt, b glisp.Sexp) (glisp.Sexp, error)

func OverrideTypeFunction

func OverrideTypeFunction(orig *glisp.SexpFunction) glisp.UserFunction

func ParseJSON

func ParseJSON(rawBytes []byte) (glisp.Sexp, error)

func ParseTime

func ParseTime(name string) glisp.UserFunction

func QueryJSONSexp

func QueryJSONSexp(name string) glisp.UserFunction

func RandomFloatFunction

func RandomFloatFunction(name string) glisp.UserFunction

func RandomIntegerFunction

func RandomIntegerFunction(name string) glisp.UserFunction

func ReadCSVFile

func ReadCSVFile(name string) glisp.UserFunction

func ReadDir

func ReadDir(name string) glisp.UserFunction

func RegexpCompile

func RegexpCompile(name string) glisp.UserFunction

func RegexpFind

func RegexpFind(name string) glisp.UserFunction

func RegexpReplace

func RegexpReplace(name string) glisp.UserFunction

func RunCommand

func RunCommand(name string) glisp.UserFunction

func SetJSONSexp

func SetJSONSexp(name string) glisp.UserFunction

func Setenv

func Setenv(name string) glisp.UserFunction

func StartCoroutineFunction

func StartCoroutineFunction(env *glisp.Environment, args []glisp.Sexp) (glisp.Sexp, error)

func StreamDropFunction

func StreamDropFunction(name string) glisp.UserFunction

func StreamFilterFunction

func StreamFilterFunction(name string) glisp.UserFunction

func StreamFlatmapFunction

func StreamFlatmapFunction(name string) glisp.UserFunction

func StreamFoldlFunction

func StreamFoldlFunction(name string) glisp.UserFunction

func StreamFunction

func StreamFunction(name string) glisp.UserFunction

func StreamMapFunction

func StreamMapFunction(name string) glisp.UserFunction

func StreamPartitionFunction

func StreamPartitionFunction(name string) glisp.UserFunction

func StreamRangeFunction

func StreamRangeFunction(name string) glisp.UserFunction

func StreamRealizeFunction

func StreamRealizeFunction(name string) glisp.UserFunction

func StreamTakeFunction

func StreamTakeFunction(name string) glisp.UserFunction

func StreamUnionFunction

func StreamUnionFunction(name string) glisp.UserFunction

func StreamZipFunction

func StreamZipFunction(name string) glisp.UserFunction

func StringBool

func StringBool(fn func(string) bool) glisp.NamedUserFunction

func StringJoin

func StringJoin(fn func([]string, string) string) glisp.NamedUserFunction

func StringMap

func StringMap(fn func(string) string) glisp.NamedUserFunction

func StringMap2

func StringMap2(fn func(string, string) string) glisp.NamedUserFunction

func StringPredict

func StringPredict(fn func(string, string) bool) glisp.NamedUserFunction

func StringRepeat

func StringRepeat(name string) glisp.UserFunction

func StringReplace

func StringReplace(name string) glisp.UserFunction

func StringSearch

func StringSearch(fn func(string, string) int) glisp.NamedUserFunction

func StringSplit

func StringSplit(name string) glisp.UserFunction

func TimeAdd

func TimeAdd(name string) glisp.UserFunction

(time/add time number uint)

func TimeAddDate

func TimeAddDate(name string) glisp.UserFunction

(time/add-date time year month day)

func TimeDayOf

func TimeDayOf(name string) glisp.UserFunction

func TimeFormatFunction

func TimeFormatFunction(fname string) glisp.UserFunction

func TimeHourOf

func TimeHourOf(name string) glisp.UserFunction

func TimeMinuteOf

func TimeMinuteOf(name string) glisp.UserFunction

func TimeMonthOf

func TimeMonthOf(name string) glisp.UserFunction

func TimeNow

func TimeNow(name string) glisp.UserFunction

func TimeSecondOf

func TimeSecondOf(name string) glisp.UserFunction

func TimeSub

func TimeSub(name string) glisp.UserFunction

TimeSub t1-t2 in seconds

func TimeWeekdayOf

func TimeWeekdayOf(name string) glisp.UserFunction

func TimeYearOf

func TimeYearOf(name string) glisp.UserFunction

func TimeZero

func TimeZero(name string) glisp.UserFunction

func WriteCSVFile

func WriteCSVFile(name string) glisp.UserFunction

Types

type ArrayIterator

type ArrayIterator struct {
	// contains filtered or unexported fields
}

func (*ArrayIterator) Next

func (iter *ArrayIterator) Next(*glisp.Environment) (glisp.Sexp, bool, error)

func (*ArrayIterator) SexpString

func (iter *ArrayIterator) SexpString() string

type AutoAddFunctionWithDoc

type AutoAddFunctionWithDoc struct {
	*glisp.Environment
}

func (*AutoAddFunctionWithDoc) AddFuzzyMacro

func (env *AutoAddFunctionWithDoc) AddFuzzyMacro(name string, function glisp.NamedUserFunction, opts ...glisp.FuntionOption)

func (*AutoAddFunctionWithDoc) AddNamedFunction

func (env *AutoAddFunctionWithDoc) AddNamedFunction(name string, function glisp.NamedUserFunction, opts ...glisp.FuntionOption)

func (*AutoAddFunctionWithDoc) AddNamedMacro

func (env *AutoAddFunctionWithDoc) AddNamedMacro(name string, function glisp.NamedUserFunction, opts ...glisp.FuntionOption)

func (*AutoAddFunctionWithDoc) OverrideFunction

func (env *AutoAddFunctionWithDoc) OverrideFunction(name string, f glisp.OverrideFunction) error

type BytesIterator

type BytesIterator struct {
	// contains filtered or unexported fields
}

func (*BytesIterator) Next

func (iter *BytesIterator) Next(*glisp.Environment) (glisp.Sexp, bool, error)

func (*BytesIterator) SexpString

func (iter *BytesIterator) SexpString() string

type CommandOptions

type CommandOptions struct {
	Stdout, Stderr io.Writer
	AssertSuccess  bool
}

type ExplainSexp

type ExplainSexp interface {
	Explain(*glisp.Environment, string, []glisp.Sexp) (glisp.Sexp, error)
}

type HashIterator

type HashIterator struct {
	// contains filtered or unexported fields
}

func (*HashIterator) Next

func (iter *HashIterator) Next(*glisp.Environment) (glisp.Sexp, bool, error)

func (*HashIterator) SexpString

func (iter *HashIterator) SexpString() string

type HttpClient

type HttpClient interface {
	Do(*http.Request) (*http.Response, error)
}

type IntegerOp

type IntegerOp int
const (
	ShiftLeftArith IntegerOp = iota
	ShiftRightArith
	ShiftLeftLogical
	ShiftRightLogical
	Modulo
	BitAnd
	BitOr
	BitXor
)

type Iterable

type Iterable interface {
	glisp.Sexp
	Next() (glisp.Sexp, bool)
}

type IterableStream

type IterableStream struct {
	// contains filtered or unexported fields
}

func (*IterableStream) Next

func (iter *IterableStream) Next(*glisp.Environment) (glisp.Sexp, bool, error)

func (*IterableStream) SexpString

func (iter *IterableStream) SexpString() string

type ListIterator

type ListIterator struct {
	// contains filtered or unexported fields
}

func (*ListIterator) Next

func (iter *ListIterator) Next(*glisp.Environment) (glisp.Sexp, bool, error)

func (*ListIterator) SexpString

func (iter *ListIterator) SexpString() string

type Namer

type Namer interface {
	Name() string
}

type NumericOp

type NumericOp int
const (
	Add NumericOp = iota
	Sub
	Mult
	Div
)

type RangeIterator

type RangeIterator struct {
	// contains filtered or unexported fields
}

func (*RangeIterator) Next

func (iter *RangeIterator) Next(*glisp.Environment) (glisp.Sexp, bool, error)

func (*RangeIterator) SexpString

func (iter *RangeIterator) SexpString() string

type RecordClassBuilder

type RecordClassBuilder struct {
	// contains filtered or unexported fields
}

func NewRecordClassBuilder

func NewRecordClassBuilder(className string) *RecordClassBuilder

func (*RecordClassBuilder) AddField

func (b *RecordClassBuilder) AddField(name string, typ string) *RecordClassBuilder

func (*RecordClassBuilder) AddFullField

func (b *RecordClassBuilder) AddFullField(name, typ, tag string, defaultValue glisp.Sexp) *RecordClassBuilder

func (*RecordClassBuilder) Build

type RecordIterator

type RecordIterator struct {
	// contains filtered or unexported fields
}

func (*RecordIterator) Next

func (iter *RecordIterator) Next(*glisp.Environment) (glisp.Sexp, bool, error)

func (*RecordIterator) SexpString

func (iter *RecordIterator) SexpString() string

type SexpChannel

type SexpChannel chan glisp.Sexp

func (SexpChannel) SexpString

func (ch SexpChannel) SexpString() string

func (SexpChannel) TypeName

func (ch SexpChannel) TypeName() string

type SexpCoroutine

type SexpCoroutine struct {
	// contains filtered or unexported fields
}

func (SexpCoroutine) SexpString

func (coro SexpCoroutine) SexpString() string

func (SexpCoroutine) TypeName

func (coro SexpCoroutine) TypeName() string

type SexpDialer

type SexpDialer func(ctx context.Context, network, addr string) (net.Conn, error)

func MakeDialer

func MakeDialer(dialer func(context.Context, string, string) (net.Conn, error)) SexpDialer

func (SexpDialer) SexpString

func (sd SexpDialer) SexpString() string

func (SexpDialer) TypeName

func (sd SexpDialer) TypeName() string

type SexpGoRecord

type SexpGoRecord struct {
	SexpRecord
}

func ToGoRecord

func ToGoRecord(r SexpRecord) *SexpGoRecord

record accessor

func (*SexpGoRecord) GetBoolField

func (r *SexpGoRecord) GetBoolField(name string) bool

func (*SexpGoRecord) GetBytesField

func (r *SexpGoRecord) GetBytesField(name string) []byte

func (*SexpGoRecord) GetHashField

func (r *SexpGoRecord) GetHashField(name string) map[string]interface{}

func (*SexpGoRecord) GetIntField

func (r *SexpGoRecord) GetIntField(name string) int64

func (*SexpGoRecord) GetListField

func (r *SexpGoRecord) GetListField(name string) (ret []interface{})

func (*SexpGoRecord) GetStringField

func (r *SexpGoRecord) GetStringField(name string) string

func (*SexpGoRecord) GetTag

func (r *SexpGoRecord) GetTag(name string) string

func (*SexpGoRecord) GetUintField

func (r *SexpGoRecord) GetUintField(name string) uint64

func (*SexpGoRecord) SetBoolField

func (r *SexpGoRecord) SetBoolField(name string, val bool) *SexpGoRecord

func (*SexpGoRecord) SetBytesField

func (r *SexpGoRecord) SetBytesField(name string, val []byte) *SexpGoRecord

func (*SexpGoRecord) SetHashField

func (r *SexpGoRecord) SetHashField(name string, val map[string]interface{}) *SexpGoRecord

func (*SexpGoRecord) SetIntField

func (r *SexpGoRecord) SetIntField(name string, val int64) *SexpGoRecord

func (*SexpGoRecord) SetListField

func (r *SexpGoRecord) SetListField(name string, val []interface{}) *SexpGoRecord

func (*SexpGoRecord) SetStringField

func (r *SexpGoRecord) SetStringField(name string, val string) *SexpGoRecord

func (*SexpGoRecord) SetUintField

func (r *SexpGoRecord) SetUintField(name string, val uint64) *SexpGoRecord

type SexpIO

type SexpIO struct {
	// contains filtered or unexported fields
}

func NewBuffer

func NewBuffer() *SexpIO

func NewIO

func NewIO(obj interface{}) *SexpIO

func (*SexpIO) Close

func (w *SexpIO) Close() error

func (*SexpIO) Explain

func (w *SexpIO) Explain(env *glisp.Environment, sym string, args []glisp.Sexp) (glisp.Sexp, error)

func (*SexpIO) Read

func (w *SexpIO) Read(p []byte) (int, error)

func (*SexpIO) SexpString

func (w *SexpIO) SexpString() string

func (*SexpIO) Stringify

func (w *SexpIO) Stringify() string

func (*SexpIO) TypeName

func (w *SexpIO) TypeName() string

func (*SexpIO) Write

func (w *SexpIO) Write(p []byte) (int, error)

type SexpRecord

type SexpRecord interface {
	glisp.Sexp
	glisp.ITypeName
	Class() SexpRecordClass
	GetField(name string) (glisp.Sexp, error)
	GetTag(name string) glisp.SexpStr
	GetFieldDefault(name string, defaultVal glisp.Sexp) glisp.Sexp
	SetField(name string, val glisp.Sexp) error
}

type SexpRecordClass

type SexpRecordClass interface {
	glisp.Sexp
	glisp.ITypeName
	MakeRecord(args []glisp.Sexp) (SexpRecord, error)
	Fields() []SexpRecordField
}

type SexpRecordField

type SexpRecordField struct {
	Name         string
	Type         string
	Tag          string
	DefaultValue glisp.Sexp
}

type SexpRegexp

type SexpRegexp struct {
	// contains filtered or unexported fields
}

func (*SexpRegexp) SexpString

func (re *SexpRegexp) SexpString() string

func (*SexpRegexp) TypeName

func (re *SexpRegexp) TypeName() string

type SexpTime

type SexpTime time.Time

func (SexpTime) Cmp

func (t SexpTime) Cmp(b glisp.Comparable) (int, error)

func (SexpTime) IsZero

func (t SexpTime) IsZero() bool

func (SexpTime) MarshalJSON

func (t SexpTime) MarshalJSON() ([]byte, error)

func (SexpTime) SexpString

func (t SexpTime) SexpString() string

func (SexpTime) TypeName

func (t SexpTime) TypeName() string

type StringIterator

type StringIterator struct {
	// contains filtered or unexported fields
}

func (*StringIterator) Next

func (iter *StringIterator) Next(*glisp.Environment) (glisp.Sexp, bool, error)

func (*StringIterator) SexpString

func (iter *StringIterator) SexpString() string

type UnionIterator

type UnionIterator struct {
	// contains filtered or unexported fields
}

func (*UnionIterator) Next

func (iter *UnionIterator) Next(env *glisp.Environment) (glisp.Sexp, bool, error)

func (*UnionIterator) SexpString

func (iter *UnionIterator) SexpString() string

type ZipListIterator

type ZipListIterator struct {
	// contains filtered or unexported fields
}

func (*ZipListIterator) Next

func (iter *ZipListIterator) Next(env *glisp.Environment) (glisp.Sexp, bool, error)

func (*ZipListIterator) SexpString

func (iter *ZipListIterator) SexpString() string

Jump to

Keyboard shortcuts

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