Documentation ¶
Index ¶
- Constants
- Variables
- func BuildTemplate(outFile string)
- func CopyDir(source string, dest string) (err error)
- func CopyFile(source string, dest string) (err error)
- func Servec(port string, host string)
- func WriteCSSAsset(outFile string, assetName string)
- func WriteHtmlTemplate(outFile string) error
- func WriteJSAsset(outFile string, assetName string)
- func WriteJSAssetAll(outFile string)
- func WriteMdSection(outFile string, sectionData interface{}, sectionName string) error
- type AssetInfo
- type AuthenticationMd
- type EntityMd
- type HeaderJson
- type IntroMd
- type Json
Constants ¶
View Source
const ( DIR = iota FILE = iota )
Variables ¶
View Source
var Build = cli.Command{ Name: "build", Aliases: []string{"b"}, Usage: "Builds the static site ready for production deployment.", Action: func(c *cli.Context) { println("Building Documentation Site...") buildc() println("Done!") }, }
View Source
var Init = cli.Command{ Name: "init", Aliases: []string{"i"}, Usage: "Create a new api doc site from the command line.", Action: func(c *cli.Context) { println("Creating new site.....", c.Args()[0]) initc(c.Args()[0], c.Args()[1]) }, }
View Source
var Pump = cli.Command{ Name: "pump", Aliases: []string{"p"}, Usage: "Serve site locally and watch for API changes.", Action: func(c *cli.Context) { println("starting server...") }, }
View Source
var Serve = cli.Command{ Name: "serve", Aliases: []string{"s"}, Usage: "Serve your site locally.", Flags: []cli.Flag{ cli.StringFlag{ Name: "o,host", Usage: "Input address for serving the site", Value: "0.0.0.0", }, cli.StringFlag{ Name: "p,port", Usage: "Input port for serving the site", Value: "8080", }, }, Action: func(c *cli.Context) { fmt.Println("Starting Server...") Servec(c.String("port"), c.String("host")) }, }
Functions ¶
func BuildTemplate ¶
func BuildTemplate(outFile string)
func CopyDir ¶
Recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist.
func WriteCSSAsset ¶
func WriteHtmlTemplate ¶
func WriteJSAsset ¶
func WriteJSAssetAll ¶
func WriteJSAssetAll(outFile string)
func WriteMdSection ¶
Types ¶
type AuthenticationMd ¶
type HeaderJson ¶
type Json ¶
type Json struct { Info struct { Description string Authentication struct { Summary string Snippets struct { C string Cpp string Erlang string Go string } Note string } Termsofservice string Contact struct { Name string URL string } License struct { Name string URL string } } Paths struct { Charges struct { Get struct { Summary string `json:"summary"` } `json:"get"` } `json:"/charges"` Refunds struct { Get struct { Summary string `json:"summary"` } `json:"get"` } `json:"/refunds"` } `json:"paths"` }
Click to show internal directories.
Click to hide internal directories.