(metadatum database.WorkspaceAgentMetadatum)
| 175 | } |
| 176 | |
| 177 | func dbAgentMetadatumToProtoDescription(metadatum database.WorkspaceAgentMetadatum) *agentproto.WorkspaceAgentMetadata_Description { |
| 178 | return &agentproto.WorkspaceAgentMetadata_Description{ |
| 179 | DisplayName: metadatum.DisplayName, |
| 180 | Key: metadatum.Key, |
| 181 | Script: metadatum.Script, |
| 182 | Interval: durationpb.New(time.Duration(metadatum.Interval)), |
| 183 | Timeout: durationpb.New(time.Duration(metadatum.Timeout)), |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | func dbAgentScriptsToProto(scripts []database.GetWorkspaceAgentScriptsByAgentIDsRow) []*agentproto.WorkspaceAgentScript { |
| 188 | ret := make([]*agentproto.WorkspaceAgentScript, len(scripts)) |
no test coverage detected