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

add plugins config section #43

Merged
merged 2 commits into from
Aug 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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{}
}