Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBuildscriptNotExist = errors.New("Build script does not exist")
Functions ¶
func Initialize ¶
func Initialize(path string, auth *authentication.Auth) error
func Update ¶
func Update(proj projecter, atTime *strfmt.DateTime, newExpr *buildexpression.BuildExpression) error
Types ¶
type Assignment ¶
func (*Assignment) MarshalJSON ¶
func (a *Assignment) MarshalJSON() ([]byte, error)
type FuncCall ¶
type FuncCall struct { Name string `parser:"@Ident"` Arguments []*Value `parser:"'(' @@ (',' @@)* ','? ')'"` }
func (*FuncCall) MarshalJSON ¶
type Script ¶
type Script struct { Assignments []*Assignment `parser:"@@+"` AtTime *strfmt.DateTime Expr *buildexpression.BuildExpression }
Script's tagged fields will be initially filled in by Participle. expr will be constructed later and is this script's buildexpression. We keep a copy of the build expression here with any changes that have been applied before either writing it to disk or submitting it to the build planner. It's easier to operate on build expressions directly than to modify or manually populate the Participle-produced fields and re-generate a build expression.
func NewFromBuildExpression ¶
func NewFromBuildExpression(atTime *strfmt.DateTime, expr *buildexpression.BuildExpression) (*Script, error)
func ScriptFromFile ¶
func ScriptFromProject ¶
func (*Script) MarshalJSON ¶
MarshalJSON marshals the Participle-produced Script into an equivalent buildexpression. Users of buildscripts do not need to do this manually; the Expr field contains the equivalent buildexpression.
type Value ¶
type Value struct { FuncCall *FuncCall `parser:"@@"` List *[]*Value `parser:"| '[' (@@ (',' @@)* ','?)? ']'"` Str *string `parser:"| @String"` Number *float64 `parser:"| (@Float | @Int)"` Null *Null `parser:"| @@"` Assignment *Assignment `parser:"| @@"` // only in FuncCall Object *[]*Assignment `parser:"| '{' @@ (',' @@)* ','? '}'"` // only in List Ident *string `parser:"| @Ident"` // only in FuncCall or Assignment }
func (*Value) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.