pranalysis

package
v0.0.0-...-081ecb4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Overview

Code generated by genservices. DO NOT EDIT.

Code generated by genservices. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHandlers

func RegisterHandlers(svc Service, r *mux.Router, regCtx *endpointutil.HandlerRegContext)

Types

type AnalyzedRepo

type AnalyzedRepo struct {
	request.Repo
	AnalysisGUID string `request:",urlPart,"`
}

type BasicService

type BasicService struct {
	RepoPolicy *policy.Repo
	Pf         providers.Factory
	Cfg        config.Config
}

func (BasicService) GetAnalysisStateByAnalysisGUID

func (s BasicService) GetAnalysisStateByAnalysisGUID(rc *request.InternalContext, req *AnalyzedRepo) (*State, error)

func (BasicService) GetAnalysisStateByPRNumber

func (s BasicService) GetAnalysisStateByPRNumber(rc *request.AnonymousContext, req *RepoPullRequest) (*State, error)

func (BasicService) UpdateAnalysisStateByAnalysisGUID

func (s BasicService) UpdateAnalysisStateByAnalysisGUID(rc *request.InternalContext, req *AnalyzedRepo, state *State) error

type GetAnalysisStateByAnalysisGUIDRequest

type GetAnalysisStateByAnalysisGUIDRequest struct {
	Req *AnalyzedRepo
}

type GetAnalysisStateByAnalysisGUIDResponse

type GetAnalysisStateByAnalysisGUIDResponse struct {
	*State
	// contains filtered or unexported fields
}

type GetAnalysisStateByPRNumberRequest

type GetAnalysisStateByPRNumberRequest struct {
	Req *RepoPullRequest
}

type GetAnalysisStateByPRNumberResponse

type GetAnalysisStateByPRNumberResponse struct {
	*State
	// contains filtered or unexported fields
}

type RepoPullRequest

type RepoPullRequest struct {
	request.Repo
	PullRequestNumber int    `request:",urlPart,"`
	CommitSHA         string `request:"commit_sha,urlParam,optional"`
}

func (RepoPullRequest) FillLogContext

func (r RepoPullRequest) FillLogContext(lctx logutil.Context)
type SamePullStateLink struct {
	CommitSHA string
	CreatedAt time.Time
}

type Service

type Service interface {
	//url:/v1/repos/{provider}/{owner}/{name}/analyzes/{analysisguid}/state
	GetAnalysisStateByAnalysisGUID(rc *request.InternalContext, req *AnalyzedRepo) (*State, error)

	//url:/v1/repos/{provider}/{owner}/{name}/pulls/{pullrequestnumber}
	GetAnalysisStateByPRNumber(rc *request.AnonymousContext, req *RepoPullRequest) (*State, error)

	//url:/v1/repos/{provider}/{owner}/{name}/analyzes/{analysisguid}/state method:PUT
	UpdateAnalysisStateByAnalysisGUID(rc *request.InternalContext, req *AnalyzedRepo, state *State) error
}

type State

type State struct {
	gorm.Model

	Status                  string
	ReportedIssuesCount     int
	ResultJSON              json.RawMessage
	CommitSHA               string
	GithubPullRequestNumber int
	GithubRepoName          string

	PreviousAnalyzes []SamePullStateLink `json:",omitempty"`
}

func (State) FillLogContext

func (s State) FillLogContext(lctx logutil.Context)

type UpdateAnalysisStateByAnalysisGUIDRequest

type UpdateAnalysisStateByAnalysisGUIDRequest struct {
	Req   *AnalyzedRepo
	State *State
}

type UpdateAnalysisStateByAnalysisGUIDResponse

type UpdateAnalysisStateByAnalysisGUIDResponse struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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