Documentation ¶
Index ¶
- Constants
- func BuildInstallSummary(installData *InstallData) string
- func BuildUninstallSummary(installData *InstallData) string
- func ValidateModLocation(ctx context.Context, workspacePath string) bool
- type ByteSequence
- type Change
- type ChangeOperation
- type ChangeSet
- type DependencyMod
- type GitUrlMode
- type InstallData
- func InstallWorkspaceDependencies(ctx context.Context, opts *InstallOpts) (_ *InstallData, err error)
- func NewInstallData(workspaceLock *versionmap.WorkspaceLock, workspaceMod *modconfig.Mod) *InstallData
- func UninstallWorkspaceDependencies(ctx context.Context, opts *InstallOpts) (_ *InstallData, err error)
- type InstallOpts
- type ModInstaller
- func (i *ModInstaller) GetModList() string
- func (i *ModInstaller) GetRequiredModVersionsFromArgs(modsArgs []string) (map[string]*modconfig.ModVersionConstraint, error)
- func (i *ModInstaller) InstallWorkspaceDependencies(ctx context.Context) (err error)
- func (i *ModInstaller) Prune() (versionmap.DependencyVersionListMap, error)
- func (i *ModInstaller) UninstallWorkspaceDependencies(ctx context.Context) error
- type OperatorFunc
Constants ¶
View Source
const ( PersonalAccessTokenPrefix = "ghp_" FineGrainedPersonalAccessTokenPrefix = "github_pat_" //nolint:gosec // this is just the prefix OAuthAccessTokenPrefix = "gho_" GitHubAppUserAccessTokenPrefix = "ghu_" GitHubAppInstallationAccessTokenPrefix = "ghs_" GitHubAppRefreshTokenPrefix = "ghr_" )
View Source
const ( VerbInstalled = "Installed" VerbUninstalled = "Uninstalled" VerbUpgraded = "Upgraded" VerbDowngraded = "Downgraded" VerbPruned = "Pruned" )
Variables ¶
This section is empty.
Functions ¶
func BuildInstallSummary ¶
func BuildInstallSummary(installData *InstallData) string
func BuildUninstallSummary ¶
func BuildUninstallSummary(installData *InstallData) string
Types ¶
type ByteSequence ¶
type ByteSequence struct {
// contains filtered or unexported fields
}
func NewByteSequence ¶
func NewByteSequence(b []byte) *ByteSequence
func (*ByteSequence) Apply ¶
func (b *ByteSequence) Apply(apply func([]byte) []byte)
Apply applies the given function on the byte sequence
func (*ByteSequence) ApplyChanges ¶
func (b *ByteSequence) ApplyChanges(changeSet ChangeSet)
func (*ByteSequence) Bytes ¶
func (b *ByteSequence) Bytes() []byte
Bytes returns the current underlying byte sequence
type Change ¶
type Change struct { Content []byte Operation ChangeOperation OffsetStart int OffsetEnd int }
type ChangeOperation ¶
type ChangeOperation int
const ( Insert ChangeOperation = iota Delete Replace )
type ChangeSet ¶
type ChangeSet []*Change
func EmptyChangeSet ¶
func EmptyChangeSet() ChangeSet
func MergeChangeSet ¶
MergeChangeSet creates a ChangeSet by merging the given ChangeSets in order
func NewChangeSet ¶
NewChangeSet creates a ChangeSet from the given changes
func (ChangeSet) SortByOffset ¶
func (c ChangeSet) SortByOffset()
type DependencyMod ¶ added in v1.3.0
type DependencyMod struct { InstalledVersion *versionmap.InstalledModVersion Mod *modconfig.Mod }
DependencyMod is a mod which has been installed as a dependency
type InstallData ¶
type InstallData struct { // record of the full dependency tree Lock *versionmap.WorkspaceLock NewLock *versionmap.WorkspaceLock Installed [][]string Uninstalled [][]string Upgraded [][]string Downgraded [][]string WorkspaceMod *modconfig.Mod // contains filtered or unexported fields }
func InstallWorkspaceDependencies ¶
func InstallWorkspaceDependencies(ctx context.Context, opts *InstallOpts) (_ *InstallData, err error)
func NewInstallData ¶
func NewInstallData(workspaceLock *versionmap.WorkspaceLock, workspaceMod *modconfig.Mod) *InstallData
func UninstallWorkspaceDependencies ¶
func UninstallWorkspaceDependencies(ctx context.Context, opts *InstallOpts) (_ *InstallData, err error)
type InstallOpts ¶
type InstallOpts struct { WorkspaceMod *modconfig.Mod Command string ModArgs []string DryRun bool Force bool PluginVersions *plugin.PluginVersionMap UpdateStrategy string }
func NewInstallOpts ¶
func NewInstallOpts(workspaceMod *modconfig.Mod, modsToInstall ...string) *InstallOpts
type ModInstaller ¶
type ModInstaller struct {
// contains filtered or unexported fields
}
func NewModInstaller ¶
func NewModInstaller(opts *InstallOpts) (*ModInstaller, error)
func (*ModInstaller) GetModList ¶
func (i *ModInstaller) GetModList() string
func (*ModInstaller) GetRequiredModVersionsFromArgs ¶
func (i *ModInstaller) GetRequiredModVersionsFromArgs(modsArgs []string) (map[string]*modconfig.ModVersionConstraint, error)
func (*ModInstaller) InstallWorkspaceDependencies ¶
func (i *ModInstaller) InstallWorkspaceDependencies(ctx context.Context) (err error)
InstallWorkspaceDependencies installs all dependencies of the workspace mod
func (*ModInstaller) Prune ¶
func (i *ModInstaller) Prune() (versionmap.DependencyVersionListMap, error)
func (*ModInstaller) UninstallWorkspaceDependencies ¶
func (i *ModInstaller) UninstallWorkspaceDependencies(ctx context.Context) error
type OperatorFunc ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.