Documentation ¶
Index ¶
- Constants
- Variables
- func AskForConfirmation() bool
- func BytesToString(b []byte) string
- func CheckFile(source string) (file, line, reason string)
- func Config() (*gos, error)
- func CopyDir(source string, dest string) (err error)
- func CopyFile(source string, dest string) (err error)
- func Decode64(decBuf, enc []byte) []byte
- func DoSpin(chn chan int)
- func DoubleInput(p1 string, p2 string) (r1 string, r2 string)
- func EscpaseGXML(data []byte) []byte
- func Exe_BG(cmd string)
- func Exe_Stall(cmd string, chn chan bool)
- func Exe_Stalll(cmd string)
- func IsInImports(imports []*ast.ImportSpec, unfoundvar string) bool
- func IsInSlice(qry string, slic []string) bool
- func LoadGos(pathraw string) (*gos, error)
- func NewID(length int) string
- func NewLen(length int) string
- func NewLenChars(length int, chars []byte) string
- func PLoadGos(pathraw string) (*gos, error)
- func Process(template *gos, r string, web string, tmpl string) (local_string string)
- func ReadLines(path string) ([]string, error)
- func RemoveContents(dir string) error
- func ReplaceLegacy(source, target, newExpr string) string
- func RunCmd(cmd string)
- func RunCmdA(cm string) error
- func RunCmdB(cmd string)
- func RunCmdByte(cmd string) []byte
- func RunCmdSmart(cmd string) (string, error)
- func RunCmdSmartB(cmd string) ([]byte, error)
- func RunCmdSmartCmb(cmd string) (string, error)
- func RunCmdSmartP(cmd string) (string, error)
- func RunCmdSmartZ(cmd string) (string, error)
- func RunCmdSmarttwo(cmd string) (string, error)
- func RunCmdString(cmd string) string
- func RunFile(root string, file string)
- func TrimSuffix(s, suffix string) string
- func VLoadGos(pathraw string) (gos, error)
- type CustomError
- type Endpoint
- type Endpoints
- type GlobalVariables
- type Header
- type Import
- type Method
- type Methods
- type Object
- type Package
- type Pgos
- func (d *Pgos) Add(sec, typ, name string)
- func (d *Pgos) AddS(sec string, typ interface{})
- func (template *Pgos) AddToMainFunc(str string) error
- func (d *Pgos) Delete(typ, id string)
- func (d *Pgos) DeleteEnd(id string)
- func (d *Pgos) MMethod(ne []Method)
- func (d *Pgos) MObjects(ne []Object)
- func (d *Pgos) MStructs(ne []Struct)
- func (d *Pgos) MergeWith(target string)
- func (d *Pgos) MergeWithV(target string)
- func (d *Pgos) PSaveGos(path string)
- func (d *Pgos) Set(attr, value string)
- func (d *Pgos) Update(sec, id string, update interface{})
- func (d *Pgos) UpdateMethod(id string, data string)
- type Struct
- type Template
- type Templates
- type Timer
- type Timers
- type VGos
Constants ¶
View Source
const ( StdLen = 16 UUIDLen = 20 )
Variables ¶
View Source
var AMP = "&"
View Source
var DAMP = "&&"
View Source
var GOHOME = os.ExpandEnv("$GOPATH") + "/src/"
View Source
var StdChars = []byte("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
View Source
var StdNums = []byte("OYZ0123456789")
Functions ¶
func AskForConfirmation ¶
func AskForConfirmation() bool
func BytesToString ¶
func CopyDir ¶
updates Recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist.
func EscpaseGXML ¶ added in v0.5.4
func Exe_Stalll ¶
func Exe_Stalll(cmd string)
func IsInImports ¶
func IsInImports(imports []*ast.ImportSpec, unfoundvar string) bool
func NewLenChars ¶
NewLenChars returns a new random string of the provided length, consisting of the provided byte slice of allowed characters (maximum 256).
func RemoveContents ¶
func ReplaceLegacy ¶ added in v0.6.1
func RunCmdByte ¶
func RunCmdSmart ¶
func RunCmdSmartB ¶
func RunCmdSmartCmb ¶
func RunCmdSmartP ¶
func RunCmdSmartZ ¶
func RunCmdSmarttwo ¶
func RunCmdString ¶
func TrimSuffix ¶
Types ¶
type CustomError ¶
type CustomError struct {
What string
}
A struct for returning custom error messages
func (*CustomError) Error ¶
func (e *CustomError) Error() string
Returns the error message defined in What as a string
type Endpoint ¶
type Endpoint struct { XMLName xml.Name `xml:"end"` // User-entered endpoint URI. Path string `xml:"path,attr"` // Code block to run on URI load. Method string `xml:",innerxml"` // User-entered endpoint request verb type. // If a URI matches a request but the verb does not // the endpoint will not load. Type string `xml:"type,attr"` Testi string `xml:"testi,attr"` Testo string `xml:"testo,attr"` Id string `xml:"id,attr"` Comment xml.Comment `xml:",comment"` }
func GetEndpointComment ¶ added in v0.6.1
type Endpoints ¶
type Endpoints struct { XMLName xml.Name `xml:"endpoints"` // Array of Web service URIs. Endpoints []Endpoint `xml:"end"` }
Webservice endpoints.
type GlobalVariables ¶
type Method ¶
type Method struct { XMLName xml.Name `xml:"method"` Method string `xml:",innerxml"` Comment xml.Comment `xml:",comment"` Name string `xml:"name,attr"` Variables string `xml:"var,attr"` Limit string `xml:"limit,attr"` Object string `xml:"object,attr"` Autoface string `xml:"autoface,attr"` Keeplocal string `xml:"keep-local,attr"` Testi string `xml:"testi,attr"` Testo string `xml:"testo,attr"` Man string `xml:"m,attr"` Returntype string `xml:"return,attr"` }
type Pgos ¶
type Pgos struct {
// contains filtered or unexported fields
}
func (*Pgos) AddToMainFunc ¶ added in v0.5.7
func (*Pgos) MergeWithV ¶ added in v0.5.7
func (d *Pgos) MergeWithV(target string)
func (*Pgos) UpdateMethod ¶ added in v0.5.7
type Template ¶
type Template struct { XMLName xml.Name `xml:"template"` // User-entered template identifier. Name string `xml:"name,attr"` // Template file relative to tmpl folder, // without .tmpl suffix as well. TemplateFile string `xml:"tmpl,attr"` // Bundle string `xml:"bundle,attr"` // Interface to use with template. Struct string `xml:"struct,attr"` ForcePath bool Comment xml.Comment `xml:",comment"` }
func GetTemplateComment ¶ added in v0.6.1
Click to show internal directories.
Click to hide internal directories.