composer

package
v0.0.0-...-bc0646a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2016 License: MIT Imports: 16 Imported by: 0

Documentation

Index

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 NewPackageInfoPat() goji.Pattern

func NewPackagePat

func NewPackagePat() goji.Pattern

Types

type ComposerConfig

type ComposerConfig struct {
	SourceServer string
	Code         []byte
	Path         string
}

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

func (ps *ComposerService) Get(key string) ([]byte, error)

func (*ComposerService) GetPackage

func (ps *ComposerService) GetPackage(key string) (*PackageInformation, error)

func (*ComposerService) Init

func (ps *ComposerService) Init(app *goapp.App) 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 {
}

func (*PackageInfoPat) Match

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 {
}

func (*PackagePat) Match

func (pp *PackagePat) Match(ctx context.Context, r *http.Request) context.Context

type PackageResult

type PackageResult struct {
	Packages map[string]map[string]*Package `json:"packages"`
}

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 ProviderInclude map[string]struct {
	Sha256 string `json:"sha256"`
}

type ProvidersResult

type ProvidersResult struct {
	Providers map[string]struct {
		Sha256 string `json:"sha256"`
	} `json:"providers"`
	Code string `json:"-"`
}

Jump to

Keyboard shortcuts

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