learn

package
v0.0.0-...-dfd24c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lesson

type Lesson struct {
	LessonId      string   `json:"lessonId"`
	DatePublished string   `json:"datePublished"`
	Author        string   `json:"author"`
	Title         string   `json:"title"`
	Subtitle      string   `json:"subtitle"`
	SeoKeywords   []string `json:"seoKeywords"`
	SeoTitle      string   `json:"seoTitle"`
	Cves          []string `json:"cves"`
	Cwes          []string `json:"cwes"`
	Description   string   `json:"description"`
	Ecosystem     string   `json:"ecosystem"`
	Rules         []string `json:"rules"`
	Slug          string   `json:"slug"`
	Published     bool     `json:"published"`
	Url           string   `json:"url"`
	Source        string   `json:"source"`
	Img           string   `json:"img"`
}

type LessonLookupParams

type LessonLookupParams struct {
	Rule      string
	Ecosystem string
	CWEs      []string
	CVEs      []string
}

type Service

type Service interface {
	LearnEndpoint(conf *config.Config) (learnEndpoint string, err error)
	GetLesson(ecosystem string, rule string, cwes []string, cves []string, issueType vulnmap.Type) (lesson *Lesson, err error)
	GetAllLessons() (lessons []Lesson, err error)
}

func New

func New(c *config.Config, httpClientFunc func() *http.Client, er error_reporting.ErrorReporter) Service

Directories

Path Synopsis
Package mock_learn is a generated GoMock package.
Package mock_learn is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL