utils

package
v0.0.0-...-5c3e942 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CURRENT_RELEASE = "https://raw.githubusercontent.com/kargirwar/prosql-agent/master/current-release.json"
View Source
const STATUS_URL = "http://localhost:23890/about"

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(fileName string, url string) (err error)

func GetCwd

func GetCwd() string

func GetJson

func GetJson(url string, target interface{}) error

func GetValue

func GetValue(r *Response, k string) string

Types

type Release

type Release struct {
	Version string
	Mac     string
	Linux   string
	Windows string
}

func GetLatestRelease

func GetLatestRelease() *Release

type Response

type Response struct {
	Status    string      `json:"status"`
	Msg       string      `json:"msg"`
	ErrorCode string      `json:"error-code"`
	Data      interface{} `json:"data"`
	Eof       bool        `json:"eof"`
}

func GetStatus

func GetStatus() *Response

Jump to

Keyboard shortcuts

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