Documentation ¶
Index ¶
- Constants
- Variables
- func AddComplexType(dataType *Type)
- func CombineMethods(baseMethods map[string]Method, subclassMethods map[string]Method) map[string]Method
- func ConvertType(args ...interface{}) string
- func CreateGetters(service *Type)
- func Desnake(args ...interface{}) string
- func Execute() error
- func FixDatatype(t *Type, meta map[string]Type)
- func FixReturnType(service *Type)
- func GenerateAPI(metaPath string, outputDir string)
- func GetBaseMethods(s Type, typeMap map[string]Type) map[string]Method
- func GetMetaFromFile(file string) ([]byte, error)
- func GetMetaFromURL(url string) ([]byte, error)
- func GetSortedKeys(m map[string]Type) []string
- func GoDoc(args ...interface{}) string
- func NilParam(params []Parameter) string
- func RemovePrefix(args ...interface{}) string
- func RemoveReservedWords(args ...interface{}) string
- func Tags(args ...interface{}) string
- func WriteGoFile(base string, pkg string, name string, meta []Type, ts string) error
- func WritePackage(base string, pkg string, meta []Type, ts string) error
- type Method
- type Parameter
- type Property
- type Type
Constants ¶
View Source
const SoftLayerMetadataAPIURL = "https://api.softlayer.com/metadata/v3.1"
Variables ¶
View Source
var IterTemplate = `` /* 1092-byte string literal not displayed */
Not Used, but could be added to the Service template if you want ALL methods that accept a resultLimit to page through results
Functions ¶
func AddComplexType ¶
func AddComplexType(dataType *Type)
Special case for ensuring we can set a complexType on product orders.
func CombineMethods ¶
func ConvertType ¶
func ConvertType(args ...interface{}) string
ConvertType takes the name of the type to convert, and the package context.
func CreateGetters ¶
func CreateGetters(service *Type)
func FixDatatype ¶
Special case for fixing some datatype properties in the metadata so that these properties can be set in their base
func FixReturnType ¶
func FixReturnType(service *Type)
Special case for fixing some broken return types in the metadata
func GenerateAPI ¶
func GetMetaFromFile ¶
func GetMetaFromURL ¶
func GetSortedKeys ¶
func GoDoc ¶
func GoDoc(args ...interface{}) string
Formats a string into a comment. For now, just each comment line with "//"
func RemovePrefix ¶
func RemovePrefix(args ...interface{}) string
func RemoveReservedWords ¶
func RemoveReservedWords(args ...interface{}) string
func WriteGoFile ¶
Executes a template against the metadata structure, and generates a go source file with the result
Types ¶
type Method ¶
type Method struct { Name string `json:"name"` Type string `json:"type"` TypeArray bool `json:"typeArray"` Doc string `json:"doc"` Static bool `json:"static"` NoAuth bool `json:"noauth"` Limitable bool `json:"limitable"` Filterable bool `json:"filterable"` Maskable bool `json:"maskable"` Parameters []Parameter `json:"parameters"` Overview string `json:"docOverview"` Deprecated bool `json:"deprecated"` }
type Type ¶
type Type struct { Name string `json:"name"` Base string `json:"base"` TypeDoc string `json:"typeDoc"` Properties map[string]Property `json:"properties"` ServiceDoc string `json:"serviceDoc"` Methods map[string]Method `json:"methods"` NoService bool `json:"noservice"` Overview string `json:"docOverview"` Deprecated bool `json:"deprecated"` ServiceGroup string }
Click to show internal directories.
Click to hide internal directories.