Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #43 from ipfs/feat/plugin-config
Browse files Browse the repository at this point in the history
add plugins config section
  • Loading branch information
Stebalien committed Aug 29, 2019
2 parents 9e07dc8 + 638c2ec commit d03c246
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type Config struct {
Provider Provider
Reprovider Reprovider
Experimental Experiments
Plugins Plugins
}

const (
Expand Down
4 changes: 2 additions & 2 deletions init.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ func DefaultDatastoreConfig() Datastore {
func identityConfig(out io.Writer, nbits int) (Identity, error) {
// TODO guard higher up
ident := Identity{}
if nbits < 1024 {
return ident, errors.New("bitsize less than 1024 is considered unsafe")
if nbits < 2048 {
return ident, errors.New("bitsize less than 2048 is considered unsafe")
}

fmt.Fprintf(out, "generating %v-bit RSA keypair...", nbits)
Expand Down
11 changes: 11 additions & 0 deletions plugins.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package config

type Plugins struct {
Plugins map[string]Plugin `json:",omitempty"`
// TODO: Loader Path? Leaving that out for now due to security concerns.
}

type Plugin struct {
Disabled bool
Config interface{}
}

0 comments on commit d03c246

Please sign in to comment.