Documentation ¶
Overview ¶
Package ctpm manages the action of the various CLI commands.
Index ¶
- Variables
- func Add(pc *config.ProjectConfig, opts AddOptions) error
- func AddDependenciesAndBuild(pc *config.ProjectConfig) error
- func Build(pc *config.ProjectConfig) error
- func Init(pc *config.ProjectConfig, opt InitOptions) error
- func Install(name, version string) error
- func Login(client api.API, login, password string) error
- func Logout() error
- func Publish(pc *config.ProjectConfig, client api.API) error
- func Remove(pc *config.ProjectConfig, opts RemoveOptions) error
- type AddOptions
- type DependencyFetcher
- type InitOptions
- type InstallHandler
- type RemoveOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var InitDefaultOptions = InitOptions{ NoTemplate: false, }
Functions ¶
func Add ¶
func Add(pc *config.ProjectConfig, opts AddOptions) error
func AddDependenciesAndBuild ¶ added in v0.1.0
func AddDependenciesAndBuild(pc *config.ProjectConfig) error
func Build ¶
func Build(pc *config.ProjectConfig) error
func Init ¶
func Init(pc *config.ProjectConfig, opt InitOptions) error
func Install ¶
Install fetches the package, unpacks it in the c3pm cache and builds it. If the lib already is in the cache, we don't do anything
func Publish ¶
func Publish(pc *config.ProjectConfig, client api.API) error
Publish function makes an array of the files to include in the tarball based on the Include and Exclude fields of the c3pm.yaml The array is then given to the Upload function in the client We enforce the exclusion of the .git and .c3pm directories and we enforce the inclusion of the c3pm.yml file
func Remove ¶ added in v0.1.0
func Remove(pc *config.ProjectConfig, opts RemoveOptions) error
Types ¶
type AddOptions ¶
type DependencyFetcher ¶ added in v0.2.0
type DependencyFetcher struct{}
func (DependencyFetcher) FetchDeps ¶ added in v0.2.0
func (d DependencyFetcher) FetchDeps(request dependencies.PackageRequest) (dependencies.Dependencies, error)
func (DependencyFetcher) PostAct ¶ added in v0.2.0
func (d DependencyFetcher) PostAct(_ dependencies.PackageRequest) error
func (DependencyFetcher) PreAct ¶ added in v0.2.0
func (d DependencyFetcher) PreAct(_ dependencies.PackageRequest) error
type InitOptions ¶
type InitOptions struct {
NoTemplate bool
}
type InstallHandler ¶ added in v0.2.0
type InstallHandler struct{}
func (InstallHandler) FetchDeps ¶ added in v0.2.0
func (i InstallHandler) FetchDeps(request dependencies.PackageRequest) (dependencies.Dependencies, error)
func (InstallHandler) PostAct ¶ added in v0.2.0
func (i InstallHandler) PostAct(request dependencies.PackageRequest) error
func (InstallHandler) PreAct ¶ added in v0.2.0
func (i InstallHandler) PreAct(request dependencies.PackageRequest) error
type RemoveOptions ¶ added in v0.1.0
type RemoveOptions struct {
Dependencies []string
}
Click to show internal directories.
Click to hide internal directories.