Skip to content

refactor: config package#182

Merged
shizhMSFT merged 6 commits intonotaryproject:mainfrom
JeyJeyGao:refactor_config
Nov 4, 2022
Merged

refactor: config package#182
shizhMSFT merged 6 commits intonotaryproject:mainfrom
JeyJeyGao:refactor_config

Conversation

@JeyJeyGao
Copy link
Copy Markdown
Contributor

@JeyJeyGao JeyJeyGao commented Nov 2, 2022

type Config struct
    func LoadConfig() (*Config, error)
    func NewConfig() *Config
    func (c *Config) Save() error

type SigningKeys struct
    func LoadSigningKeys() (*SigningKeys, error)
    func NewSigningKeys() *SigningKeys
    func (s *SigningKeys) Save() error
type KeySuite
    func (k KeySuite) Is(name string) bool
type X509KeyPair
type ExternalKey

Please review this PR firstly: #179
Signed-off-by: Junjie Gao junjiegao@microsoft.com

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Nov 2, 2022

Codecov Report

Merging #182 (5d8ecf0) into main (75b3248) will increase coverage by 0.45%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main     #182      +/-   ##
==========================================
+ Coverage   80.25%   80.71%   +0.45%     
==========================================
  Files          22       22              
  Lines        1722     1711      -11     
==========================================
- Hits         1382     1381       -1     
+ Misses        266      258       -8     
+ Partials       74       72       -2     
Impacted Files Coverage Δ
config/config.go 44.44% <50.00%> (+12.44%) ⬆️
config/base.go 55.00% <100.00%> (ø)
config/keys.go 36.84% <100.00%> (+2.05%) ⬆️

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

@JeyJeyGao JeyJeyGao changed the title refactor: config package refactor: config package [1] Nov 2, 2022
@JeyJeyGao JeyJeyGao changed the title refactor: config package [1] refactor: config package [2] Nov 2, 2022
@JeyJeyGao JeyJeyGao force-pushed the refactor_config branch 3 times, most recently from c8ecd29 to 817a7b5 Compare November 4, 2022 00:11
@shizhMSFT shizhMSFT changed the title refactor: config package [2] refactor: config package Nov 4, 2022
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

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.

It will be better if we add a package documentation in config.go.

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

Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
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 a44d663 into notaryproject:main Nov 4, 2022
@JeyJeyGao JeyJeyGao deleted the refactor_config branch November 10, 2022 01:23
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.

4 participants