Documentation ¶
Index ¶
- Variables
- func ModuleName(spec string) string
- type Composer
- func (composer *Composer) Exec(ctx context.Context, progress io.Writer, command ...string) error
- func (composer *Composer) ExecWissKI(ctx context.Context, progress io.Writer, command ...string) error
- func (composer *Composer) FixPermission(ctx context.Context, progress io.Writer) error
- func (composer *Composer) Install(ctx context.Context, progress io.Writer, args ...string) error
- func (drush *Composer) LastUpdate(ctx context.Context) (t time.Time, err error)
- func (composer *Composer) TryInstall(ctx context.Context, progress io.Writer, spec string) error
- func (composer *Composer) Update(ctx context.Context, progress io.Writer) (err error)
- type LastUpdateFetcher
Constants ¶
This section is empty.
Variables ¶
var ErrNotInstalled = errors.New("Composer: Not installed")
Functions ¶
func ModuleName ¶
ModuleName extracts the module name from a specification. If the module name cannot be found, returns the string unchanged
Types ¶
type Composer ¶
type Composer struct { ingredient.Base // contains filtered or unexported fields }
Drush implements commands related to drush
func (*Composer) Exec ¶
Exec executes a composer command for the main composer package. Returns an error iff composer does not exit with 0.
func (*Composer) ExecWissKI ¶
func (composer *Composer) ExecWissKI(ctx context.Context, progress io.Writer, command ...string) error
Exec executes a composer command for the wisski directory. Returns an error iff composer does not exit with 0.
func (*Composer) FixPermission ¶
FixPermissions fixes the permissions of the sites directory. This needs to be run after every installation of a composer module.
func (*Composer) Install ¶
Install attempts runs 'composer require' with the given arguments Spec is like a specification on the command line.
func (*Composer) LastUpdate ¶
func (*Composer) TryInstall ¶
TryInstall attempts to install the given package. If it cannot be installed, returns ErrNotInstalled.
type LastUpdateFetcher ¶
type LastUpdateFetcher struct { ingredient.Base // contains filtered or unexported fields }
func (*LastUpdateFetcher) Fetch ¶
func (lbr *LastUpdateFetcher) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error)