terminal

package
v1.19.4 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReaderList = map[string]*ReaderData{
	"verifone-p400": readerVerifoneP400,
}

ReaderList is a map containing all of the Stripe compatible reader types that we support in the CLI.

Functions

func QuickstartP400

func QuickstartP400(ctx context.Context, cfg *config.Config) error

QuickstartP400 runs the quickstart interactive prompt sequence to walk the user through setting up a P400 reader

func ReaderNames

func ReaderNames() []string

ReaderNames is a function that uses ReaderList to extract the human friendly names of the CLI supported readers. it returns a map of the human friendly reader names as strings

func ReaderTypeSelectPrompt

func ReaderTypeSelectPrompt(readers []string) (string, error)

ReaderTypeSelectPrompt prompts the user to choose which type of reader they want to set up currently the only supported choice is the Verifone P400

func SetTerminalSessionContext

func SetTerminalSessionContext(cfg *config.Config) p400.TerminalSessionContext

SetTerminalSessionContext creates a data struct that contains the context of the user's current quickstart session it returns a TerminalSessionContext interface that is passed into most of the P400 reader related functions in the quickstart flow

Types

type ReaderData

type ReaderData struct {
	Name        string
	URL         string
	Description string
}

ReaderData contains information about a specific Stripe compatible reader. An example is the Verifone P400.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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