Documentation ¶
Index ¶
- func CreateFromDir(client *occlient.Client, name string, ctype string, dir string, ...) error
- func CreateFromGit(client *occlient.Client, name string, ctype string, url string, ...) error
- func Delete(client *occlient.Client, name string, applicationName string, ...) (string, error)
- func Exists(client *occlient.Client, componentName, applicationName, projectName string) (bool, error)
- func GetComponentDesc(client *occlient.Client, cmpnt string, currentApplication string, ...) (componentType string, path string, componentURL string, ...)
- func GetComponentSource(client *occlient.Client, componentName string, applicationName string, ...) (string, string, error)
- func GetComponentType(client *occlient.Client, componentName string, applicationName string, ...) (string, error)
- func GetCurrent(client *occlient.Client, applicationName string, projectName string) (string, error)
- func PushLocal(client *occlient.Client, componentName string, dir string) error
- func RebuildGit(client *occlient.Client, componentName string) error
- func SetCurrent(client *occlient.Client, name string, applicationName string, ...) error
- func Update(client *occlient.Client, componentName string, to string, source string) error
- func WatchAndPush(client *occlient.Client, componentName string, applicationName, dir string, ...) error
- type ComponentInfo
- type LinkInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFromDir ¶
func CreateFromDir(client *occlient.Client, name string, ctype string, dir string, applicationName string) error
CreateFromDir create new component with source from local directory
func CreateFromGit ¶
func Delete ¶
func Delete(client *occlient.Client, name string, applicationName string, projectName string) (string, error)
Delete whole component
func Exists ¶ added in v0.0.4
func Exists(client *occlient.Client, componentName, applicationName, projectName string) (bool, error)
Checks whether a component with the given name exists in the current application or not componentName is the component name to perform check for The first returned parameter is a bool indicating if a component with the given name already exists or not The second returned parameter is the error that might occurs while execution
func GetComponentDesc ¶ added in v0.0.4
func GetComponentDesc(client *occlient.Client, cmpnt string, currentApplication string, currentProject string) (componentType string, path string, componentURL string, appStore []storage.StorageInfo, err error)
Get Component Description
func GetComponentSource ¶ added in v0.0.3
func GetComponentSource(client *occlient.Client, componentName string, applicationName string, projectName string) (string, string, error)
GetComponentSource what source type given component uses The first returned string is component source type ("git" or "local") The second returned string is a source (url to git repository or local path)
func GetComponentType ¶ added in v0.0.3
func GetComponentType(client *occlient.Client, componentName string, applicationName string, projectName string) (string, error)
GetComponentType returns type of component in given application and project
func GetCurrent ¶
func GetCurrent(client *occlient.Client, applicationName string, projectName string) (string, error)
GetCurrent component in active application returns "" if there is no active component
func RebuildGit ¶ added in v0.0.3
RebuildGit rebuild git component from the git repo that it was created with
func SetCurrent ¶
func Update ¶ added in v0.0.4
Update updates the requested component Component name is the name component to be updated to indicates what type of source type the component source is changing to e.g from git to local source indicates dir or the git URL
func WatchAndPush ¶ added in v0.0.4
func WatchAndPush(client *occlient.Client, componentName string, applicationName, dir string, out io.Writer) error
WatchAndPush watches directory dir, if something changes in that directory calls push ignores .git/* by default inspired by https://github.com/openshift/origin/blob/e785f76194c57bd0e1674c2f2776333e1e0e4e78/pkg/oc/cli/cmd/rsync/rsync.go#L257
Types ¶
type ComponentInfo ¶ added in v0.0.3
ComponentInfo holds all important information about one component