buildclient

package
v0.0.0-...-e8cbe11 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PromptInput

func PromptInput(label string, mask rune, hideEntered bool, validate func(value string) error) (value string, err error)

func PromptSelect

func PromptSelect(label string, items interface{}) (index int, err error)

func WithCURLPromptInput

func WithCURLPromptInput(promptInput promptInputFunc) func(t *TokenPromptMethodCURL)

func WithConfigAuthTokenKey

func WithConfigAuthTokenKey(key string) func(builder *Builder)

func WithCreateClient

func WithCreateClient(createClient createClientFunc) func(builder *Builder)

func WithInputPromptInput

func WithInputPromptInput(promptInput promptInputFunc) func(t *TokenPromptMethodInput)

func WithPersistConfig

func WithPersistConfig(persistConfig PersistConfig) func(builder *Builder)

func WithPromptSelect

func WithPromptSelect(promptSelect promptSelectFunc) func(builder *Builder)

func WithTokenPromptMethods

func WithTokenPromptMethods(methods ...TokenPromptMethod) func(builder *Builder)

func WithVerbose

func WithVerbose(verbose Verbose) func(builder *Builder)

Types

type Builder

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

func NewBuilder

func NewBuilder(opts ...func(builder *Builder)) (builder Builder)

func (Builder) Build

func (b Builder) Build() (c *client.Client, err error)

type PersistConfig

type PersistConfig int
const (
	PersistConfigNever PersistConfig = iota
	PersistConfigIfChanged
	PersistConfigAlways
)

type TokenPromptMethod

type TokenPromptMethod interface {
	GetToken() (token string, err error)
	GetName() string
	GetMessage() string
}

type TokenPromptMethodCURL

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

func NewTokenPromptMethodCURL

func NewTokenPromptMethodCURL(opts ...func(*TokenPromptMethodCURL)) TokenPromptMethodCURL

func (TokenPromptMethodCURL) GetMessage

func (t TokenPromptMethodCURL) GetMessage() (message string)

func (TokenPromptMethodCURL) GetName

func (t TokenPromptMethodCURL) GetName() (name string)

func (TokenPromptMethodCURL) GetToken

func (t TokenPromptMethodCURL) GetToken() (token string, err error)

func (TokenPromptMethodCURL) Validate

func (t TokenPromptMethodCURL) Validate(value string) (err error)

type TokenPromptMethodInput

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

func NewTokenPromptMethodInput

func NewTokenPromptMethodInput(opts ...func(*TokenPromptMethodInput)) TokenPromptMethodInput

func (TokenPromptMethodInput) GetMessage

func (t TokenPromptMethodInput) GetMessage() (message string)

func (TokenPromptMethodInput) GetName

func (t TokenPromptMethodInput) GetName() (name string)

func (TokenPromptMethodInput) GetToken

func (t TokenPromptMethodInput) GetToken() (token string, err error)

func (TokenPromptMethodInput) Validate

func (t TokenPromptMethodInput) Validate(value string) (err error)

type Verbose

type Verbose int
const (
	VerboseNone Verbose = iota
	VerboseOnlyErrors
	VerboseAll
)

Jump to

Keyboard shortcuts

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