 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- Variables
- func ByteCountSI(b int64) string
- func ByteCountSIFloat64(b float64) string
- func CSVMarshal(result interface{}, fields string, out io.Writer) error
- func CSVMarshalIter(it Iter, fields string, skip FilterIter, out io.Writer) error
- func ClientError(ctx context.Context, err error, out ...io.Writer)
- func CreateSession(paramsSessionCreate files_sdk.SessionCreateParams, config *Config) error
- func ErrorWithOriginalResponse(err error, logger retryablehttp.Logger) (interface{}, error)
- func FetchLatestVersionNumber(parentCtx context.Context) func() (version.Version, bool)
- func Format(ctx context.Context, result interface{}, format string, fields string, ...) error
- func FormatIter(ctx context.Context, it Iter, format string, fields string, usePager bool, ...) error
- func HandleResponse(ctx context.Context, i interface{}, errIn error, format string, fields string, ...)
- func Includes(item string, includes []string) bool
- func InstalledViaBrew() bool
- func JsonMarshal(i interface{}, fields string, usePager bool, out ...io.Writer) error
- func JsonMarshalIter(parentCtx context.Context, it Iter, fields string, filter FilterIter, ...) error
- func OnlyFields(commaFields string, structure interface{}) (map[string]interface{}, []string, error)
- func PromptUserWithPretext(display string, pretext string, config Config) (string, error)
- func SessionUnauthorizedError(paramsSessionCreate files_sdk.SessionCreateParams, err error, config Config) (files_sdk.SessionCreateParams, error)
- func SmsResponse(paramsSessionCreate files_sdk.SessionCreateParams, out io.Writer) (files_sdk.SessionCreateParams, error)
- func TableMarshal(style string, result interface{}, fields string, usePager bool, out io.Writer) error
- func TableMarshalIter(parentCtx context.Context, style string, it Iter, fields string, usePager bool, ...) error
- func TimeVar(f *pflag.FlagSet, p *time.Time, name string)
- func TotpResponse(paramsSessionCreate files_sdk.SessionCreateParams, out io.Writer) (files_sdk.SessionCreateParams, error)
- func U2fResponse(paramsSessionCreate files_sdk.SessionCreateParams, ...) (files_sdk.SessionCreateParams, error)
- func YubiResponse(paramsSessionCreate files_sdk.SessionCreateParams, ...) (files_sdk.SessionCreateParams, error)
- type Config
- func (c *Config) CheckVersion(versionString string, fetchLatestVersion func() (version.Version, bool), ...)
- func (c *Config) Load() error
- func (c Config) Reset() error
- func (c Config) ResetWith(reset ResetConfig) error
- func (c *Config) Save() error
- func (c *Config) SessionExpired() bool
- func (c *Config) SetGlobal()
- func (c *Config) ValidSession() bool
 
- type FilterIter
- type Iter
- type IterPaging
- type Overrides
- type Pager
- type PretextInputModel
- type ResetConfig
- type SliceIter
- type Spinner
Constants ¶
      View Source
      
  
const CLICurrentVersionURL = "https://raw.githubusercontent.com/Files-com/files-cli/master/_VERSION"
    Variables ¶
      View Source
      
  
    var CheckVersionEvery = time.Hour * 48
    
      View Source
      
  
    var PagerCommands = []string{"less", "more"}
    
      View Source
      
  
    var PagerEnvVariables = []string{"PAGER"}
    
      View Source
      
  
var SessionExpiry = time.Hour * 6
    Functions ¶
func ByteCountSI ¶ added in v1.1.1586
func ByteCountSIFloat64 ¶ added in v1.1.1586
func CSVMarshal ¶ added in v1.1.1586
func CSVMarshalIter ¶ added in v1.1.1586
func ClientError ¶ added in v1.0.215
func CreateSession ¶ added in v1.0.170
func CreateSession(paramsSessionCreate files_sdk.SessionCreateParams, config *Config) error
func ErrorWithOriginalResponse ¶ added in v1.4.0
func FetchLatestVersionNumber ¶ added in v1.6.0
func FormatIter ¶ added in v1.1.1586
func HandleResponse ¶ added in v1.4.0
func InstalledViaBrew ¶ added in v1.6.0
func InstalledViaBrew() bool
func JsonMarshal ¶
func JsonMarshalIter ¶
func OnlyFields ¶
func PromptUserWithPretext ¶ added in v1.3.31
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 TableMarshalIter ¶ added in v1.1.1586
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"`
	LastValidVersionCheck time.Time `json:"last_valid_version_check"`
	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) CheckVersion ¶ added in v1.6.0
func (Config) ResetWith ¶ added in v1.0.215
func (c Config) ResetWith(reset ResetConfig) error
func (*Config) SessionExpired ¶ added in v1.0.170
func (*Config) ValidSession ¶ added in v1.0.170
type FilterIter ¶ added in v1.3.0
type FilterIter func(interface{}) bool
    type IterPaging ¶ added in v1.3.10
type Pager ¶ added in v1.5.0
type Pager struct {
	DefaultOut io.Writer
	io.Writer
	UsePager bool
	// contains filtered or unexported fields
}
    func (*Pager) Start ¶ added in v1.5.0
func (p *Pager) Start(cancel context.CancelFunc)
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) View ¶ added in v1.3.31
func (p PretextInputModel) View() string
type ResetConfig ¶ added in v1.0.215
       Source Files
      ¶
      Source Files
      ¶
    
   Click to show internal directories. 
   Click to hide internal directories.