generated from snivilised/arcadia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(proxy): mock config readers (#48)
- Loading branch information
1 parent
821cb65
commit ea3dc52
Showing
6 changed files
with
404 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package proxy | ||
|
||
import ( | ||
"github.com/snivilised/cobrass/src/clif" | ||
) | ||
|
||
const ( | ||
defaultNoFiles = 3 | ||
defaultNoFolders = 3 | ||
) | ||
|
||
var ( | ||
DefaultProfilesConfig *MsProfilesConfig | ||
DefaultSamplerConfig *MsSamplerConfig | ||
) | ||
|
||
func init() { | ||
// TODO: these defaults are not real defaults; they are just test | ||
// values that don't mean anything. Update to real useable defaults | ||
// | ||
DefaultProfilesConfig = &MsProfilesConfig{ | ||
Profiles: ProfilesConfigMap{ | ||
"blur": clif.ChangedFlagsMap{ | ||
"strip": "true", | ||
"interlace": "plane", | ||
"gaussian-blur": "0.05", | ||
}, | ||
"sf": clif.ChangedFlagsMap{ | ||
"dry-run": "true", | ||
"strip": "true", | ||
"interlace": "plane", | ||
"sampling-factor": "4:2:0", | ||
}, | ||
"adaptive": clif.ChangedFlagsMap{ | ||
"strip": "true", | ||
"interlace": "plane", | ||
"gaussian-blur": "0.25", | ||
"adaptive-resize": "60", | ||
}, | ||
}, | ||
} | ||
|
||
DefaultSamplerConfig = &MsSamplerConfig{ | ||
Files: defaultNoFiles, | ||
Folders: defaultNoFolders, | ||
Schemes: MsSamplerSchemesConfig{ | ||
"blur-sf": MsSchemeConfig{ | ||
Profiles: []string{"blur", "sf"}, | ||
}, | ||
"adaptive-sf": MsSchemeConfig{ | ||
Profiles: []string{"adaptive", "sf"}, | ||
}, | ||
"adaptive-blur": MsSchemeConfig{ | ||
Profiles: []string{"adaptive", "blur"}, | ||
}, | ||
}, | ||
} | ||
} |
Oops, something went wrong.