mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-03 07:56:42 -05:00
15 lines
348 B
Go
15 lines
348 B
Go
|
package securedload
|
||
|
|
||
|
type ProtectedLoader interface {
|
||
|
VerifyAndLoad(filename string) ([]byte, error)
|
||
|
}
|
||
|
|
||
|
var knownProtectedLoader map[string]ProtectedLoader
|
||
|
|
||
|
func RegisterProtectedLoader(name string, sv ProtectedLoader) {
|
||
|
if knownProtectedLoader == nil {
|
||
|
knownProtectedLoader = map[string]ProtectedLoader{}
|
||
|
}
|
||
|
knownProtectedLoader[name] = sv
|
||
|
}
|