lib

package
v1.3.64 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SessionExpiry = time.Hour * 6

Functions

func ByteCountSI added in v1.1.1586

func ByteCountSI(b int64) string

func ByteCountSIFloat64 added in v1.1.1586

func ByteCountSIFloat64(b float64) string

func CSVMarshal added in v1.1.1586

func CSVMarshal(result interface{}, fields string, out io.Writer) error

func CSVMarshalIter added in v1.1.1586

func CSVMarshalIter(it Iter, fields string, skip FilterIter, out io.Writer) error

func ClientError added in v1.0.215

func ClientError(ctx context.Context, err error, out ...io.Writer)

func CreateSession added in v1.0.170

func CreateSession(paramsSessionCreate files_sdk.SessionCreateParams, config *Config) error

func Format added in v1.1.1586

func Format(result interface{}, format string, fields string, out ...io.Writer) error

func FormatIter added in v1.1.1586

func FormatIter(it Iter, format string, fields string, filter FilterIter, out ...io.Writer) error

func Includes added in v1.3.64

func Includes(item string, includes []string) bool

func JsonMarshal

func JsonMarshal(i interface{}, fields string, out ...io.Writer) error

func JsonMarshalIter

func JsonMarshalIter(it Iter, fields string, filter FilterIter, out io.Writer) error

func OnlyFields

func OnlyFields(commaFields string, structure interface{}) (map[string]interface{}, []string, error)

func PromptUserWithPretext added in v1.3.31

func PromptUserWithPretext(display string, pretext string, config Config) (string, error)

func SessionUnauthorizedError added in v1.0.170

func SessionUnauthorizedError(paramsSessionCreate files_sdk.SessionCreateParams, err error, config Config) (files_sdk.SessionCreateParams, error)

func SmsResponse added in v1.3.31

func SmsResponse(paramsSessionCreate files_sdk.SessionCreateParams, out io.Writer) (files_sdk.SessionCreateParams, error)

func TableMarshal added in v1.1.1586

func TableMarshal(style string, result interface{}, fields string, out io.Writer) error

func TableMarshalIter added in v1.1.1586

func TableMarshalIter(style string, it Iter, fields string, out io.Writer, in io.Reader, filter FilterIter) error

func TimeVar added in v1.1.1677

func TimeVar(f *pflag.FlagSet, p *time.Time, name string)

func TotpResponse added in v1.3.31

func TotpResponse(paramsSessionCreate files_sdk.SessionCreateParams, out io.Writer) (files_sdk.SessionCreateParams, error)

func U2fResponse added in v1.3.31

func U2fResponse(paramsSessionCreate files_sdk.SessionCreateParams, responseError files_sdk.ResponseError, config Config) (files_sdk.SessionCreateParams, error)

func YubiResponse added in v1.3.31

func YubiResponse(paramsSessionCreate files_sdk.SessionCreateParams, responseError files_sdk.ResponseError, out io.Writer) (files_sdk.SessionCreateParams, error)

Types

type Config added in v1.0.170

type Config struct {
	Overrides     `json:"-"`
	SessionId     string    `json:"session_id"`
	SessionExpiry time.Time `json:"session_expiry"`
	Subdomain     string    `json:"subdomain"`
	Username      string    `json:"username"`
	APIKey        string    `json:"api_key"`
	Endpoint      string    `json:"endpoint,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Load added in v1.0.170

func (c *Config) Load() error

func (Config) Reset added in v1.0.170

func (c Config) Reset() error

func (Config) ResetWith added in v1.0.215

func (c Config) ResetWith(reset ResetConfig) error

func (*Config) Save added in v1.0.170

func (c *Config) Save() error

func (*Config) SessionExpired added in v1.0.170

func (c *Config) SessionExpired() bool

func (*Config) SetGlobal added in v1.0.170

func (c *Config) SetGlobal()

func (*Config) ValidSession added in v1.0.170

func (c *Config) ValidSession() bool

type FilterIter added in v1.3.0

type FilterIter func(interface{}) bool

type Iter

type Iter interface {
	Next() bool
	Current() interface{}
	Err() error
}

type IterPaging added in v1.3.10

type IterPaging interface {
	Iter
	EOFPage() bool
}

type Overrides added in v1.3.31

type Overrides struct {
	Out     io.Writer
	In      io.Reader
	Timeout time.Duration
}

func (Overrides) Init added in v1.3.31

func (o Overrides) Init() Overrides

type PretextInputModel added in v1.3.31

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

func (PretextInputModel) Init added in v1.3.31

func (p PretextInputModel) Init() tea.Cmd

func (PretextInputModel) Update added in v1.3.31

func (p PretextInputModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (PretextInputModel) View added in v1.3.31

func (p PretextInputModel) View() string

type ResetConfig added in v1.0.215

type ResetConfig struct {
	Subdomain bool
	Username  bool
	APIKey    bool
	Endpoint  bool
	Session   bool
}

Jump to

Keyboard shortcuts

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