Documentation
¶
Index ¶
- Variables
- func Init(cfg *Config, sv SigValidator)
- func IsPkgReviewResultApproved(r PackageReviewResult) bool
- func IsPkgReviewResultRejected(r PackageReviewResult) bool
- func IsSameAccount(a, b Account) bool
- func IsSamePlatform(a, b PackagePlatform) bool
- type Account
- type Config
- type Email
- type ImportingPkgSig
- type Language
- type License
- type PackageCIStatus
- type PackageDesc
- type PackageName
- type PackageOperationLogAction
- type PackagePhase
- type PackagePlatform
- type PackageReviewResult
- type ReasonToImportPkg
- type ReviewComment
- type SigValidator
- type URL
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PackageCIStatusFailed = packageCIStatus(packageCIStatusFailed) PackageCIStatusPassed = packageCIStatus(packageCIStatusPassed) PackageCIStatusRunning = packageCIStatus(packageCIStatusRunning) PackageCIStatusWaiting = packageCIStatus(packageCIStatusWaiting) )
View Source
var ( PackageOperationLogActionUpdate = packageOperationLogAction(packageOperationLogActionUpdate) PackageOperationLogActionReject = packageOperationLogAction(packageOperationLogActionReject) PackageOperationLogActionApprove = packageOperationLogAction(packageOperationLogActionApprove) PackageOperationLogActionAbandon = packageOperationLogAction(packageOperationLogActionAbandon) PackageOperationLogActionResunci = packageOperationLogAction(packageOperationLogActionRerunci) )
View Source
var ( PackagePhaseCreatingRepo = packagePhase(packagePhaseCreatingRepo) PackagePhaseReviewing = packagePhase(packagePhaseReviewing) PackagePhaseImported = packagePhase(packagePhaseImported) PackagePhaseClosed = packagePhase(packagePhaseClosed) )
View Source
var ( PkgReviewResultRejected = packageReviewResult(pkgReviewResultRejected) PkgReviewResultApproved = packageReviewResult(pkgReviewResultApproved) )
Functions ¶
func Init ¶
func Init(cfg *Config, sv SigValidator)
func IsPkgReviewResultApproved ¶
func IsPkgReviewResultApproved(r PackageReviewResult) bool
func IsPkgReviewResultRejected ¶
func IsPkgReviewResultRejected(r PackageReviewResult) bool
func IsSameAccount ¶
func IsSamePlatform ¶
func IsSamePlatform(a, b PackagePlatform) bool
Types ¶
type Config ¶
type Config struct { SupportedLanguages []string `json:"supported_languages" required:"true"` SupportedPlatforms []string `json:"supported_platforms" required:"true"` LocalPlatform string `json:"local_platform" required:"true"` MaxLengthOfPackageName int `json:"max_length_of_pkg_name"` MaxLengthOfPackageDesc int `json:"max_length_of_pkg_desc"` MaxLengthOfReviewComment int `json:"max_length_of_review_comment"` MaxLengthOfReasonToImportPkg int `json:"max_length_of_reason_to_import_pkg"` }
func (*Config) SetDefault ¶
func (cfg *Config) SetDefault()
type ImportingPkgSig ¶
type ImportingPkgSig interface {
ImportingPkgSig() string
}
ImportingPkgSig
func NewImportingPkgSig ¶
func NewImportingPkgSig(v string) (ImportingPkgSig, error)
type PackageCIStatus ¶
type PackageCIStatus interface { PackageCIStatus() string IsCIFailed() bool IsCIPassed() bool IsCIRunning() bool IsCIWaiting() bool }
func NewPackageCIStatus ¶
func NewPackageCIStatus(v string) (PackageCIStatus, error)
type PackageDesc ¶
type PackageDesc interface {
PackageDesc() string
}
func NewPackageDesc ¶
func NewPackageDesc(v string) (PackageDesc, error)
type PackageName ¶
type PackageName interface {
PackageName() string
}
func NewPackageName ¶
func NewPackageName(v string) (PackageName, error)
type PackageOperationLogAction ¶
type PackageOperationLogAction interface {
PackageOperationLogAction() string
}
func NewPackageOperationLogAction ¶
func NewPackageOperationLogAction(action string) PackageOperationLogAction
type PackagePhase ¶
type PackagePhase interface { PackagePhase() string IsClosed() bool IsReviewing() bool IsCreatingRepo() bool }
func NewPackagePhase ¶
func NewPackagePhase(v string) (PackagePhase, error)
type PackagePlatform ¶
func NewPackagePlatform ¶
func NewPackagePlatform(v string) (PackagePlatform, error)
type PackageReviewResult ¶
type PackageReviewResult interface {
PackageReviewResult() string
}
type ReasonToImportPkg ¶
type ReasonToImportPkg interface {
ReasonToImportPkg() string
}
func NewReasonToImportPkg ¶
func NewReasonToImportPkg(v string) (ReasonToImportPkg, error)
type ReviewComment ¶
type ReviewComment interface { ReviewComment() string ParseReviewComment() (isCmd, isApprove bool) }
func NewReviewComment ¶
func NewReviewComment(v string) (ReviewComment, error)
type SigValidator ¶
Click to show internal directories.
Click to hide internal directories.