-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Templating 2.0 #192
base: modules
Are you sure you want to change the base?
Templating 2.0 #192
Conversation
tmpl, err := template.New(filepath.Base(t.Src)).Funcs(template.FuncMap{ | ||
"GetValue": data.(*ServiceDataSource).GetValue, | ||
"GetValueArray": data.(*ServiceDataSource).GetValueArray, | ||
}).ParseFiles(t.Src) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not need this. The datatype should already be able to handle this.
Dst string | ||
} | ||
|
||
func (t AdapterTemplate) Write(data interface{}) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be re-used with adapter/service
|
||
// Struct to pass into the template engine containing all necessary data and methods for populating a template. | ||
type MetadataDataSource struct { | ||
CustomFields map[string]string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need (TBD)
|
||
// Struct to pass into the template engine containing all necessary data and methods for populating a template. | ||
type AdapterDataSource struct { | ||
GetProjectName string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func() not string. Comes from hyperdrive itself
ModuleConfigDir string | ||
ModuleSecretFile string | ||
ModuleLogDir string | ||
ModuleJwtKeyFile string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably will all be functions/methods.
Add Get to beginning and update spec
ModuleConfigDir string | ||
ModuleDataDir string | ||
HyperdriveDaemonUrl string | ||
HyperdriveJwtKeyFile string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update spec
No description provided.