MCPcopy Create free account
hub / github.com/OpenCSGs/csghub-server / buildCreateFileReq

Function buildCreateFileReq

component/model.go:270–283  ·  view source on GitHub ↗
(p *types.CreateFileParams, repoType types.RepositoryType)

Source from the content-addressed store, hash-verified

268}
269
270func 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
285func (c *ModelComponent) Update(ctx context.Context, req *types.UpdateModelReq) (*types.Model, error) {
286 req.RepoType = types.ModelRepo

Callers 4

CreateMethod · 0.85
CreateMethod · 0.85
CreateMethod · 0.85
CreateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected