cmd

package
v0.0.0-...-0d78295 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Copyright © 2021 Harran Ali <harran.m@gmail.com>. All rights reserved. Use of this source code is governed by MIT-style license that can be found in the LICENSE file.

Index

Constants

View Source
const CONFIG_URL string = "https://raw.githubusercontent.com/gocondor/installer/master/gocondor/config.json"

Config file

View Source
const REPO_URL string = "https://api.github.com/repos/gocondor/gocondor/releases/latest"

Variables

This section is empty.

Functions

func Execute

func Execute()

Types

type CmdNew

type CmdNew struct{}

struct for creating new project command

func (*CmdNew) DownloadConfig

func (cn *CmdNew) DownloadConfig(http *http.Client, url string, conf *Config) *Config

Download config

func (*CmdNew) DownloadGoCondor

func (cn *CmdNew) DownloadGoCondor(http *http.Client, url string, tempName string) string

Download gocondor archive

func (*CmdNew) GenerateTempName

func (cn *CmdNew) GenerateTempName() string

Generate random name

func (*CmdNew) IsUpdatedRequired

func (cn *CmdNew) IsUpdatedRequired(LatestReleasedVersion string) bool

Check for updates

func (*CmdNew) PrintUpdateRequiredMessage

func (cn *CmdNew) PrintUpdateRequiredMessage()

Print update required message

func (*CmdNew) Unpack

func (cn *CmdNew) Unpack(filePath string, destPath string)

Unpack GoCondor

type Config

type Config struct {
	ReleaseUrl               string   `json:"releaseUrl"`
	InstallerReleasedVersion string   `json:"installerReleasedVersion"`
	Paths                    []string `json:"paths"`
}

type RepoMeta

type RepoMeta struct {
	TagName    string `json:"tag_name"`
	TarBallUrl string `json:"tarball_url"`
}

func FetchRepoMeta

func FetchRepoMeta(url string) RepoMeta

Jump to

Keyboard shortcuts

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