Documentation ¶
Overview ¶
Copyright © 2021 Jose Ramon Mañes jr.mb47@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 © 2021 Jose Ramon Mañes jr.mb47@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 CheckSonarResponse(resp *http.Response, err error) error
- func CommandExists(cmd string) bool
- func ConfigureSystem()
- func CreateFileInPath(configHome, configPath string) error
- func CreateFileWithContent(path, content string) string
- func Execute()
- func GetTokenInFile(tokenName string) (string, error)
- func LinuxConfigSystem(debug bool) error
- func LinuxPkg(debug bool)
- func MacOSPkg(debug bool)
- func SonarScanner(p, token string) error
- func StartSonar(cmd *cobra.Command)
- type Command
- type Commands
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSonarResponse ¶
CheckSonarResponse verify if the response of SQ after generate the token
func CommandExists ¶
CommandExists verify if a command exists in path
func ConfigureSystem ¶
func ConfigureSystem()
ConfigureSystem set the needed path to the sysctl https: //docs.sonarqube.org/latest/requirements/requirements/
func CreateFileInPath ¶
CreateFileInPath Create a file in a path
func CreateFileWithContent ¶
CreateFileWithContent generates the docker file in the path specified
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func GetTokenInFile ¶
GetTokenInFile check the content inside the file and return it
func LinuxConfigSystem ¶
LinuxConfigSystem Configure system to execute SonarQube in Linux
func LinuxPkg ¶
func LinuxPkg(debug bool)
LinuxPkg Install needed SonarQube packages for Linux environments
func MacOSPkg ¶
func MacOSPkg(debug bool)
MacOSPkg Install needed SonarQube packages for MacOS environments
func SonarScanner ¶
SonarScanner executes the scanner of code
func StartSonar ¶
StartSonar initialize all the subcommands and detect the arguments
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command struct which contains an info message, command to execute and an array of arguments
type TokenResponse ¶
type TokenResponse struct { // Login kind of login Login string `json:"login"` // Name of the token Name string `json:"name"` // Token value of the token Token string `json:"token"` // CreatedAt timestamp about the creation CreatedAt string `json:"createdAt"` }
TokenResponse is the struct that we use for our Sonar responses