clapp

package
v0.0.0-...-af91493 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 13 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttpClient

func NewHttpClient(useragent string, timeout int, followRedirects bool) *http.Client

Types

type Application

type Application struct {
	Command *cobra.Command
}

func NewApplication

func NewApplication(use string, short string, long string, version string) *Application

func (*Application) RegisterCommands

func (a *Application) RegisterCommands(c []Commander)

func (*Application) Run

func (a *Application) Run() error

type Command

type Command struct {
	Cobra       *cobra.Command
	SubCommands []Commander
}

func (Command) Initialize

func (c Command) Initialize() *cobra.Command

type CommandController

type CommandController interface {
	Execute() error
}

type Commander

type Commander interface {
	Initialize() *cobra.Command
}

type Configuration

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

func NewConfiguration

func NewConfiguration(filename string, path string, searchPaths []string) Configuration

func (Configuration) GetViper

func (c Configuration) GetViper() *viper.Viper

type Configurator

type Configurator interface {
	GetViper() *viper.Viper
}

type HttpServer

type HttpServer struct {
	*http.Server
}

func NewHttpServer

func NewHttpServer(listenAddress string, port int, handler http.Handler) *HttpServer

func (*HttpServer) RunServer

func (s *HttpServer) RunServer()

type HttpTransport

type HttpTransport struct {
	T         http.RoundTripper
	UserAgent string
}

func NewHttpTransport

func NewHttpTransport(useragent string) *HttpTransport

func (*HttpTransport) RoundTrip

func (m *HttpTransport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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