(variable database.TemplateVersionVariable)
| 2003 | const redacted = "*redacted*" |
| 2004 | |
| 2005 | func convertTemplateVersionVariable(variable database.TemplateVersionVariable) codersdk.TemplateVersionVariable { |
| 2006 | templateVariable := codersdk.TemplateVersionVariable{ |
| 2007 | Name: variable.Name, |
| 2008 | Description: variable.Description, |
| 2009 | Type: variable.Type, |
| 2010 | Value: variable.Value, |
| 2011 | DefaultValue: variable.DefaultValue, |
| 2012 | Required: variable.Required, |
| 2013 | Sensitive: variable.Sensitive, |
| 2014 | } |
| 2015 | if templateVariable.Sensitive { |
| 2016 | templateVariable.Value = redacted |
| 2017 | templateVariable.DefaultValue = redacted |
| 2018 | } |
| 2019 | return templateVariable |
| 2020 | } |
| 2021 | |
| 2022 | func watchTemplateChannel(id uuid.UUID) string { |
| 2023 | return fmt.Sprintf("template:%s", id) |
no outgoing calls
no test coverage detected