Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 246
Expand file tree
/
Copy pathstorage.go
More file actions
Latest commit
38 lines (35 loc) · 981 Bytes
/
Copy pathstorage.go
File metadata and controls
38 lines (35 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package checkup
import (
"encoding/json"
"fmt"
"github.com/sourcegraph/checkup/storage/appinsights"
"github.com/sourcegraph/checkup/storage/fs"
"github.com/sourcegraph/checkup/storage/github"
"github.com/sourcegraph/checkup/storage/mysql"
"github.com/sourcegraph/checkup/storage/postgres"
"github.com/sourcegraph/checkup/storage/s3"
"github.com/sourcegraph/checkup/storage/sql"
"github.com/sourcegraph/checkup/storage/sqlite3"
)
funcstorageDecode(typeNamestring, config json.RawMessage) (Storage, error) {
switchtypeName {
casesqlite3.Type:
returnsqlite3.New(config)
casemysql.Type:
returnmysql.New(config)
casepostgres.Type:
returnpostgres.New(config)
cases3.Type:
returns3.New(config)
casegithub.Type:
returngithub.New(config)
casefs.Type:
returnfs.New(config)
casesql.Type:
returnsql.New(config)
caseappinsights.Type:
returnappinsights.New(config)
default:
returnnil, fmt.Errorf(errUnknownStorageType, typeName)
}
}