app

package
v0.0.0-...-6574dfe Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSoftwarePkgMessageService

func NewSoftwarePkgMessageService(
	ci pkgci.PkgCI,
	repo repository.SoftwarePkg,
	manager pkgmanager.PkgManager,
	message message.SoftwarePkgIndirectMessage,
) softwarePkgMessageService

func NewSoftwarePkgService

func NewSoftwarePkgService(
	repo repository.SoftwarePkg,
	manager pkgmanager.PkgManager,
	message message.SoftwarePkgMessage,
	sensitive sensitivewords.SensitiveWords,
	maintainer maintainer.Maintainer,
	translation translation.Translation,
) *softwarePkgService

Types

type CmdToApplyNewSoftwarePkg

type CmdToApplyNewSoftwarePkg struct {
	PkgName     dp.PackageName
	Importer    domain.User
	Application domain.SoftwarePkgApplication
}

type CmdToHandlePkgAlreadyExisted

type CmdToHandlePkgAlreadyExisted struct {
	PkgName dp.PackageName
}

type CmdToHandlePkgCIChecked

type CmdToHandlePkgCIChecked struct {
	PkgId    string
	Detail   string
	Success  bool
	PRNumber int
}

CmdToHandlePkgCIChecked

type CmdToHandlePkgCIChecking

type CmdToHandlePkgCIChecking struct {
	PkgId string
}

CmdToHandlePkgCIChecking

type CmdToHandlePkgCodeSaved

type CmdToHandlePkgCodeSaved = CmdToHandlePkgRepoCreated

CmdToHandlePkgCodeSaved

type CmdToHandlePkgInitialized

type CmdToHandlePkgInitialized struct {
	PkgId      string
	RelevantPR dp.URL
	// RepoLink is the one of already existed pkg
	RepoLink    dp.URL
	FiledReason string
}

CmdToHandlePkgInitialized

type CmdToHandlePkgRepoCreated

type CmdToHandlePkgRepoCreated struct {
	PkgId       string
	FiledReason string

	domain.RepoCreatedInfo
}

CmdToHandlePkgRepoCreated

type CmdToListPkgs

type CmdToListPkgs = repository.OptToFindSoftwarePkgs

type CmdToTranslateReviewComment

type CmdToTranslateReviewComment = repository.TranslatedReviewCommentIndex

CmdToTranslateReviewComment

type CmdToUpdateSoftwarePkgApplication

type CmdToUpdateSoftwarePkgApplication struct {
	PkgId string
	CmdToApplyNewSoftwarePkg
}

type CmdToWriteSoftwarePkgReviewComment

type CmdToWriteSoftwarePkgReviewComment struct {
	Author  dp.Account
	Content dp.ReviewComment
}

type NewSoftwarePkgDTO

type NewSoftwarePkgDTO struct {
	Id string `json:"id"`
}

type SoftwarePkgApplicationDTO

type SoftwarePkgApplicationDTO struct {
	SpecURL           string `json:"spec_url"`
	Upstream          string `json:"upstream"`
	SrcRPMURL         string `json:"src_rpm_url"`
	PackageDesc       string `json:"desc"`
	PackagePlatform   string `json:"platform"`
	ImportingPkgSig   string `json:"sig"`
	ReasonToImportPkg string `json:"reason"`
}

SoftwarePkgApplicationDTO

type SoftwarePkgApproverDTO

type SoftwarePkgApproverDTO struct {
	Account string `json:"account"`
	IsTC    bool   `json:"is_tc"`
}

SoftwarePkgApproverDTO

type SoftwarePkgBasicInfoDTO

type SoftwarePkgBasicInfoDTO struct {
	Id        string `json:"id"`
	Importer  string `json:"importer"`
	PkgName   string `json:"pkg_name"`
	Phase     string `json:"phase"`
	CIStatus  string `json:"ci_status"`
	AppliedAt string `json:"applied_at"`
	RepoLink  string `json:"repo_link"`
	PkgDesc   string `json:"desc"`
	Sig       string `json:"sig"`
	Platform  string `json:"platform"`
}

SoftwarePkgBasicInfoDTO

type SoftwarePkgMessageService

type SoftwarePkgMessageService interface {
	HandlePkgCIChecking(CmdToHandlePkgCIChecking) error
	HandlePkgCIChecked(CmdToHandlePkgCIChecked) error
	HandlePkgCodeSaved(CmdToHandlePkgCodeSaved) error
	HandlePkgInitialized(CmdToHandlePkgInitialized) error
	HandlePkgRepoCreated(CmdToHandlePkgRepoCreated) error
	HandlePkgAlreadyExisted(CmdToHandlePkgAlreadyExisted) error
}

type SoftwarePkgOperationLogDTO

type SoftwarePkgOperationLogDTO struct {
	User   string `json:"user"`
	Time   string `json:"time"`
	Action string `json:"action"`
}

SoftwarePkgOperationLogDTO

type SoftwarePkgReviewCommentDTO

type SoftwarePkgReviewCommentDTO struct {
	Id            string `json:"id"`
	Author        string `json:"author"`
	Content       string `json:"content"`
	CreatedAt     string `json:"created_at"`
	SinceCreation int64  `json:"since_creation"`
}

SoftwarePkgReviewCommentDTO

type SoftwarePkgReviewDTO

type SoftwarePkgReviewDTO struct {
	SoftwarePkgBasicInfoDTO

	Logs        []SoftwarePkgOperationLogDTO  `json:"logs"`
	Comments    []SoftwarePkgReviewCommentDTO `json:"comments"`
	ApprovedBy  []SoftwarePkgApproverDTO      `json:"approved_by"`
	RejectedBy  []SoftwarePkgApproverDTO      `json:"rejected_by"`
	Application SoftwarePkgApplicationDTO     `json:"application"`
}

SoftwarePkgReviewDTO

type SoftwarePkgService

type SoftwarePkgService interface {
	ApplyNewPkg(*CmdToApplyNewSoftwarePkg) (NewSoftwarePkgDTO, string, error)
	GetPkgReviewDetail(string) (SoftwarePkgReviewDTO, string, error)
	ListPkgs(*CmdToListPkgs) (SoftwarePkgsDTO, error)
	UpdateApplication(*CmdToUpdateSoftwarePkgApplication) (string, error)

	Approve(string, *domain.User) (string, error)
	Reject(string, *domain.User) (string, error)
	Abandon(string, *domain.User) (string, error)
	RerunCI(string, *domain.User) (string, error)
	NewReviewComment(string, *CmdToWriteSoftwarePkgReviewComment) (string, error)

	TranslateReviewComment(*CmdToTranslateReviewComment) (
		dto TranslatedReveiwCommentDTO, code string, err error,
	)
}

type SoftwarePkgsDTO

type SoftwarePkgsDTO struct {
	Pkgs  []SoftwarePkgBasicInfoDTO `json:"pkgs"`
	Total int                       `json:"total"`
}

SoftwarePkgsDTO

type TranslatedReveiwCommentDTO

type TranslatedReveiwCommentDTO struct {
	Content string `json:"content"`
}

Jump to

Keyboard shortcuts

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