loginPrompts

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UseAsDefault      = "Use this as default:"
	SelectAProfile    = "Select a Profile:"
	ProfileName       = "Profile Name:"
	TokenPrompt       = "Token:"
	GitProviderPrompt = "Git Provider:"

	GetTokenWith       = "Get token with:"
	GetTokenFromWeb    = "Login with %s"
	EnterTokenManually = "Enter token manually"

	NoSessionProvided          = "no session provided"
	ListenOnPortFailedWith     = "listen on %s failed with: %s"
	ShuttingDownHttpFailedWith = "shutting down http server on %s failed with: %s"
	StartingHttpFailedWith     = "starting http server on %s failed with: %s"

	SuccessCheckBackAtYourTerminal = "Success, you can close this page!"

	OpenURLToLogin = "Open to login with %s: %s"
)

English

Variables

View Source
var (
	DefaultProvider = "github"
	Providers       = []string{"github"}
)

Functions

func GetOrRequireAProviderAndToken

func GetOrRequireAProviderAndToken(ctx *cli.Context) (provider, token string, err error)

func SelectAProvider

func SelectAProvider(ctx *cli.Context) (provider string, err error)

func TokenFromWeb

func TokenFromWeb(ctx *cli.Context, provider string) (token string, err error)

Token from web gives a link to github with a hook back to here

Types

type SessionData

type SessionData struct {
	Expiry       float64  `json:"exp"`
	Provider     string   `json:"provider"`
	Repositories []string `json:"repositories"`
	Token        string   `json:"token"`
}

Jump to

Keyboard shortcuts

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