Documentation ¶
Overview ¶
codgen helps autogenerate cloudquery plugins configured by definition
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TemplatesFS embed.FS
Functions ¶
This section is empty.
Types ¶
type ColumnDefinition ¶
type ColumnDefinitions ¶
type ColumnDefinitions []ColumnDefinition
func (ColumnDefinitions) GetByName ¶
func (c ColumnDefinitions) GetByName(name string) *ColumnDefinition
type ResourceDefinition ¶
type ResourceDefinition struct { Name string Table *TableDefinition }
type TableDefinition ¶
type TableDefinition struct { Name string Description string Columns []ColumnDefinition Relations []*TableDefinition Resolver string IgnoreError string Multiplex string PostResourceResolver string Options schema.TableCreationOptions // contains filtered or unexported fields }
func NewTableFromStruct ¶
func NewTableFromStruct(name string, obj interface{}, opts ...TableOptions) (*TableDefinition, error)
func (*TableDefinition) GenerateTemplate ¶
func (t *TableDefinition) GenerateTemplate(wr io.Writer) error
type TableOptions ¶
type TableOptions func(*TableDefinition)
func WithDescriptionsEnabled ¶
func WithDescriptionsEnabled() TableOptions
func WithExtraColumns ¶
func WithExtraColumns(columns []ColumnDefinition) TableOptions
func WithNameTransformer ¶
func WithNameTransformer(transformer func(string) string) TableOptions
func WithOverrideColumns ¶
func WithOverrideColumns(columns []ColumnDefinition) TableOptions
func WithSkipFields ¶
func WithSkipFields(fields []string) TableOptions
Click to show internal directories.
Click to hide internal directories.