core

package
v0.0.0-...-592effb Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ResponseChannel = make(chan HttpResponse)

Functions

func Base64Decode

func Base64Decode(text string) (string, error)

func Base64Encode

func Base64Encode(text string) string

func Calculate

func Calculate(expression string) (string, error)

func ConvertToTimeString

func ConvertToTimeString(timestamp string) (string, error)

func ConvertToTimestamp

func ConvertToTimestamp(timeString string) (string, error)

func CreateAsciiFont

func CreateAsciiFont()

func DebugError

func DebugError(err error)

func DebugInfo

func DebugInfo(message string)

func DecodeJwt

func DecodeJwt(input string, key string) (bool, string, error)

func DiffTexts

func DiffTexts(left string, right string) (string, int)

func FormatHttpErrorMessage

func FormatHttpErrorMessage(message string) error

func FormatJson

func FormatJson(raw string) (string, error)

func FormatXml

func FormatXml(raw string) string

func GenerateAsciiArt

func GenerateAsciiArt(text string) (string, error)

func GenerateUuids

func GenerateUuids() (string, error)

func GetLogFileName

func GetLogFileName() (string, error)

func GetNow

func GetNow() string

func GetVersion

func GetVersion() string

func GzipDecode

func GzipDecode(text string) (string, error)

func GzipEncode

func GzipEncode(text string) (string, error)

func HasNewVersion

func HasNewVersion() bool

func HexDecode

func HexDecode(text string) (string, error)

func HexEncode

func HexEncode(text string) string

func InitLogger

func InitLogger(customLogger *wails.CustomLogger)

func InitUpgrade

func InitUpgrade(currentVersion string)

func IsBase64EncodedLatin1

func IsBase64EncodedLatin1(text string) bool

func IsInformation

func IsInformation(obj error) bool

func IsJson

func IsJson(input string) bool

func IsXml

func IsXml(input string) bool

func LoadLogFile

func LoadLogFile() (string, error)

func PutLogMessage

func PutLogMessage(message string) (string, error)

func ScanPorts

func ScanPorts(hostname string, fromPort int, toPort int) []string

func UpgradeNow

func UpgradeNow() error

func UrlDecode

func UrlDecode(text string) (string, error)

func UrlEncode

func UrlEncode(text string) string

func WriteLogFile

func WriteLogFile(text string) bool

Types

type CustomPage

type CustomPage struct {
	Name       string      `json:"name"`
	Title      string      `xml:"title" json:"title"`
	Icon       string      `xml:"icon" json:"icon"`
	Tooltip    string      `xml:"tooltip" json:"tooltip"`
	Body       HtmlContent `xml:"body"`
	BodyString string      `json:"body"`
}

func ReadCustomPagesXmlFile

func ReadCustomPagesXmlFile() []CustomPage

type CustomPages

type CustomPages struct {
	Root  xml.Name     `xml:"pages"`
	Pages []CustomPage `xml:"page"`
}

type Endpoint

type Endpoint struct {
	Host string
	Port int
}

type GitHub

type GitHub struct {
	TagName string `json:"tag_name"`
	Assets  []struct {
		Name               string `json:"name"`
		BrowserDownloadUrl string `json:"browser_download_url"`
	} `json:"assets"`
}

type HtmlContent

type HtmlContent struct {
	Value string `xml:",innerxml"`
}

type HttpRequest

type HttpRequest struct {
	Method         string
	Url            string
	Body           string
	TimeoutSeconds int
	Header         map[string]string
}

func GenerateHttpRequest

func GenerateHttpRequest(input string) (*HttpRequest, error)

func (HttpRequest) GetCurl

func (request HttpRequest) GetCurl() string

func (HttpRequest) Perform

func (request HttpRequest) Perform() HttpResponse

func (HttpRequest) Send

func (request HttpRequest) Send()

type HttpResponse

type HttpResponse struct {
	Code          string
	Body          []byte
	Failed        bool
	ErrorMessage  string
	ContentLength int
	ContentType   string
	Header        map[string][]string
	Duration      int64
}

func (HttpResponse) IsOk

func (response HttpResponse) IsOk() bool

type HttpServer

type HttpServer struct {
	Server              *http.Server
	Port                string
	ResponseStatus      int
	ResponseBody        []byte
	ResponseContentType string
}

func NewHttpServer

func NewHttpServer(body string, status int, port string, receiveCallback func(http.Header, string, string)) *HttpServer

func (HttpServer) Start

func (httpServer HttpServer) Start() error

func (HttpServer) Stop

func (httpServer HttpServer) Stop() error

type Information

type Information struct {
	Info string
}

func (*Information) Error

func (info *Information) Error() string

type SshTunnel

type SshTunnel struct {
	Local            *Endpoint
	Server           *Endpoint
	Remote           *Endpoint
	Config           *ssh.ClientConfig
	Listener         net.Listener
	LocalConnection  net.Conn
	RemoteConnection net.Conn
}

func NewSshTunnel

func NewSshTunnel(sshHost string, sshPort int, username string, password string, remoteHost string, remotePort int, localPort int) *SshTunnel

func (*SshTunnel) Start

func (tunnel *SshTunnel) Start() error

func (*SshTunnel) Stop

func (tunnel *SshTunnel) Stop() error

Jump to

Keyboard shortcuts

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