Documentation ¶
Overview ¶
Package generator
Package generator ¶
Package generator
Index ¶
Constants ¶
View Source
const ( FuncCreateOrUpdate = "CreateOrUpdate" FuncGet = "Get" FuncDelete = "Delete" FuncListByRG = "ListByRG" FuncList = "List" )
View Source
const CreateOrUpdateFuncTemplateRaw = `` /* 515-byte string literal not displayed */
View Source
const DeleteFuncTemplateRaw = `` /* 283-byte string literal not displayed */
View Source
const GetFuncTemplateRaw = `` /* 566-byte string literal not displayed */
View Source
const ListByRGFuncTemplateRaw = `` /* 452-byte string literal not displayed */
View Source
const ListFuncTemplateRaw = `` /* 437-byte string literal not displayed */
Variables ¶
View Source
var ClientFactoryTemplate = template.Must(template.New("object-scaffolding-factory").Parse(`
func New(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (Interface, error) {
if options == nil {
options = utils.GetDefaultOption("{{.APIVersion}}")
}
client, err := {{.PackageAlias}}.New{{.ClientName}}(subscriptionID, credential, options)
if err != nil {
return nil, err
}
return &Client{client}, nil
}
`))
View Source
var ClientTemplate = template.Must(template.New("object-scaffolding-client-struct").Parse(`
type Client struct{
*{{.PackageAlias}}.{{.ClientName}}
}
`))
View Source
var CreateOrUpdateFuncTemplate = template.Must(template.New("object-scaffolding-create-func").Parse(CreateOrUpdateFuncTemplateRaw))
View Source
var DeleteFuncTemplate = template.Must(template.New("object-scaffolding-delete-func").Parse(DeleteFuncTemplateRaw))
View Source
var GetFuncTemplate = template.Must(template.New("object-scaffolding-get-func").Parse(GetFuncTemplateRaw))
View Source
var ImportTemplate = template.Must(template.New("import").Parse(`{{.Alias}} "{{.Package}}"
`))
View Source
var ListByRGFuncTemplate = template.Must(template.New("object-scaffolding-list-func").Parse(ListByRGFuncTemplateRaw))
View Source
var ListFuncTemplate = template.Must(template.New("object-scaffolding-list-func").Parse(ListFuncTemplateRaw))
Functions ¶
This section is empty.
Types ¶
type ClientGenConfig ¶
type Generator ¶
type Generator struct { // HeaderFile specifies the header text (e.g. license) to prepend to generated files. HeaderFile string `marker:",optional"` }
+controllertools:marker:generateHelp Generator generates client code for azure services.
func (Generator) CheckFilter ¶
func (Generator) CheckFilter() loader.NodeFilter
type ImportStatement ¶
Click to show internal directories.
Click to hide internal directories.