famed

package
v0.0.0-...-2f0a4f1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentUpdate

type CommentUpdate struct {
	Actions []action `json:"actions"`
	Errors  []string `json:"errors"`
}

func NewCommentUpdate

func NewCommentUpdate() CommentUpdate

NewCommentUpdate returns a new commentUpdate with initialized slice fields.

func (*CommentUpdate) AddAction

func (c *CommentUpdate) AddAction(action action)

func (*CommentUpdate) AddError

func (c *CommentUpdate) AddError(err error)

type EligibleIssuesResponse

type EligibleIssuesResponse struct {
	Repos []Repo `json:"repos"`
}

type HTTPHandler

type HTTPHandler interface {
	GetInstallations(c echo.Context) error
	GetTrackedIssues(c echo.Context) error

	GetRewardsByOwner(c echo.Context) error
	GetRewardsByContributor(c echo.Context) error

	GetBlueTeam(c echo.Context) error
	GetRedTeam(c echo.Context) error

	GetBadge(c echo.Context) error

	PostEvent(c echo.Context) error

	GetUpdateComments(c echo.Context) error

	PostTriggerScanner(c echo.Context) error

	CleanState()
}

func NewHandler

func NewHandler(githubAppClient providers.AppClient, githubInstallationClient providers.InstallationClient, scoreStore scorestore.ScoreStore, dockerManager *docker.Manager, devtoolkit *devtoolkit.DevToolkit, famedConfig model.Config, baseURL string, now func() time.Time) HTTPHandler

NewHandler returns a pointer to the GitHub handler.

type Issue

type Issue struct {
	ID           int64                     `json:"id"`
	Number       int                       `json:"number"`
	HTMLURL      string                    `json:"htmlurl"`
	Contributors []*famedModel.Contributor `json:"contributors"`
}

Issue represents an issue with a list of contributors that are eligible for a reward. We do not transmit the name of the issue since it could contain sensible information.

type IssueCommentUpdate

type IssueCommentUpdate struct {
	EligibleComment CommentUpdate `json:"eligibleComment"`
	RewardComment   CommentUpdate `json:"rewardComment"`
}

func NewIssueCommentUpdate

func NewIssueCommentUpdate() IssueCommentUpdate

type Repo

type Repo struct {
	Owner   string  `json:"owner"`
	Name    string  `json:"name"`
	HTMLURL string  `json:"htmlurl"`
	Issues  []Issue `json:"issues"`
}

type Request

type Request struct {
	Name   string   `json:"name" form:"name" query:"name"`
	Params []string `json:"params[]" form:"params[]" query:"params[]"`
}

type SafeIssueCommentsUpdates

type SafeIssueCommentsUpdates struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewSafeIssueCommentsUpdates

func NewSafeIssueCommentsUpdates() *SafeIssueCommentsUpdates

func (*SafeIssueCommentsUpdates) AddAction

func (sICU *SafeIssueCommentsUpdates) AddAction(issueNumber int, action action, commentType model.IssueCommentType)

func (*SafeIssueCommentsUpdates) AddError

func (sICU *SafeIssueCommentsUpdates) AddError(issueNumber int, err error, commentType model.IssueCommentType)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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