Skip to content

refactor: dir package [1]#179

Merged
shizhMSFT merged 4 commits intonotaryproject:mainfrom
JeyJeyGao:refactor_dir
Nov 3, 2022
Merged

refactor: dir package [1]#179
shizhMSFT merged 4 commits intonotaryproject:mainfrom
JeyJeyGao:refactor_dir

Conversation

@JeyJeyGao
Copy link
Copy Markdown
Contributor

@JeyJeyGao JeyJeyGao commented Nov 1, 2022

// The relative path to {NOTATION_CONFIG}
const (
    PathConfigFile  = "config.json"
    PathSigningKeys = "signingkeys.json"
    PathTrustPolicy = "trustpolicy.json"
)

func LocalKeyPath(name string) (keyPath, certPath string)
func X509TrustStoreDir(items... string) string

var (
    UserConfigDir    string // Aboslute path of user level {NOTATION_CONFIG}
    UserLibexecDir   string // Aboslute path of user level {NOTATION_LIBEXEC}
)

// ConfigFS and PluginFS can be an union fs
func ConfigFS() SysFS
func PluginFS() SysFS

type SysFS interface {
    fs.FS

    SysPath(items ...string) (string, error)
}
    func NewSysFS(root string) SysFS

Please review this PR before others.
Signed-off-by: Junjie Gao junjiegao@microsoft.com

Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
@JeyJeyGao JeyJeyGao changed the title refactor: dir package refactor: dir package [1] Nov 2, 2022
Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Nov 3, 2022

Codecov Report

Merging #179 (3b373a0) into main (55b8746) will decrease coverage by 2.11%.
The diff coverage is 65.07%.

@@            Coverage Diff             @@
##             main     #179      +/-   ##
==========================================
- Coverage   82.37%   80.25%   -2.12%     
==========================================
  Files          23       22       -1     
  Lines        1821     1722      -99     
==========================================
- Hits         1500     1382     -118     
- Misses        254      266      +12     
- Partials       67       74       +7     
Impacted Files Coverage Δ
config/base.go 55.00% <ø> (-18.92%) ⬇️
verification/verifier.go 83.41% <0.00%> (+0.43%) ⬆️
config/config.go 32.00% <40.00%> (-50.36%) ⬇️
config/keys.go 34.78% <40.00%> (-45.22%) ⬇️
verification/helpers.go 88.46% <62.50%> (-4.40%) ⬇️
dir/fs.go 66.66% <66.66%> (-11.12%) ⬇️
dir/path.go 88.88% <93.75%> (-3.42%) ⬇️
plugin/manager/manager.go 81.81% <100.00%> (ø)
verification/verifier_helpers.go 68.19% <100.00%> (ø)
... and 4 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
Copy link
Copy Markdown
Contributor

@priteshbandi priteshbandi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one question

Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
Copy link
Copy Markdown
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shizhMSFT shizhMSFT merged commit 75b3248 into notaryproject:main Nov 3, 2022
@JeyJeyGao JeyJeyGao deleted the refactor_dir branch November 10, 2022 01:23
@yizha1 yizha1 linked an issue Nov 22, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System vs User file/directory precedence

4 participants