Function
buildCreateFileReq
(p *types.CreateFileParams, repoType types.RepositoryType)
Source from the content-addressed store, hash-verified
| 268 | } |
| 269 | |
| 270 | func buildCreateFileReq(p *types.CreateFileParams, repoType types.RepositoryType) *types.CreateFileReq { |
| 271 | return &types.CreateFileReq{ |
| 272 | Username: p.Username, |
| 273 | Email: p.Email, |
| 274 | Message: p.Message, |
| 275 | Branch: p.Branch, |
| 276 | Content: base64.StdEncoding.EncodeToString([]byte(p.Content)), |
| 277 | NewBranch: p.Branch, |
| 278 | Namespace: p.Namespace, |
| 279 | Name: p.Name, |
| 280 | FilePath: p.FilePath, |
| 281 | RepoType: repoType, |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | func (c *ModelComponent) Update(ctx context.Context, req *types.UpdateModelReq) (*types.Model, error) { |
| 286 | req.RepoType = types.ModelRepo |
Tested by
no test coverage detected