Skip to content
Snippets Groups Projects
Commit a3b14498 authored by Josh Brooks's avatar Josh Brooks
Browse files

Final clean up

parent 99ac4f81
No related branches found
No related tags found
4 merge requests!510Release,!227Have all Params objects adhere to json.Marshaler/Unmarshaler,!226WIP: Api2.0,!207WIP: Client Restructure
package api
...@@ -7,8 +7,16 @@ import ( ...@@ -7,8 +7,16 @@ import (
// Params is are the parameters for the auth package. // Params is are the parameters for the auth package.
type Params struct { type Params struct {
ReplayRequests bool ReplayRequests bool
RequestTag string
ConfirmTag string
ResetRequestTag string
ResetConfirmTag string
}
// paramsDisk will be the marshal-able and umarshal-able object.
type paramsDisk struct {
ReplayRequests bool
RequestTag string RequestTag string
ConfirmTag string ConfirmTag string
ResetRequestTag string ResetRequestTag string
...@@ -48,15 +56,6 @@ func GetDefaultTemporaryParams() Params { ...@@ -48,15 +56,6 @@ func GetDefaultTemporaryParams() Params {
return p return p
} }
// paramsDisk will be the marshal-able and umarshal-able object.
type paramsDisk struct {
ReplayRequests bool
RequestTag string
ConfirmTag string
ResetRequestTag string
ResetConfirmTag string
}
// MarshalJSON adheres to the json.Marshaler interface. // MarshalJSON adheres to the json.Marshaler interface.
func (p Params) MarshalJSON() ([]byte, error) { func (p Params) MarshalJSON() ([]byte, error) {
pDisk := paramsDisk{ pDisk := paramsDisk{
......
...@@ -282,6 +282,8 @@ func (p *CMIXParams) UnmarshalJSON(data []byte) error { ...@@ -282,6 +282,8 @@ func (p *CMIXParams) UnmarshalJSON(data []byte) error {
return nil return nil
} }
// NodeMap represents a map of nodes and whether they have been
// blacklisted. This is designed for use with CMIXParams.BlacklistedNodes
type NodeMap map[id.ID]bool type NodeMap map[id.ID]bool
// MarshalJSON adheres to the json.Marshaler interface. // MarshalJSON adheres to the json.Marshaler interface.
......
...@@ -54,6 +54,7 @@ type paramsDisk struct { ...@@ -54,6 +54,7 @@ type paramsDisk struct {
ForceHistoricalRounds bool ForceHistoricalRounds bool
} }
// GetDefaultParams returns a default set of Params.
func GetDefaultParams() Params { func GetDefaultParams() Params {
return Params{ return Params{
NumMessageRetrievalWorkers: 8, NumMessageRetrievalWorkers: 8,
......
package rekey
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment