domain

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NewSoftwarePkgAppUpdatedEvent  = NewSoftwarePkgAppliedEvent
	NewSoftwarePkgInitializedEvent = NewSoftwarePkgApprovedEvent
)

Functions

func Init

func Init(cfg *Config)

func NewSoftwarePkgAlreadyExistEvent

func NewSoftwarePkgAlreadyExistEvent(pkg dp.PackageName) softwarePkgAlreadyExistedEvent

func NewSoftwarePkgAppliedEvent

func NewSoftwarePkgAppliedEvent(pkg *SoftwarePkgBasicInfo) softwarePkgAppliedEvent

func NewSoftwarePkgApprovedEvent

func NewSoftwarePkgApprovedEvent(pkg *SoftwarePkgBasicInfo) softwarePkgApprovedEvent

func ParseErrorCode

func ParseErrorCode(err error) string

func UnmarshalToSoftwarePkgAlreadyExistEvent

func UnmarshalToSoftwarePkgAlreadyExistEvent(data []byte) (
	e softwarePkgAlreadyExistedEvent, err error,
)

func UnmarshalToSoftwarePkgAppliedEvent

func UnmarshalToSoftwarePkgAppliedEvent(data []byte) (e softwarePkgAppliedEvent, err error)

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 Importer

type Importer struct {
	Email   dp.Email
	Account dp.Account
}

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

type SoftwarePkgApprover struct {
	Account dp.Account
	IsTC    bool
}

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 SoftwarePkgSourceCode struct {
	SpecURL   dp.URL
	Upstream  dp.URL
	SrcRPMURL dp.URL
}

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

type User

type User struct {
	Importer

	GiteeID string
}

Jump to

Keyboard shortcuts

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