models

package
v0.3.43 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT Imports: 9 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
}

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{})

type Command

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

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

Jump to

Keyboard shortcuts

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