dp

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 (
	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 IsSameAccount(a, b Account) bool

func IsSamePlatform

func IsSamePlatform(a, b PackagePlatform) bool

Types

type Account

type Account interface {
	Account() string
}

Account

func NewAccount

func NewAccount(v string) (Account, error)

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()

func (*Config) Validate

func (cfg *Config) Validate() error

type Email

type Email interface {
	Email() string
}

Email

func NewEmail

func NewEmail(v string) (Email, error)

type ImportingPkgSig

type ImportingPkgSig interface {
	ImportingPkgSig() string
}

ImportingPkgSig

func NewImportingPkgSig

func NewImportingPkgSig(v string) (ImportingPkgSig, error)

type Language

type Language interface {
	Language() string
}

func NewLanguage

func NewLanguage(v string) (Language, error)

type License

type License interface {
	License() string
}

func NewLicense

func NewLicense(v string) (License, 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

type PackagePlatform interface {
	PackagePlatform() string
	IsLocalPlatform() bool
}

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

type SigValidator interface {
	IsValidSig(string) bool
}

type URL

type URL interface {
	URL() string
}

URL

func NewURL

func NewURL(v string) (URL, error)

Jump to

Keyboard shortcuts

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