Skip to content

Commit

Permalink
add resources list generator
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhouston committed Nov 30, 2023
1 parent 9682cc3 commit 5d8d988
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
10 changes: 0 additions & 10 deletions framework/codegen/tools/generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@ import (

const generateConfigFilename = "generate.hcl"

type ResourcesListGenerator struct {
GeneratedTimestamp time.Time
Resources []ResourceConfig
Packages []string
}

func (p ResourcesListGenerator) String() string {
return renderTemplate(resourcesListTemplate, p)
}

func main() {
// setup slog with colour to make it easier to read
slog.SetDefault(slog.New(
Expand Down
13 changes: 13 additions & 0 deletions framework/codegen/tools/generator/generator_resources_list.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package main

import "time"

type ResourcesListGenerator struct {
GeneratedTimestamp time.Time
Resources []ResourceConfig
Packages []string
}

func (p ResourcesListGenerator) String() string {
return renderTemplate(resourcesListTemplate, p)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by tools/gen/schema_openapi_v3.go; DO NOT EDIT
// Code generated by codegen/tools/generator; DO NOT EDIT
//
// This file contains the list of constructors for resources that have been autogenerated.
//
Expand Down

0 comments on commit 5d8d988

Please sign in to comment.