Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Question ¶
type Question struct {
Text string `json:"text"`
LongText string `json:"long_text"`
Answers map[string]Answer `json:"answers"`
}
Question has information about a question
type Questions ¶
type Questions struct {
List map[string]Question `json:"questions"`
Version string `json:"version"`
RisklevelsVersion string `json:"risklevels_version"`
Updated string `json:"updated"`
}
Questions is a versioned collection of Question's
type Responses ¶
type Responses struct {
List map[string]string `json:"responses"`
RisklevelsVersion string `json:"risklevels_version"`
QuestionsVersion string `json:"questions_version"`
Metadata interface{} `json:"metadata"`
}
Responses is a collection of responses to questions submitted by the client
type RiskLevel ¶
type RiskLevel struct {
Text string `json:"text"`
Score uint `json:"score"`
Datatypes []string `json:"datatypes"`
}
RiskLevel describes a security risk level and what data types belong to it
type RiskLevels ¶
type RiskLevels struct {
List []RiskLevel `json:"risklevels"`
Version string `json:"version"`
Updated string `json:"updated"`
}
RiskLevels is a versioned collection of RiskLevel's
func (RiskLevels) Highest ¶
func (rl RiskLevels) Highest(datatypes []string) (RiskLevel, error)
Highest returns the RiskLevel with the highest score based on a list of data types
func (RiskLevels) Object ¶
func (rl RiskLevels) Object(v string) string
Object returns the full S3 path to the object containing risk level data for a specific version
func (RiskLevels) Path ¶
func (rl RiskLevels) Path() string
Path returns the main S3 path containing risk level versions
Click to show internal directories.
Click to hide internal directories.