cmd

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoWithAutoRefresh

func DoWithAutoRefresh(app *CLIApp, doRequest func(string) (*http.Response, error)) (*http.Response, error)

Wrapper function for refreshing JWT token logic

func Execute

func Execute()

Executes commands

func LogError

func LogError(db *database.Queries, cmd *cobra.Command, err error, userMsg string)

Logs an error message in client database, to be accessible for viewing by user later

Types

type CLIApp

type CLIApp struct {
	Config *config.Config
}

App struct holding CLI config, as well as all command methods

func NewCLIApp

func NewCLIApp() *CLIApp

Initializes a new app struct

func (*CLIApp) RootCmd

func (app *CLIApp) RootCmd() *cobra.Command

Initializes cobra commands

Jump to

Keyboard shortcuts

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