Documentation
¶
Index ¶
- Variables
- func Init(cfg *Config)
- func NewSoftwarePkgAlreadyExistEvent(pkg dp.PackageName) softwarePkgAlreadyExistedEvent
- func NewSoftwarePkgAppliedEvent(pkg *SoftwarePkgBasicInfo) softwarePkgAppliedEvent
- func NewSoftwarePkgApprovedEvent(pkg *SoftwarePkgBasicInfo) softwarePkgApprovedEvent
- func ParseErrorCode(err error) string
- func UnmarshalToSoftwarePkgAlreadyExistEvent(data []byte) (e softwarePkgAlreadyExistedEvent, err error)
- func UnmarshalToSoftwarePkgAppliedEvent(data []byte) (e softwarePkgAppliedEvent, err error)
- type Config
- type Importer
- type RepoCreatedInfo
- type SoftwarePkg
- type SoftwarePkgApplication
- type SoftwarePkgApprover
- type SoftwarePkgBasicInfo
- func (entity *SoftwarePkgBasicInfo) Abandon(user *User) error
- func (entity *SoftwarePkgBasicInfo) ApproveBy(user *SoftwarePkgApprover) (bool, error)
- func (entity *SoftwarePkgBasicInfo) CanAddReviewComment() bool
- func (entity *SoftwarePkgBasicInfo) HandleCIChecked(success bool, prNum int) error
- func (entity *SoftwarePkgBasicInfo) HandleCIChecking() error
- func (entity *SoftwarePkgBasicInfo) HandleCodeSaved(info RepoCreatedInfo) error
- func (entity *SoftwarePkgBasicInfo) HandlePkgAlreadyExisted() error
- func (entity *SoftwarePkgBasicInfo) HandlePkgInitialized(pr dp.URL) error
- func (entity *SoftwarePkgBasicInfo) HandleRepoCreated(info RepoCreatedInfo) error
- func (entity *SoftwarePkgBasicInfo) RejectBy(user *SoftwarePkgApprover) error
- func (entity *SoftwarePkgBasicInfo) RerunCI(user *User) (bool, error)
- func (entity *SoftwarePkgBasicInfo) ReviewResult() dp.PackageReviewResult
- func (entity *SoftwarePkgBasicInfo) UpdateApplication(cmd *SoftwarePkgApplication, user *User) error
- type SoftwarePkgCI
- type SoftwarePkgOperationLog
- type SoftwarePkgReviewComment
- type SoftwarePkgSourceCode
- type SoftwarePkgTranslatedReviewComment
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NewSoftwarePkgAppUpdatedEvent = NewSoftwarePkgAppliedEvent NewSoftwarePkgInitializedEvent = NewSoftwarePkgApprovedEvent )
Functions ¶
func NewSoftwarePkgAlreadyExistEvent ¶
func NewSoftwarePkgAlreadyExistEvent(pkg dp.PackageName) softwarePkgAlreadyExistedEvent
func NewSoftwarePkgAppliedEvent ¶
func NewSoftwarePkgAppliedEvent(pkg *SoftwarePkgBasicInfo) softwarePkgAppliedEvent
func NewSoftwarePkgApprovedEvent ¶
func NewSoftwarePkgApprovedEvent(pkg *SoftwarePkgBasicInfo) softwarePkgApprovedEvent
func ParseErrorCode ¶
Types ¶
type Config ¶
type Config struct {
EcopkgSig string `json:"ecopkg_sig"`
MinNumApprovedByTC int `json:"min_num_approved_by_tc"`
MinNumApprovedBySigMaintainer int `json:"min_num_approved_by_sig_maintainer"`
}
func (*Config) SetDefault ¶
func (cfg *Config) SetDefault()
type RepoCreatedInfo ¶
type RepoCreatedInfo struct {
Platform dp.PackagePlatform
RepoLink dp.URL
}
type SoftwarePkg ¶
type SoftwarePkg struct {
SoftwarePkgBasicInfo
Logs []SoftwarePkgOperationLog
Comments []SoftwarePkgReviewComment
}
SoftwarePkg
type SoftwarePkgApplication ¶
type SoftwarePkgApplication struct {
SourceCode SoftwarePkgSourceCode
PackageDesc dp.PackageDesc
PackagePlatform dp.PackagePlatform
ImportingPkgSig dp.ImportingPkgSig
ReasonToImportPkg dp.ReasonToImportPkg
}
SoftwarePkgApplication
type SoftwarePkgApprover ¶
SoftwarePkgApprover
func StringToSoftwarePkgApprover ¶
func StringToSoftwarePkgApprover(s string) (r SoftwarePkgApprover, err error)
func (*SoftwarePkgApprover) String ¶
func (approver *SoftwarePkgApprover) String() string
type SoftwarePkgBasicInfo ¶
type SoftwarePkgBasicInfo struct {
Id string
PkgName dp.PackageName
Importer Importer
RepoLink dp.URL
Phase dp.PackagePhase
CI SoftwarePkgCI
AppliedAt int64
Application SoftwarePkgApplication
ApprovedBy []SoftwarePkgApprover
RejectedBy []SoftwarePkgApprover
RelevantPR dp.URL
}
SoftwarePkgBasicInfo
func NewSoftwarePkg ¶
func NewSoftwarePkg(user *User, name dp.PackageName, app *SoftwarePkgApplication) SoftwarePkgBasicInfo
func (*SoftwarePkgBasicInfo) Abandon ¶
func (entity *SoftwarePkgBasicInfo) Abandon(user *User) error
func (*SoftwarePkgBasicInfo) ApproveBy ¶
func (entity *SoftwarePkgBasicInfo) ApproveBy(user *SoftwarePkgApprover) (bool, error)
func (*SoftwarePkgBasicInfo) CanAddReviewComment ¶
func (entity *SoftwarePkgBasicInfo) CanAddReviewComment() bool
func (*SoftwarePkgBasicInfo) HandleCIChecked ¶
func (entity *SoftwarePkgBasicInfo) HandleCIChecked(success bool, prNum int) error
func (*SoftwarePkgBasicInfo) HandleCIChecking ¶
func (entity *SoftwarePkgBasicInfo) HandleCIChecking() error
func (*SoftwarePkgBasicInfo) HandleCodeSaved ¶
func (entity *SoftwarePkgBasicInfo) HandleCodeSaved(info RepoCreatedInfo) error
func (*SoftwarePkgBasicInfo) HandlePkgAlreadyExisted ¶
func (entity *SoftwarePkgBasicInfo) HandlePkgAlreadyExisted() error
func (*SoftwarePkgBasicInfo) HandlePkgInitialized ¶
func (entity *SoftwarePkgBasicInfo) HandlePkgInitialized(pr dp.URL) error
func (*SoftwarePkgBasicInfo) HandleRepoCreated ¶
func (entity *SoftwarePkgBasicInfo) HandleRepoCreated(info RepoCreatedInfo) error
func (*SoftwarePkgBasicInfo) RejectBy ¶
func (entity *SoftwarePkgBasicInfo) RejectBy(user *SoftwarePkgApprover) error
func (*SoftwarePkgBasicInfo) RerunCI ¶
func (entity *SoftwarePkgBasicInfo) RerunCI(user *User) (bool, error)
func (*SoftwarePkgBasicInfo) ReviewResult ¶
func (entity *SoftwarePkgBasicInfo) ReviewResult() dp.PackageReviewResult
func (*SoftwarePkgBasicInfo) UpdateApplication ¶
func (entity *SoftwarePkgBasicInfo) UpdateApplication(cmd *SoftwarePkgApplication, user *User) error
type SoftwarePkgCI ¶
type SoftwarePkgCI struct {
PRNum int
Status dp.PackageCIStatus
}
SoftwarePkgCI
type SoftwarePkgOperationLog ¶
type SoftwarePkgOperationLog struct {
Id string
PkgId string
Time int64
User dp.Account
Action dp.PackageOperationLogAction
}
SoftwarePkgOperationLog
func NewSoftwarePkgOperationLog ¶
func NewSoftwarePkgOperationLog( user dp.Account, action dp.PackageOperationLogAction, pkgId string, ) SoftwarePkgOperationLog
func (*SoftwarePkgOperationLog) String ¶
func (log *SoftwarePkgOperationLog) String() string
type SoftwarePkgReviewComment ¶
type SoftwarePkgReviewComment struct {
Id string
CreatedAt int64
Author dp.Account
Content dp.ReviewComment
}
SoftwarePkgReviewComment
func NewSoftwarePkgReviewComment ¶
func NewSoftwarePkgReviewComment( author dp.Account, content dp.ReviewComment, ) SoftwarePkgReviewComment
type SoftwarePkgSourceCode ¶
type SoftwarePkgTranslatedReviewComment ¶
type SoftwarePkgTranslatedReviewComment struct {
Id string
CommentId string
Content string
Language dp.Language
}
SoftwarePkgTranslatedReviewComment
func NewSoftwarePkgTranslatedReviewComment ¶
func NewSoftwarePkgTranslatedReviewComment( comment *SoftwarePkgReviewComment, content string, lang dp.Language, ) SoftwarePkgTranslatedReviewComment
Source Files
¶
Click to show internal directories.
Click to hide internal directories.