{"modulePath":"github.com/Files-com/files-cli","version":"v1.6.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package lib\n\n## Constants\n\n```go\nconst CLICurrentVersionURL = \"https://raw.githubusercontent.com/Files-com/files-cli/master/_VERSION\"\n```\n\n## Variables\n\n```go\nvar CheckVersionEvery = time.Hour * 48\n```\n\n```go\nvar PagerCommands = []string{\"less\", \"more\"}\n```\n\n```go\nvar PagerEnvVariables = []string{\"PAGER\"}\n```\n\n```go\nvar SessionExpiry = time.Hour * 6\n```\n\n## Functions\n\n```go\nfunc ByteCountSI(b int64) string\n```\n\n```go\nfunc ByteCountSIFloat64(b float64) string\n```\n\n```go\nfunc CSVMarshal(result interface{}, fields string, out io.Writer) error\n```\n\n```go\nfunc CSVMarshalIter(it Iter, fields string, skip FilterIter, out io.Writer) error\n```\n\n```go\nfunc ClientError(ctx context.Context, profile *Profiles, err error, out ...io.Writer)\n```\n\n```go\nfunc CreateSession(paramsSessionCreate files_sdk.SessionCreateParams, profile *Profiles) error\n```\n\n```go\nfunc ErrorWithOriginalResponse(err error, logger retryablehttp.Logger) (interface{}, error)\n```\n\n```go\nfunc FetchLatestVersionNumber(config files_sdk.Config, parentCtx context.Context) func() (version.Version, bool)\n```\n\n```go\nfunc Format(ctx context.Context, result interface{}, format string, fields string, usePager bool, out ...io.Writer) error\n```\n\n```go\nfunc FormatIter(ctx context.Context, it Iter, format string, fields string, usePager bool, filter FilterIter, out ...io.Writer) error\n```\n\n```go\nfunc HandleResponse(ctx context.Context, profile *Profiles, i interface{}, errIn error, format string, fields string, usePager bool, stdout io.Writer, stderr io.Writer, logger retryablehttp.Logger)\n```\n\n```go\nfunc Includes(item string, includes []string) bool\n```\n\n```go\nfunc InstalledViaBrew() bool\n```\n\n```go\nfunc JsonMarshal(i interface{}, fields string, usePager bool, out ...io.Writer) error\n```\n\n```go\nfunc JsonMarshalIter(parentCtx context.Context, it Iter, fields string, filter FilterIter, usePager bool, out io.Writer) error\n```\n\n```go\nfunc OnlyFields(commaFields string, structure interface{}) (map[string]interface{}, []string, error)\n```\n\n```go\nfunc PromptUserWithPretext(display string, pretext string, profile *Profiles) (string, error)\n```\n\n```go\nfunc SessionUnauthorizedError(paramsSessionCreate files_sdk.SessionCreateParams, err error, config *Profiles) (files_sdk.SessionCreateParams, error)\n```\n\n```go\nfunc SmsResponse(paramsSessionCreate files_sdk.SessionCreateParams, out io.Writer) (files_sdk.SessionCreateParams, error)\n```\n\n```go\nfunc TableMarshal(style string, result interface{}, fields string, usePager bool, out io.Writer) error\n```\n\n```go\nfunc TableMarshalIter(parentCtx context.Context, style string, it Iter, fields string, usePager bool, out io.Writer, filter FilterIter) error\n```\n\n```go\nfunc TimeVar(f *pflag.FlagSet, p *time.Time, name string)\n```\n\n```go\nfunc TotpResponse(paramsSessionCreate files_sdk.SessionCreateParams, out io.Writer) (files_sdk.SessionCreateParams, error)\n```\n\n```go\nfunc YubiResponse(paramsSessionCreate files_sdk.SessionCreateParams, responseError files_sdk.ResponseError, out io.Writer) (files_sdk.SessionCreateParams, error)\n```\n\n## Types\n\n```go\ntype FilterIter func(interface{}) bool\n```\n\n```go\ntype Iter interface {\n\tNext() bool\n\tCurrent() interface{}\n\tErr() error\n}\n```\n\n```go\ntype IterPaging interface {\n\tIter\n\tEOFPage() bool\n\tNextPage() bool\n\tGetPage() bool\n}\n```\n\n```go\ntype Overrides struct {\n\tOut     io.Writer\n\tIn      io.Reader\n\tTimeout time.Duration\n}\n```\n\n```go\nfunc (o Overrides) Init() Overrides\n```\n\n```go\ntype Pager struct {\n\tDefaultOut io.Writer\n\tio.Writer\n\tUsePager bool\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (p *Pager) Canceled(ctx context.Context) bool\n```\n\n```go\nfunc (p Pager) Init(previewInput interface{}, defaultOut io.Writer) (*Pager, error)\n```\n\n```go\nfunc (p *Pager) Start(cancel context.CancelFunc)\n```\n\n```go\nfunc (p *Pager) Wait()\n```\n\n```go\ntype PretextInputModel struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (p PretextInputModel) Init() tea.Cmd\n```\n\n```go\nfunc (p PretextInputModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)\n```\n\n```go\nfunc (p PretextInputModel) View() string\n```\n\n```go\ntype Profile struct {\n\tSessionId             string    `json:\"session_id\"`\n\tSessionExpiry         time.Time `json:\"session_expiry\"`\n\tLastValidVersionCheck time.Time `json:\"last_valid_version_check\"`\n\tSubdomain             string    `json:\"subdomain\"`\n\tUsername              string    `json:\"username\"`\n\tAPIKey                string    `json:\"api_key\"`\n\tEndpoint              string    `json:\"endpoint,omitempty\"`\n\n\tfiles_sdk.Environment `json:\"environment\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype Profiles struct {\n\tProfiles              map[string]*Profile `json:\"profiles\"`\n\t*files_sdk.Config     `json:\"-\"`\n\tOverrides             `json:\"-\"`\n\tProfile               string `json:\"-\"`\n\tfiles_sdk.Environment `json:\"-\"`\n\tConfigDir             string `json:\"-\"`\n}\n```\n\n```go\nfunc (p *Profiles) CheckVersion(versionString string, fetchLatestVersion func() (version.Version, bool), installedViaBrew bool, writer io.Writer)\n```\n\n```go\nfunc (p *Profiles) Current() *Profile\n```\n\n```go\nfunc (p *Profiles) Init() *Profiles\n```\n\n```go\nfunc (p *Profiles) Load(config *files_sdk.Config, profile string) error\n```\n\n```go\nfunc (p *Profiles) Reset() error\n```\n\n```go\nfunc (p *Profiles) ResetWith(reset ResetConfig) error\n```\n\n```go\nfunc (p *Profiles) Save() error\n```\n\n```go\nfunc (p *Profiles) SessionExpired() bool\n```\n\n```go\nfunc (p *Profiles) SetOnConfig()\n```\n\n```go\nfunc (p *Profiles) ValidSession() bool\n```\n\n```go\ntype ResetConfig struct {\n\tSubdomain    bool\n\tUsername     bool\n\tAPIKey       bool\n\tEndpoint     bool\n\tSession      bool\n\tVersionCheck bool\n}\n```\n\n```go\ntype SliceIter struct {\n\tItems []interface{}\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (s *SliceIter) Current() interface{}\n```\n\n```go\nfunc (s *SliceIter) Err() error\n```\n\n```go\nfunc (s *SliceIter) Next() bool\n```\n\n```go\ntype Spinner struct {\n\t*yacspin.Spinner\n\tio.Writer\n}\n```\n\n```go\nfunc (s *Spinner) Start() error\n```\n\n```go\nfunc (s *Spinner) Stop()\n```\n\n","path":"github.com/Files-com/files-cli/lib","name":"lib","synopsis":"","isRedistributable":true}
