Documentation ¶
Index ¶
- Constants
- type Context
- func (ctx *Context) AddTask(name string, task task.Task)
- func (ctx *Context) CreateScope(statements []parser.Statement) IContext
- func (ctx *Context) GetContextFlag() int
- func (ctx *Context) GetLastStatus() int
- func (ctx *Context) GetLocalSession() session.ISession
- func (ctx *Context) GetPhase() int
- func (ctx *Context) GetRemoteSession() session.ISession
- func (ctx *Context) GetStatements() []parser.Statement
- func (ctx *Context) GetTask(name *string) *task.Task
- func (ctx *Context) GetVar(name string) value.IValueObject
- func (ctx *Context) SetLastStatus(status int)
- func (ctx *Context) SetPhase(phase int)
- func (ctx *Context) SetSession(remote session.ISession, local session.ISession)
- func (ctx *Context) SetVar(name string, value value.IValueObject)
- type IContext
- type ScopedContext
- func (ctx *ScopedContext) CreateScope(statements []parser.Statement) IContext
- func (ctx *ScopedContext) GetContextFlag() int
- func (ctx *ScopedContext) GetLastStatus() int
- func (ctx *ScopedContext) GetLocalSession() session.ISession
- func (ctx *ScopedContext) GetPhase() int
- func (ctx *ScopedContext) GetRemoteSession() session.ISession
- func (ctx *ScopedContext) GetStatements() []parser.Statement
- func (ctx *ScopedContext) GetTask(name *string) *task.Task
- func (ctx *ScopedContext) GetVar(name string) value.IValueObject
- func (ctx *ScopedContext) SetLastStatus(status int)
- func (ctx *ScopedContext) SetPhase(phase int)
- func (ctx *ScopedContext) SetSession(remote session.ISession, local session.ISession)
- func (ctx *ScopedContext) SetVar(name string, value value.IValueObject)
Constants ¶
View Source
const CONTEXT_COMPILATION = 1 << 1
View Source
const CONTEXT_GLOBAL = 1 << 0
View Source
const CONTEXT_STATUS_ERROR = 1
View Source
const CONTEXT_STATUS_PENDING = -1
View Source
const CONTEXT_STATUS_SUCCESS = 0
View Source
const CONTEXT_TASK = 1 << 2
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Statements []parser.Statement Variables map[string]value.IValueObject Tasks map[string]task.Task // contains filtered or unexported fields }
Context is global context, use for global variable declarations
func NewContext ¶
func (*Context) CreateScope ¶
func (*Context) GetContextFlag ¶
func (*Context) GetLastStatus ¶
func (*Context) GetLocalSession ¶
func (*Context) GetRemoteSession ¶
func (*Context) GetStatements ¶
func (*Context) SetLastStatus ¶
func (*Context) SetSession ¶
type IContext ¶
type IContext interface { SetVar(name string, value value.IValueObject) GetVar(name string) value.IValueObject SetPhase(phase int) GetPhase() int GetContextFlag() int GetStatements() []parser.Statement GetTask(name *string) *task.Task CreateScope(statements []parser.Statement) IContext SetSession(remote session.ISession, local session.ISession) GetRemoteSession() session.ISession GetLocalSession() session.ISession SetLastStatus(status int) GetLastStatus() int }
type ScopedContext ¶
type ScopedContext struct { Statements []parser.Statement Variables map[string]value.IValueObject Tasks *map[string]task.Task // contains filtered or unexported fields }
ScopedContext is scoped context, use for in-task variable declarations
func (*ScopedContext) CreateScope ¶
func (ctx *ScopedContext) CreateScope(statements []parser.Statement) IContext
func (*ScopedContext) GetContextFlag ¶
func (ctx *ScopedContext) GetContextFlag() int
func (*ScopedContext) GetLastStatus ¶
func (ctx *ScopedContext) GetLastStatus() int
func (*ScopedContext) GetLocalSession ¶
func (ctx *ScopedContext) GetLocalSession() session.ISession
func (*ScopedContext) GetPhase ¶
func (ctx *ScopedContext) GetPhase() int
func (*ScopedContext) GetRemoteSession ¶
func (ctx *ScopedContext) GetRemoteSession() session.ISession
func (*ScopedContext) GetStatements ¶
func (ctx *ScopedContext) GetStatements() []parser.Statement
func (*ScopedContext) GetVar ¶
func (ctx *ScopedContext) GetVar(name string) value.IValueObject
func (*ScopedContext) SetLastStatus ¶
func (ctx *ScopedContext) SetLastStatus(status int)
func (*ScopedContext) SetPhase ¶
func (ctx *ScopedContext) SetPhase(phase int)
func (*ScopedContext) SetSession ¶
func (ctx *ScopedContext) SetSession(remote session.ISession, local session.ISession)
func (*ScopedContext) SetVar ¶
func (ctx *ScopedContext) SetVar(name string, value value.IValueObject)
Click to show internal directories.
Click to hide internal directories.