MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / Offline

Method Offline

gateway/apinto/project.go:120–134  ·  view source on GitHub ↗
(ctx context.Context, projects ...*gateway.ProjectRelease)

Source from the content-addressed store, hash-verified

118}
119
120func (p *ProjectClient) Offline(ctx context.Context, projects ...*gateway.ProjectRelease) error {
121 err := p.client.Begin(ctx)
122 if err != nil {
123 return err
124 }
125 for _, project := range projects {
126 err = p.delete(ctx, project.Id)
127 if err != nil {
128 p.client.Rollback(ctx)
129 return err
130 }
131 }
132
133 return p.client.Commit(ctx)
134}
135
136func (p *ProjectClient) delete(ctx context.Context, id string) error {
137 err := p.deleteByLabels(ctx, gateway.ProfessionRouter, map[string]string{"project": id})

Callers

nothing calls this directly

Calls 4

deleteMethod · 0.95
BeginMethod · 0.65
RollbackMethod · 0.65
CommitMethod · 0.65

Tested by

no test coverage detected