wip: Move all references to github.com/hohn/ghes-mirva-server

This commit is contained in:
Michael Hohn
2024-05-22 14:39:12 -07:00
committed by =Michael Hohn
parent 4269bacf2a
commit 2ab596bf1d
7 changed files with 354 additions and 296 deletions

52
pkg/common/types.go Normal file
View File

@@ -0,0 +1,52 @@
package common
type AnalyzeJob struct {
MirvaRequestID int
QueryPackId int
QueryLanguage string
ORL OwnerRepo
}
type OwnerRepo struct {
Owner string
Repo string
}
type AnalyzeResult struct {
RunAnalysisSARIF string
RunAnalysisBQRS string
}
type Status int
const (
StatusInProgress = iota
StatusQueued
StatusError
StatusSuccess
StatusFailed
)
func (s Status) ToExternalString() string {
switch s {
case StatusInProgress:
return "in_progress"
case StatusQueued:
return "queued"
case StatusError:
return "error"
case StatusSuccess:
return "succeeded"
case StatusFailed:
return "failed"
default:
return "unknown"
}
}
type JobSpec struct {
ID int
OwnerRepo
}