app

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package app is the main package for the application.

Index

Constants

View Source
const (
	// ErrEmptyDescribeInput is the error message when the describe command is
	// invoked without any input.
	ErrEmptyDescribeInput xerrors.Error = "missing image file to describe"

	// ErrTooManyImages is the error message when the describe command is
	// invoked with more than one input.
	ErrTooManyImages xerrors.Error = "too many image files to describe; please provide only one"

	// ErrInvalidImageType is the error message when the describe command is
	// invoked with an invalid image file type.
	ErrInvalidImageType xerrors.Error = "invalid image file type; please provide a PNG, JPG, JPEG, or GIF file"

	// ErrInvalidProvider is the error message when the describe command is
	// invoked with an invalid AI provider.
	ErrInvalidProvider xerrors.Error = "invalid AI provider; please refer to the documentation for a list of valid providers"
)
View Source
const (
	// ErrEmptyDraftInput is the error message when the draft command is
	// invoked without any input.
	ErrEmptyDraftInput xerrors.Error = "missing input for draft; please provide a file with your notes"

	// ErrTooManyNotes is the error message when the draft command is
	// invoked with more than one input.
	ErrTooManyNotes xerrors.Error = "too many notes files; please provide only one"

	// ErrInvalidFiletype is the error message when the draft command is
	// invoked with a file that is not a text file.
	ErrInvalidFiletype xerrors.Error = "invalid filetype; please provide a TXT or MD file"
)
View Source
const (
	// ErrEmptyInput is returned when no file is provided by the user.
	ErrEmptyInput xerrors.Error = "missing file to review"

	// ErrInvalidAPIKey is returned when the user does not provide an API key
	// for the given provider or provides an invalid one.
	ErrInvalidAPIKey xerrors.Error = "missing or invalid API key"

	// ErrTooMuchInput is returned when the user provides more than one file.
	ErrTooMuchInput xerrors.Error = "too many files to review; please provide only one file"
)

Variables

This section is empty.

Functions

func DescribeAction

func DescribeAction(ctx *cli.Context) error

DescribeAction is the action to perform when the describe command is invoked.

func DraftAction

func DraftAction(ctx *cli.Context) error

DraftAction is the action to perform when the draft command is invoked.

func ReviewAction

func ReviewAction(ctx *cli.Context) error

ReviewAction is the main action for the application.

func Run

func Run(args []string) int

Run is the entry point for the application.

Types

This section is empty.

Jump to

Keyboard shortcuts

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