Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TemplateFS embed.FS
Functions ¶
func GenerateObjectsClient ¶
func GenreateObjectsType ¶
Types ¶
type EndpointTarget ¶
type EndpointTarget struct { // Name is the name of the endpoint target. // // It must be equal to an exported name in the endpoint package. // // Example: "Contacts" => github.com/marcozac/hubspot-go/endpoint.Contacts Name string // Package is the package of the endpoint target. // // Example: "github.com/marcozac/hubspot-go/endpoint" Package string // contains filtered or unexported fields }
func (*EndpointTarget) Alias ¶
func (et *EndpointTarget) Alias() string
Alias returns the alias of the endpoint target used for imports.
Since the alias may be altered by Graph, this method should be called only after [Graph.resolveImports] has been called or (better) in a template.
type Graph ¶
type Graph struct { // OutDir is the output directory for the generated files. // // Default: "." OutDir string // PackageName is the name of the package for the generated files. // // Default: "hubspot" PackageName string // PackagePath is the path of the package for the generated files. // // Example: "github.com/marcozac/hubspot-go" PackagePath string // Imports is a map formatted as "path:alias" for the imports of the graph. Imports map[string]string // Objects is a list of objects of the node. Objects []*Object // Header is the header for the generated files. // // Default: "Code generated by hsc. DO NOT EDIT." Header string // contains filtered or unexported fields }
type Object ¶
type Object struct { // Name is the name of the object. // // Example: "Contact" Name string // Properties is a list of properties of the object. Properties []*Property // Endpoint is the endpoint of the object. // // Example: "https://api.hubapi.com/crm/v3/objects/contacts" Endpoint string // EndpointTarget is the target endpoint for the object. // // It is used if [Object.Endpoint] is empty. EndpointTarget *EndpointTarget // contains filtered or unexported fields }
type Property ¶
type Property struct { *hubspot.Property // contains filtered or unexported fields }
func (*Property) ImportHS ¶
ImportHS returns true if the types should imported from the hubspot-go package
func (Property) StructFieldJSONTag ¶
func (*Property) StructFieldName ¶
func (*Property) StructFieldType ¶
Click to show internal directories.
Click to hide internal directories.