Documentation
¶
Index ¶
- Variables
- func NewPackageInfoPat() goji.Pattern
- func NewPackagePat() goji.Pattern
- type ComposerConfig
- type ComposerService
- func (ps *ComposerService) CleanPackages() error
- func (ps *ComposerService) End() error
- func (ps *ComposerService) Get(key string) ([]byte, error)
- func (ps *ComposerService) GetPackage(key string) (*PackageInformation, error)
- func (ps *ComposerService) Init(app *goapp.App) error
- func (ps *ComposerService) Serve(state *goapp.GoroutineState) error
- func (ps *ComposerService) SyncPackages() error
- func (ps *ComposerService) UpdateEntryPoints() error
- func (ps *ComposerService) UpdatePackage(name string) error
- type Package
- type PackageInfoPat
- type PackageInformation
- type PackagePat
- type PackageResult
- type PackagesResult
- type ProviderInclude
- type ProvidersResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PAT_PACKAGE_VERSION_URL = regexp.MustCompile(`\/packagist\/p\/([^\/]*)\/([^\/]*)\$([^\/]*)\.json`) PAT_PACKAGE_INFORMATION_URL = regexp.MustCompile(`\/packagist\/p\/([^\/]*)\/([^\/]*)(.json|)`) )
Functions ¶
func NewPackageInfoPat ¶
func NewPackagePat ¶
Types ¶
type ComposerConfig ¶
type ComposerService ¶
type ComposerService struct {
DB *bolt.DB
Config *ComposerConfig
Logger *log.Entry
GitConfig *git.GitConfig
// contains filtered or unexported fields
}
func NewComposerService ¶
func NewComposerService() *ComposerService
func (*ComposerService) CleanPackages ¶
func (ps *ComposerService) CleanPackages() error
func (*ComposerService) End ¶
func (ps *ComposerService) End() error
func (*ComposerService) GetPackage ¶
func (ps *ComposerService) GetPackage(key string) (*PackageInformation, error)
func (*ComposerService) Serve ¶
func (ps *ComposerService) Serve(state *goapp.GoroutineState) error
func (*ComposerService) SyncPackages ¶
func (ps *ComposerService) SyncPackages() error
func (*ComposerService) UpdateEntryPoints ¶
func (ps *ComposerService) UpdateEntryPoints() error
This method generates the different entry points required by a repository.
func (*ComposerService) UpdatePackage ¶
func (ps *ComposerService) UpdatePackage(name string) error
type Package ¶
type Package struct {
Name string `json:"name"`
Description string `json:"description"`
Keywords []string `json:"keywords"`
Homepage string `json:"homepage"`
Version string `json:"version"`
VersionNormalized string `json:"version_normalized"`
License []string `json:"license"`
Authors []struct {
Name string `json:"name"`
Email string `json:"email"`
} `json:"authors"`
Source struct {
Type string `json:"type"`
URL string `json:"url"`
Reference string `json:"reference"`
} `json:"source"`
Dist struct {
Type string `json:"type"`
URL string `json:"url"`
Reference string `json:"reference"`
Shasum string `json:"shasum"`
} `json:"dist"`
Type string `json:"type"`
Time time.Time `json:"time"`
Autoload *json.RawMessage `json:"autoload"`
Require map[string]string `json:"require"`
RequireDevmap map[string]string `json:"require-dev"`
UID int `json:"uid"`
}
package description
type PackageInfoPat ¶
type PackageInfoPat struct {
}
type PackageInformation ¶
type PackageInformation struct {
Server string `json:"server"`
PackageResult PackageResult `json:"-"`
Package string `json:"package"`
Exist bool `json:"-"`
HashSource string `json:"hash_source"`
HashTarget string `json:"hash_target"`
}
func (*PackageInformation) GetSourceKey ¶
func (pi *PackageInformation) GetSourceKey() string
func (*PackageInformation) GetTargetKey ¶
func (pi *PackageInformation) GetTargetKey() string
type PackagePat ¶
type PackagePat struct {
}
type PackageResult ¶
used to load the packages.json file
type PackagesResult ¶
type PackagesResult struct {
Packages json.RawMessage `json:"packages"`
Notify string `json:"notify"`
NotifyBatch string `json:"notify-batch"`
ProvidersURL string `json:"providers-url"`
Search string `json:"search"`
ProviderIncludes ProviderInclude `json:"provider-includes"`
}
type ProviderInclude ¶
type ProvidersResult ¶
Click to show internal directories.
Click to hide internal directories.