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 AddDependenciesAndTest(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 List(pc *config.ProjectConfig, opt ListOptions) 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
- func Test(pc *config.ProjectConfig) error
- type AddOptions
- type DependencyBranch
- type DependencyBuilder
- type DependencyFetcher
- type DependencyNode
- type InitOptions
- type InstallHandler
- type ListOptions
- type RemoveOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var InitDefaultOptions = InitOptions{ NoTemplate: false, }
View Source
var ListDefaultOptions = ListOptions{ Tree: 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 AddDependenciesAndTest ¶ added in v0.3.0
func AddDependenciesAndTest(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 List ¶ added in v0.3.0
func List(pc *config.ProjectConfig, opt ListOptions) error
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
func Test ¶ added in v0.3.0
func Test(pc *config.ProjectConfig) error
Types ¶
type AddOptions ¶
type DependencyBranch ¶ added in v0.3.0
type DependencyBranch []*DependencyNode
func (DependencyBranch) String ¶ added in v0.3.0
func (d DependencyBranch) String() string
type DependencyBuilder ¶ added in v0.3.0
type DependencyBuilder struct {
Done manifest.Dependencies
}
func (DependencyBuilder) FetchDeps ¶ added in v0.3.0
func (d DependencyBuilder) FetchDeps(request dependencies.PackageRequest) (dependencies.Dependencies, error)
func (DependencyBuilder) PostAct ¶ added in v0.3.0
func (d DependencyBuilder) PostAct(request dependencies.PackageRequest) error
func (DependencyBuilder) PreAct ¶ added in v0.3.0
func (d DependencyBuilder) PreAct(_ dependencies.PackageRequest) error
type DependencyFetcher ¶ added in v0.2.0
type DependencyFetcher struct { Done manifest.Dependencies CurrentNode *DependencyNode CurrentBranch DependencyBranch }
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 DependencyNode ¶ added in v0.3.0
type DependencyNode struct { Children []*DependencyNode Name string }
func (DependencyNode) String ¶ added in v0.3.0
func (d DependencyNode) String() string
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 ListOptions ¶ added in v0.3.0
type ListOptions struct {
Tree bool
}
type RemoveOptions ¶ added in v0.1.0
type RemoveOptions struct {
Dependencies []string
}
Click to show internal directories.
Click to hide internal directories.