Documentation
¶
Index ¶
- type ComposerAuth
- type ComposerAuthHttpBasic
- type ComposerFunding
- type ComposerJson
- func (c *ComposerJson) EnableComposerPlugin(name string)
- func (c *ComposerJson) HasConfig(key string) bool
- func (c *ComposerJson) HasPackage(name string) bool
- func (c *ComposerJson) HasPackageDev(name string) bool
- func (c *ComposerJson) RemoveComposerPlugin(name string)
- func (c *ComposerJson) Save() error
- type ComposerJsonAuthor
- type ComposerJsonAutoload
- type ComposerJsonRepositories
- type ComposerJsonRepository
- type ComposerJsonSupport
- type ComposerLock
- type ComposerLockPackage
- type ComposerPackageLink
- type GitlabOAuthToken
- type GitlabToken
- type PackageResponse
- type PackageVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComposerAuth ¶
type ComposerAuth struct {
HTTPBasicAuth map[string]ComposerAuthHttpBasic `json:"http-basic,omitempty"`
BearerAuth map[string]string `json:"bearer,omitempty"`
GitlabAuth map[string]GitlabToken `json:"gitlab-token,omitempty"`
GitlabOAuth map[string]GitlabOAuthToken `json:"gitlab-oauth,omitempty"`
GithubOAuth map[string]string `json:"github-oauth,omitempty"`
BitbucketOauth map[string]map[string]string `json:"bitbucket-oauth,omitempty"`
CustomHeaders map[string][]string `json:"custom-headers,omitempty"`
GitlabDomains []string `json:"gitlab-domains,omitempty"`
GithubDomains []string `json:"github-domains,omitempty"`
// contains filtered or unexported fields
}
func ReadComposerAuth ¶
func ReadComposerAuth(authFile string) (*ComposerAuth, error)
func (*ComposerAuth) Save ¶
func (a *ComposerAuth) Save() error
type ComposerAuthHttpBasic ¶
type ComposerFunding ¶
type ComposerJson ¶
type ComposerJson struct {
Name string `json:"name"`
Abandoned bool `json:"abandoned,omitempty"`
Bin []string `json:"bin,omitempty"`
Description string `json:"description,omitempty"`
Version string `json:"version,omitempty"`
Type string `json:"type,omitempty"`
Keywords []string `json:"keywords,omitempty"`
Homepage string `json:"homepage,omitempty"`
Readme string `json:"readme,omitempty"`
Time string `json:"time,omitempty"`
License string `json:"license,omitempty"`
MinimumStability string `json:"minimum-stability,omitempty"`
PreferStable bool `json:"prefer-stable,omitempty"`
Authors []ComposerJsonAuthor `json:"authors,omitempty"`
Support *ComposerJsonSupport `json:"support,omitempty"`
Funding []ComposerFunding `json:"funding,omitempty"`
Require ComposerPackageLink `json:"require,omitempty"`
RequireDev ComposerPackageLink `json:"require-dev,omitempty"`
Conflict ComposerPackageLink `json:"conflict,omitempty"`
Replace ComposerPackageLink `json:"replace,omitempty"`
Provide ComposerPackageLink `json:"provide,omitempty"`
Autoload ComposerJsonAutoload `json:"autoload,omitempty"`
AutoloadDev ComposerJsonAutoload `json:"autoload-dev,omitempty"`
Repositories ComposerJsonRepositories `json:"repositories,omitempty"`
Config map[string]any `json:"config,omitempty"`
Scripts map[string]any `json:"scripts,omitempty"`
Extra map[string]any `json:"extra,omitempty"`
Suggest map[string]string `json:"suggest,omitempty"`
NonFeatureBranches []string `json:"non-feature-branches,omitempty"`
// contains filtered or unexported fields
}
func ReadComposerJson ¶
func ReadComposerJson(composerPath string) (*ComposerJson, error)
func (*ComposerJson) EnableComposerPlugin ¶
func (c *ComposerJson) EnableComposerPlugin(name string)
func (*ComposerJson) HasConfig ¶
func (c *ComposerJson) HasConfig(key string) bool
func (*ComposerJson) HasPackage ¶
func (c *ComposerJson) HasPackage(name string) bool
func (*ComposerJson) HasPackageDev ¶
func (c *ComposerJson) HasPackageDev(name string) bool
func (*ComposerJson) RemoveComposerPlugin ¶
func (c *ComposerJson) RemoveComposerPlugin(name string)
func (*ComposerJson) Save ¶
func (c *ComposerJson) Save() error
type ComposerJsonAuthor ¶
type ComposerJsonAutoload ¶
type ComposerJsonRepositories ¶
type ComposerJsonRepositories []ComposerJsonRepository
func (*ComposerJsonRepositories) HasRepository ¶
func (r *ComposerJsonRepositories) HasRepository(url string) bool
func (*ComposerJsonRepositories) UnmarshalJSON ¶
func (e *ComposerJsonRepositories) UnmarshalJSON(data []byte) error
type ComposerJsonRepository ¶
type ComposerJsonSupport ¶
type ComposerJsonSupport struct {
Email string `json:"email,omitempty"`
Issues string `json:"issues,omitempty"`
Forum string `json:"forum,omitempty"`
Wiki string `json:"wiki,omitempty"`
IRC string `json:"irc,omitempty"`
Source string `json:"source,omitempty"`
Docs string `json:"docs,omitempty"`
RSS string `json:"rss,omitempty"`
Chat string `json:"chat,omitempty"`
Security string `json:"security,omitempty"`
}
type ComposerLock ¶
type ComposerLock struct {
Packages []ComposerLockPackage `json:"packages"`
}
func ReadComposerLock ¶
func ReadComposerLock(pathToFile string) (*ComposerLock, error)
func (*ComposerLock) GetPackage ¶
func (c *ComposerLock) GetPackage(name string) *ComposerLockPackage
type ComposerLockPackage ¶
type ComposerPackageLink ¶
type GitlabOAuthToken ¶
type GitlabOAuthToken struct {
ExpiresAt int64 `json:"expires-at,omitempty"`
RefreshToken string `json:"refresh-token,omitempty"`
Token string `json:"token"`
}
func (GitlabOAuthToken) MarshalJSON ¶
func (t GitlabOAuthToken) MarshalJSON() ([]byte, error)
func (*GitlabOAuthToken) UnmarshalJSON ¶
func (t *GitlabOAuthToken) UnmarshalJSON(data []byte) error
type GitlabToken ¶
func (GitlabToken) MarshalJSON ¶
func (t GitlabToken) MarshalJSON() ([]byte, error)
func (*GitlabToken) UnmarshalJSON ¶
func (t *GitlabToken) UnmarshalJSON(data []byte) error
type PackageResponse ¶
type PackageResponse struct {
Packages map[string]map[string]PackageVersion `json:"packages"`
}
func GetPackages ¶
func GetPackages(ctx context.Context, token string) (*PackageResponse, error)
func (*PackageResponse) HasPackage ¶
func (p *PackageResponse) HasPackage(name string) bool
type PackageVersion ¶
Click to show internal directories.
Click to hide internal directories.