cmd

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConfigCtxKey is the key for the config in the context.
	ConfigCtxKey = ContextKey("config")
	// SessionCtxKey is the key for the session in the context.
	SessionCtxKey = ContextKey("session")
)
View Source
var (
	// ErrUnauthorized is returned when the user is not authorized to perform action.
	ErrUnauthorized = fmt.Errorf("Unauthorized")
	// ErrRepoNotFound is returned when the repo is not found.
	ErrRepoNotFound = fmt.Errorf("Repository not found")
	// ErrFileNotFound is returned when the file is not found.
	ErrFileNotFound = fmt.Errorf("File not found")
)

Functions

func CatCommand

func CatCommand() *cobra.Command

CatCommand returns a command that prints the contents of a file.

func GitCommand

func GitCommand() *cobra.Command

GitCommand returns a command that handles Git operations.

func ListCommand

func ListCommand() *cobra.Command

ListCommand returns a command that list file or directory at path.

func ReloadCommand

func ReloadCommand() *cobra.Command

ReloadCommand returns a command that reloads the server configuration.

func RootCommand

func RootCommand() *cobra.Command

RootCommand is the root command for the server.

Types

type ContextKey added in v0.4.0

type ContextKey string

ContextKey is a type that can be used as a key in a context.

func (ContextKey) String added in v0.4.0

func (c ContextKey) String() string

String returns the string representation of the ContextKey.

Jump to

Keyboard shortcuts

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