Documentation ¶
Overview ¶
Copyright © 2019 Marcello de Sales <marcello.desales@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2019 Marcello de Sales <marcello.desales@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2019 Marcello de Sales <marcello.desales@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func CloneGitRepo(cloneRequest *CloneGitRepoRequest, config *config.Configuration) (int, []error)
- type CloneGitRepoRequest
- type GitRepoType
- type GitServiceType
- func (service GitServiceType) GetOrgLocalPath(gitRepoClone *CloneGitRepoRequest, config *config.Configuration) string
- func (service GitServiceType) GetRepoLocalPath(gitRepoClone *CloneGitRepoRequest, config *config.Configuration) string
- func (service GitServiceType) GoCloneRepo(gitRepoCloneRequest *CloneGitRepoRequest, config *config.Configuration) error
- func (service GitServiceType) GoPrintTree(gitRepoClone *CloneGitRepoRequest) (string, error)
- func (service GitServiceType) Init(repoUrl, privateKeyPath string, forceClone bool) (*CloneGitRepoRequest, error)
- func (service GitServiceType) MakeCloneDir(gitRepoClone *CloneGitRepoRequest, config *config.Configuration) error
- func (service GitServiceType) ParseRepoString(gitRepoClone *CloneGitRepoRequest) error
- func (service GitServiceType) VerifyCloneDir(gitRepoClone *CloneGitRepoRequest, config *config.Configuration) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneGitRepo ¶
func CloneGitRepo(cloneRequest *CloneGitRepoRequest, config *config.Configuration) (int, []error)
*
- Clones the repo implementation, returning the exit code and any error message
Types ¶
type CloneGitRepoRequest ¶
type GitRepoType ¶
func (GitRepoType) GetRepoDir ¶
func (gitRepo GitRepoType) GetRepoDir() string
func (GitRepoType) GetUserDir ¶
func (gitRepo GitRepoType) GetUserDir() string
type GitServiceType ¶
type GitServiceType struct{}
var GitService GitServiceType
func (GitServiceType) GetOrgLocalPath ¶
func (service GitServiceType) GetOrgLocalPath(gitRepoClone *CloneGitRepoRequest, config *config.Configuration) string
*
- Get the repo clone dir expected to be created
func (GitServiceType) GetRepoLocalPath ¶
func (service GitServiceType) GetRepoLocalPath(gitRepoClone *CloneGitRepoRequest, config *config.Configuration) string
*
- Get the org
func (GitServiceType) GoCloneRepo ¶
func (service GitServiceType) GoCloneRepo(gitRepoCloneRequest *CloneGitRepoRequest, config *config.Configuration) error
*
- Clone the git repo to the clone location using go-git based on the request
func (GitServiceType) GoPrintTree ¶
func (service GitServiceType) GoPrintTree(gitRepoClone *CloneGitRepoRequest) (string, error)
*
- Print the list of the files in the dir just like the "tree" unix command
func (GitServiceType) Init ¶
func (service GitServiceType) Init(repoUrl, privateKeyPath string, forceClone bool) (*CloneGitRepoRequest, error)
Init from the CLI inputs
func (GitServiceType) MakeCloneDir ¶
func (service GitServiceType) MakeCloneDir(gitRepoClone *CloneGitRepoRequest, config *config.Configuration) error
*
- Makes the base clone dir is the org and parts of the repo dir since the clone service creates the repo dir
func (GitServiceType) ParseRepoString ¶
func (service GitServiceType) ParseRepoString(gitRepoClone *CloneGitRepoRequest) error
*
- @return a new instance of the GitRepoType
func (GitServiceType) VerifyCloneDir ¶
func (service GitServiceType) VerifyCloneDir(gitRepoClone *CloneGitRepoRequest, config *config.Configuration) (bool, error)
*
- Make sure the clone dir does not exist. If it does, force clone must be provided to not fail.