MCPcopy Index your code
hub / github.com/SignTools/SignTools / GetFiles

Method GetFiles

src/storage/profile.go:209–230  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

207}
208
209func (p *profile) GetFiles() ([]fileGetter, error) {
210 isAccount, err := p.IsAccount()
211 if err != nil {
212 return nil, errors.New("is account")
213 }
214 var files = []fileGetter{
215 {name: "cert.p12", f3: p.getFixedCert},
216 {name: "cert_pass.txt", f2: func() (string, error) { return p.GetString(ProfileCertPass) }},
217 {name: "team_id.txt", f2: p.getTeamId},
218 }
219 if isAccount {
220 files = append(files, []fileGetter{
221 {name: "account_name.txt", f2: func() (string, error) { return p.GetString(ProfileAccountName) }},
222 {name: "account_pass.txt", f2: func() (string, error) { return p.GetString(ProfileAccountPass) }},
223 }...)
224 } else {
225 files = append(files, []fileGetter{
226 {name: "prov.mobileprovision", f1: func() (ReadonlyFile, error) { return p.GetFile(ProfileProv) }},
227 }...)
228 }
229 return files, nil
230}
231
232func (p *profile) getFixedCert() ([]byte, error) {
233 return p.fixedCert, nil

Callers

nothing calls this directly

Calls 4

IsAccountMethod · 0.95
NewMethod · 0.80
GetStringMethod · 0.65
GetFileMethod · 0.65

Tested by

no test coverage detected