cmd

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConnecter = func() appland.Client {
	context, err := config.GetCurrentContext()
	if err != nil {
		fail(err)
	}

	return appland.MakeClient(context)
}

Functions

func Execute

func Execute()

func NewLoginCommand

func NewLoginCommand(connecter Connecter, stdin io.Reader, passwordReader PasswordReader) *cobra.Command

func NewStatsCommand

func NewStatsCommand(p *StatsProcessor) *cobra.Command

func NewUploadCommand

func NewUploadCommand(options *UploadOptions, metadataProviders []metadata.Provider) *cobra.Command

Types

type Appmap

type Appmap struct {
	Events []event `json:"events"`
}

type Connecter

type Connecter func() appland.Client

type PasswordReader

type PasswordReader func() ([]byte, error)

type Stats

type Stats struct {
	Method      string         `json:"method"`
	Path        string         `json:"path"`
	Lineno      int            `json:"lineno"`
	Calls       int            `json:"calls"`
	NumParams   int            `json:"num_params"`
	ParamCounts map[string]int `json:"param_counts"`
	// contains filtered or unexported fields
}

type StatsProcessor

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

func (StatsProcessor) MethodStats

func (p StatsProcessor) MethodStats(appmap Appmap) (map[string]Stats, uint64)

func (StatsProcessor) ReadAppmap

func (p StatsProcessor) ReadAppmap(fname string) (Appmap, error)

func (StatsProcessor) RenderStats

func (p StatsProcessor) RenderStats(w io.Writer, calls uint64, methodStats map[string]Stats)

type UploadOptions

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

Jump to

Keyboard shortcuts

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