github.com/ActiveState/cli@v0.0.0-20240508170324-6801f60cd051/pkg/platform/api/buildplanner/request/buildexpression.go (about) 1 package request 2 3 func BuildExpression(commitID string) *buildScriptByCommitID { 4 return &buildScriptByCommitID{map[string]interface{}{ 5 "commitID": commitID, 6 }} 7 } 8 9 type buildScriptByCommitID struct { 10 vars map[string]interface{} 11 } 12 13 func (b *buildScriptByCommitID) Query() string { 14 return ` 15 query ($commitID: ID!) { 16 commit(commitId: $commitID) { 17 ... on Commit { 18 __typename 19 atTime 20 expr 21 } 22 ... on Error{ 23 __typename 24 message 25 } 26 ... on NotFound { 27 __typename 28 message 29 } 30 } 31 } 32 ` 33 } 34 35 func (b *buildScriptByCommitID) Vars() (map[string]interface{}, error) { 36 return b.vars, nil 37 }