ctpm

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package ctpm manages the action of the various CLI commands.

Index

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

func Install(name, version string) error

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 Login

func Login(client api.API, login, password string) error

func Logout

func Logout() 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 AddOptions struct {
	Force       bool
	RegistryURL string

	Dependencies []string
}

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 (DependencyBuilder) PostAct added in v0.3.0

func (DependencyBuilder) PreAct added in v0.3.0

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 (*DependencyFetcher) PostAct added in v0.2.0

func (*DependencyFetcher) PreAct added in v0.2.0

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 (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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL