transformer

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTransformer

func NewTransformer(s data.Store) data.Transformer

Types

type Job

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

type JobQueue

type JobQueue []*Job

func (JobQueue) Len

func (pq JobQueue) Len() int

Len returns the length of the queue.

func (JobQueue) Less

func (pq JobQueue) Less(i, j int) bool

Less compares two items based on their timestamps (earlier timestamp = higher priority).

func (*JobQueue) Pop

func (pq *JobQueue) Pop() any

Pop removes the highest-priority element from the queue.

func (*JobQueue) Push

func (pq *JobQueue) Push(x any)

Push adds an element to the queue.

func (JobQueue) Swap

func (pq JobQueue) Swap(i, j int)

Swap swaps the elements at the specified indices.

func (*JobQueue) Update

func (pq *JobQueue) Update(job *Job, task *tengo.UserFunction, deadline time.Time)

update modifies the timestamp and value of an Item in the queue.

type TengoEntity

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

func NewTengoEntity

func NewTengoEntity(s data.Store, e data.Entity) *TengoEntity

func (*TengoEntity) GetChildrenIds

func (te *TengoEntity) GetChildrenIds(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoEntity) GetField

func (te *TengoEntity) GetField(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoEntity) GetId

func (te *TengoEntity) GetId(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoEntity) GetParentId

func (te *TengoEntity) GetParentId(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoEntity) GetType

func (te *TengoEntity) GetType(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoEntity) ToTengoMap

func (te *TengoEntity) ToTengoMap(ctx context.Context) tengo.Object

type TengoField

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

func NewTengoField

func NewTengoField(b data.FieldBinding) *TengoField

func (*TengoField) GetBinaryFile

func (tf *TengoField) GetBinaryFile(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) GetBool

func (tf *TengoField) GetBool(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) GetEntityId

func (tf *TengoField) GetEntityId(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) GetEntityReference

func (tf *TengoField) GetEntityReference(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) GetFieldName

func (tf *TengoField) GetFieldName(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) GetFloat

func (tf *TengoField) GetFloat(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) GetInt

func (tf *TengoField) GetInt(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) GetString

func (tf *TengoField) GetString(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) GetTimestamp

func (tf *TengoField) GetTimestamp(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) GetWriteTime

func (tf *TengoField) GetWriteTime(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) GetWriter

func (tf *TengoField) GetWriter(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) ReadBinaryFile

func (tf *TengoField) ReadBinaryFile(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) ReadBool

func (tf *TengoField) ReadBool(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) ReadEntityReference

func (tf *TengoField) ReadEntityReference(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) ReadFloat

func (tf *TengoField) ReadFloat(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) ReadInt

func (tf *TengoField) ReadInt(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) ReadString

func (tf *TengoField) ReadString(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) ReadTimestamp

func (tf *TengoField) ReadTimestamp(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) ToTengoMap

func (tf *TengoField) ToTengoMap(ctx context.Context) tengo.Object

func (*TengoField) WriteBinaryFile

func (tf *TengoField) WriteBinaryFile(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) WriteBool

func (tf *TengoField) WriteBool(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) WriteEntityReference

func (tf *TengoField) WriteEntityReference(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) WriteFloat

func (tf *TengoField) WriteFloat(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) WriteInt

func (tf *TengoField) WriteInt(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) WriteString

func (tf *TengoField) WriteString(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoField) WriteTimestamp

func (tf *TengoField) WriteTimestamp(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

type TengoMulti added in v0.0.9

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

func NewTengoMulti added in v0.0.9

func NewTengoMulti(m data.MultiBinding) *TengoMulti

func (*TengoMulti) Commit added in v0.0.9

func (tm *TengoMulti) Commit(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoMulti) GetEntity added in v0.0.9

func (tm *TengoMulti) GetEntity(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoMulti) ToTengoMap added in v0.0.9

func (tm *TengoMulti) ToTengoMap(ctx context.Context) tengo.Object

type TengoStore

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

func NewTengoStore

func NewTengoStore(s data.Store) *TengoStore

func (*TengoStore) GetEntity

func (ts *TengoStore) GetEntity(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoStore) GetMulti added in v0.0.9

func (ts *TengoStore) GetMulti(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

Add this new method

func (*TengoStore) PopAvailableJobs

func (ts *TengoStore) PopAvailableJobs() []*Job

func (*TengoStore) Query

func (ts *TengoStore) Query(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoStore) Schedule

func (ts *TengoStore) Schedule(ctx context.Context, args ...tengo.Object) (tengo.Object, error)

func (*TengoStore) ToTengoMap

func (ts *TengoStore) ToTengoMap(ctx context.Context) tengo.Object

type Transformer

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

func (*Transformer) ProcessPending

func (t *Transformer) ProcessPending()

func (*Transformer) Transform

func (t *Transformer) Transform(ctx context.Context, src string, req data.Request)

Jump to

Keyboard shortcuts

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