MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / authlistResolver

Function authlistResolver

server/s3/utils.go:153–162  ·  view source on GitHub ↗

FIXME this could be implemented by VFS.MkdirAll() func mkdirRecursive(path string, VFS *vfs.VFS) error { path = strings.Trim(path, "/") dirs := strings.Split(path, "/") dir := "" for _, d := range dirs { dir += "/" + d if _, err := VFS.Stat(dir); err != nil { err := VFS.Mkdir(dir, 0777)

()

Source from the content-addressed store, hash-verified

151// }
152
153func authlistResolver() map[string]string {
154 s3accesskeyid := setting.GetStr(conf.S3AccessKeyId)
155 s3secretaccesskey := setting.GetStr(conf.S3SecretAccessKey)
156 if s3accesskeyid == "" && s3secretaccesskey == "" {
157 return nil
158 }
159 authList := make(map[string]string)
160 authList[s3accesskeyid] = s3secretaccesskey
161 return authList
162}

Callers 1

NewServerFunction · 0.85

Calls 1

GetStrFunction · 0.92

Tested by

no test coverage detected