Documentation ¶
Index ¶
- func BuildTemplate(name string) error
- func ConfigurationsDirectoryExist() bool
- func ConfigurationsFileExist() bool
- func CreateBasicProject(cmd *cobra.Command, name string) error
- func CreateCloudFormationProject(cmd *cobra.Command, name string) error
- func CreateCloudProject(cmd *cobra.Command, name string) error
- func CreateConfigurationsDirectory() (bool, string)
- func CreateTerraformProject(cmd *cobra.Command, name string) error
- func CredentialsFileExist() bool
- func DeleteConfigurationFile() error
- func DeleteConfigurationsDirectory() error
- func DeleteCredentialFile() error
- func DownloadGitIgnore(cmd *cobra.Command, input string) (bool, error)
- func DownloadPhoto(params model.UnsplashRandomPhotoParameters, cred model.Credential, ...) error
- func DownloadPhotoByID(r model.UnsplashGetPhotoResponse, size string) error
- func GetAppInfo() model.App
- func GetGitIgnoreList() string
- func GetModelFromFlags(cmd *cobra.Command) model.UnsplashRandomPhotoParameters
- func GetPhoto(id string, cred model.Credential) (model.UnsplashGetPhotoResponse, error)
- func GetSensitiveUserInput(cmd *cobra.Command, text string, info string) (string, error)
- func GetSensitiveUserInputAsString(cmd *cobra.Command, text string, info string) string
- func GetUserInputAsBool(cmd *cobra.Command, text string, info bool) bool
- func GetUserInputAsString(cmd *cobra.Command, text string, info string) string
- func InitCustomized(profile string, config model.Configurations) bool
- func ReadConfig(name string) (*viper.Viper, error)
- func ReadConfigAsViper(configPath string, configName string, configType string) (*viper.Viper, error)
- func ReadTemplate(fileName string) (*viper.Viper, error)
- func RequestRandomPhoto(params model.UnsplashRandomPhotoParameters, cred model.Credential) (model.UnsplashRandomPhotoResponse, error)
- func SaveGetPhotoResult(r model.UnsplashGetPhotoResponse)
- func SetupLoggingLevel(level string) error
- func SetupLoggingOutput(path string) error
- func UpdateReadMeLogoURL(readme model.ReadMe, response model.UnsplashRandomPhotoResponse) error
- func WriteInterfaceToFile(in interface{}, path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTemplate ¶
BuildTemplate build the given template located under clencli/ directory (without the .tmpl extension)
func ConfigurationsDirectoryExist ¶
func ConfigurationsDirectoryExist() bool
ConfigurationsDirectoryExist returns `true` if the configuration directory exist, `false` otherwise
func ConfigurationsFileExist ¶
func ConfigurationsFileExist() bool
ConfigurationsFileExist returns `true` if the configuration file exist, `false` otherwise
func CreateBasicProject ¶
CreateBasicProject creates a basic project
func CreateCloudFormationProject ¶
CreateCloudFormationProject creates an AWS CloudFormation project
func CreateCloudProject ¶
CreateCloudProject copies the necessary templates for cloud projects
func CreateConfigurationsDirectory ¶
CreateConfigurationsDirectory creates the configuration directory, returns `true` if the configuration directory exist, `false` otherwise
func CreateTerraformProject ¶
CreateTerraformProject creates a HashiCorp Terraform project
func CredentialsFileExist ¶
func CredentialsFileExist() bool
CredentialsFileExist returns `true` if the credentials file exist, `false` otherwise
func DeleteConfigurationFile ¶
func DeleteConfigurationFile() error
DeleteConfigurationFile delete the credentials file
func DeleteConfigurationsDirectory ¶
func DeleteConfigurationsDirectory() error
DeleteConfigurationsDirectory delete the configurations directory
func DeleteCredentialFile ¶
func DeleteCredentialFile() error
DeleteCredentialFile delete the credentials file
func DownloadGitIgnore ¶
DownloadGitIgnore ..
func DownloadPhoto ¶
func DownloadPhoto(params model.UnsplashRandomPhotoParameters, cred model.Credential, photoSizes []string) error
DownloadPhoto downloads a photo and saves into downloads/unsplash/ folder It creates the downloads/ folder if it doesn't exists
func DownloadPhotoByID ¶
func DownloadPhotoByID(r model.UnsplashGetPhotoResponse, size string) error
DownloadPhotoByID TODO ...
func GetModelFromFlags ¶
func GetModelFromFlags(cmd *cobra.Command) model.UnsplashRandomPhotoParameters
GetModelFromFlags fills the parameters onto the Unsplash Random Photo Parameters struct
func GetPhoto ¶
func GetPhoto(id string, cred model.Credential) (model.UnsplashGetPhotoResponse, error)
GetPhoto TODO..
func GetSensitiveUserInput ¶
GetSensitiveUserInput get sensitive input as string
func GetSensitiveUserInputAsString ¶
GetSensitiveUserInputAsString get sensitive input as string
func GetUserInputAsBool ¶
GetUserInputAsBool prints `text` on console and return answer as `boolean`
func GetUserInputAsString ¶
GetUserInputAsString prints `text` on console and return answer as `string`
func InitCustomized ¶
func InitCustomized(profile string, config model.Configurations) bool
InitCustomized TODO...
func ReadConfig ¶
ReadConfig returns the viper instance of the given configuration `name`
func ReadConfigAsViper ¶
func ReadConfigAsViper(configPath string, configName string, configType string) (*viper.Viper, error)
ReadConfigAsViper returns...
func ReadTemplate ¶
ReadTemplate read the given template under clencli/*.yaml
func RequestRandomPhoto ¶
func RequestRandomPhoto(params model.UnsplashRandomPhotoParameters, cred model.Credential) (model.UnsplashRandomPhotoResponse, error)
RequestRandomPhoto retrieves a single random photo, given optional filters.
func SaveGetPhotoResult ¶
func SaveGetPhotoResult(r model.UnsplashGetPhotoResponse)
SaveGetPhotoResult TODO ...
func SetupLoggingLevel ¶
SetupLoggingLevel set logrus level
func SetupLoggingOutput ¶
SetupLoggingOutput set logrun output file
func UpdateReadMeLogoURL ¶
func UpdateReadMeLogoURL(readme model.ReadMe, response model.UnsplashRandomPhotoResponse) error
UpdateReadMeLogoURL TODO ...
func WriteInterfaceToFile ¶
WriteInterfaceToFile write the given interface into a file
Types ¶
This section is empty.