Documentation ¶
Index ¶
- Constants
- Variables
- func Clone(ctx Context, version string, cfg CloneConfig) error
- func ConvertTime(v string) (string, error)
- func CreateVariable(v string) string
- func Fetch[T any](ctx Context, url string) (*T, error)
- func HasVersion(ver string) bool
- func IsFile(v string) bool
- func IsTimeExpression(v string) bool
- func IsVariable(v string) bool
- func Json(v any, indent ...string) string
- func ParseFile[T any](fpath string) (*T, error)
- func ParseTime(v string) (time.Time, error)
- func ParseValue(typ micheline.OpCode, value string) (any, error)
- func ReadJsonFile[T any](name string) (*T, error)
- func RegisterEngine(ver string, v EngineFactory)
- func Run(ctx Context, fpath string, mode RunMode) error
- type Account
- type CloneConfig
- type CloneMode
- type Context
- func (c *Context) AddAccount(acc Account)
- func (c *Context) AddVariable(key, val string)
- func (c *Context) Cache() *PipelineCache
- func (c Context) Fetch(u string, v any) error
- func (c Context) Filepath() string
- func (c *Context) HeadBlock() *rpc.BlockHeaderLogEntry
- func (c *Context) Init() (err error)
- func (c *Context) MakeAccount(id int, alias string) (Account, error)
- func (c *Context) Params() *tezos.Params
- func (c *Context) ResolveAddress(val any) (a tezos.Address, err error)
- func (c *Context) ResolveInt64(val any) (i int64, err error)
- func (c Context) ResolveNestedVars(src string) (string, bool)
- func (c *Context) ResolvePrivateKey(val any) (sk tezos.PrivateKey, err error)
- func (c *Context) ResolveScript(addr tezos.Address) (*micheline.Script, error)
- func (c *Context) ResolveString(val any) (string, error)
- func (c *Context) ResolveZ(val any) (z tezos.Z, err error)
- func (c *Context) RestoreLogger()
- func (c *Context) Send(op *codec.Op, opts *rpc.CallOptions) (*rpc.Receipt, error)
- func (c Context) ShouldResume() bool
- func (c *Context) SubscribeBlocks(cb rpc.ObserverCallback) (int, error)
- func (c *Context) SwitchLogger(tag, lvl string)
- func (c *Context) UnsubscribeBlocks(id int) error
- func (c *Context) WaitNumBlocks(n int) error
- func (c *Context) WithApiKey(k string) *Context
- func (c *Context) WithBase(k string) *Context
- func (c *Context) WithLogger(l log.Logger) *Context
- func (c *Context) WithMode(m RunMode) *Context
- func (c *Context) WithPath(p string) *Context
- func (c *Context) WithResume(b bool) *Context
- func (c *Context) WithUrl(u string) *Context
- type Engine
- type EngineFactory
- type Op
- type PipelineCache
- type RunMode
- type Spec
Constants ¶
View Source
const ( VAR_PREFIX = "$" FILE_PREFIX = "@" TIME_PREFIX = "$now" )
Variables ¶
View Source
var ( ErrNoVersion = errors.New("missing engine version") ErrInvalidVersion = errors.New("unsupported engine version") ErrNoPipeline = errors.New("missing pipeline definition") ErrNoBaseKey = errors.New("missing base account key, set with TZCOMPOSE_BASE_KEY") ErrNoAccount = errors.New("missing account") ErrNoAccountName = errors.New("emoty account name") ErrNoPipelineName = errors.New("empty pipeline name") ErrNoTaskType = errors.New("missing task type") ErrSkip = errors.New("skip task") )
View Source
var NESTED_VAR = regexp.MustCompile(`\$[a-zA-Z0-9_-]+`)
Functions ¶
func ConvertTime ¶
func CreateVariable ¶
func HasVersion ¶
func IsTimeExpression ¶
func IsVariable ¶
func ReadJsonFile ¶
func RegisterEngine ¶
func RegisterEngine(ver string, v EngineFactory)
Types ¶
type CloneConfig ¶
type Context ¶
type Context struct { context.Context BaseAccount Account MaxId int Accounts map[tezos.Address]Account Contracts map[tezos.Address]*micheline.Script Variables map[string]string Log log.Logger // contains filtered or unexported fields }
func NewContext ¶
func (*Context) AddAccount ¶
func (*Context) AddVariable ¶
func (*Context) Cache ¶
func (c *Context) Cache() *PipelineCache
func (*Context) HeadBlock ¶
func (c *Context) HeadBlock() *rpc.BlockHeaderLogEntry
func (*Context) ResolveAddress ¶
func (*Context) ResolvePrivateKey ¶
func (c *Context) ResolvePrivateKey(val any) (sk tezos.PrivateKey, err error)
func (*Context) ResolveScript ¶
func (*Context) RestoreLogger ¶
func (c *Context) RestoreLogger()
func (Context) ShouldResume ¶
func (*Context) SubscribeBlocks ¶
func (c *Context) SubscribeBlocks(cb rpc.ObserverCallback) (int, error)
func (*Context) SwitchLogger ¶
func (*Context) UnsubscribeBlocks ¶
func (*Context) WaitNumBlocks ¶
func (*Context) WithApiKey ¶
func (*Context) WithResume ¶
type Engine ¶
type EngineFactory ¶
type EngineFactory func() Engine
type Op ¶
type Op struct { Type string `json:"type"` Hash string `json:"hash"` Height int `json:"height"` OpP int `json:"op_p"` OpC int `json:"op_c"` OpI int `json:"op_i"` IsInternal bool `json:"is_internal"` Sender string `json:"sender"` Receiver string `json:"receiver"` Amount float64 `json:"volume"` Script *micheline.Script `json:"script"` Params *struct { Entrypoint string `json:"entrypoint"` Prim micheline.Prim `json:"prim"` } `json:"parameters"` // processed Url string `json:"-"` PackedCode string `json:"-"` PackedStorage string `json:"-"` PackedParams string `json:"-"` Args any `json:"-"` }
type PipelineCache ¶
type PipelineCache struct {
// contains filtered or unexported fields
}
func NewCache ¶
func NewCache() *PipelineCache
func (PipelineCache) Get ¶
func (c PipelineCache) Get() int
func (*PipelineCache) Update ¶
func (c *PipelineCache) Update(idx int) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.