models

package
v0.4.40 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APICall

type APICall struct {
	// contains filtered or unexported fields
}

func NewAPICall

func NewAPICall(url string, token string) *APICall

func (*APICall) Do

func (ac *APICall) Do(method string) (error, int)

func (*APICall) Download

func (ac *APICall) Download(filepath string) error

func (*APICall) Raw

func (ac *APICall) Raw() []byte

func (*APICall) UpdateURL

func (ac *APICall) UpdateURL(url string)

type App

type App struct {
	Logger *log.Logger
	Help   Help
}

App contains the objects from which the application will work, such as the application logger

func (*App) ConfigureLogging

func (app *App) ConfigureLogging(logging Log)

ConfigureLogging sets up the logging for the application When running Debug Mode is will be configured to add the caller to the message

func (*App) HandleError

func (app *App) HandleError(err error, errorType string, msg ...string)

HandleError handles errors from the application This is to ensure that all errors are handled in the same way

func (*App) HandleErrorWithFields

func (app *App) HandleErrorWithFields(err error, errorType string, msg string, fields map[string]interface{})

func (*App) LoadHelp added in v0.4.17

func (app *App) LoadHelp(data []byte)

func (*App) Log added in v0.4.17

func (app *App) Log(data string, level string, replacements ...interface{})

type Command

type Command struct {
	Framework       string
	Binary          string
	VersionFound    string
	VersionRequired string
	Message         string
}

type Help added in v0.4.17

type Help struct {
	Help []HelpMessage `mapstructure:"help"`
}

func (*Help) GetMessage added in v0.4.17

func (h *Help) GetMessage(id string, replacements ...interface{}) string

type HelpMessage added in v0.4.17

type HelpMessage struct {
	Name  string `mapstructure:"name"`
	Value string `mapstructure:"value"`
}

type Log

type Log struct {
	// Level for the logging, ERROR, WARN, INFO, DEBUG
	Level string `mapstructure:"level" json:",omitempty"`

	// Format for the logging, TEXT or JSON
	Format string `mapstructure:"format" json:",omitempty"`

	// If the logging is in TEXT then should colour be used
	Colour bool `mapstructure:"colour"`

	// File that all logs should be saved to
	File string `mapstructure:"file" json:",omitempty"`
}

type Platform

type Platform struct{}

func (Platform) RunEnvironmentChecks

func (p Platform) RunEnvironmentChecks() error

type Version added in v0.4.17

type Version struct {
	Empty    bool
	Original string
	Major    int
	Minor    int
	Feature  int
	Patch    int
	// contains filtered or unexported fields
}

func (*Version) DotNet added in v0.4.17

func (v *Version) DotNet() (bool, error)

func (*Version) DotNetGlobal added in v0.4.17

func (v *Version) DotNetGlobal(content string) error

func (*Version) DotNetSplit added in v0.4.17

func (v *Version) DotNetSplit() error

func (*Version) Init added in v0.4.17

func (v *Version) Init(version string, pattern string)

func (*Version) IsEmpty added in v0.4.17

func (v *Version) IsEmpty() bool

func (*Version) Semver added in v0.4.17

func (v *Version) Semver() (bool, error)

func (*Version) Set added in v0.4.17

func (v *Version) Set(name string, value interface{})

func (*Version) SetSemverConstraint added in v0.4.17

func (v *Version) SetSemverConstraint(comparator string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳