lib

package
v1.0.1203 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 22 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SessionExpiry = time.Hour * 6

Functions

func CaptureOutput added in v1.0.669

func CaptureOutput(f func()) string

func ClientError added in v1.0.215

func ClientError(err error, ctx *Context)

func CreateSession added in v1.0.170

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

func JsonMarshal

func JsonMarshal(i interface{}, fields string) error

func JsonMarshalIter

func JsonMarshalIter(it Iter, fields string) error

func OnlyFields

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

func SessionUnauthorizedError added in v1.0.170

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

func TimeVarP added in v1.0.25

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

Types

type Config added in v1.0.170

type Config struct {
	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 Context added in v1.0.669

type Context struct {
	Values map[string]*files_sdk.Config
	Config *files_sdk.Config
	Test   bool
}

func (Context) Deadline added in v1.0.669

func (c Context) Deadline() (deadline time.Time, ok bool)

func (Context) Done added in v1.0.669

func (c Context) Done() <-chan struct{}

func (Context) Err added in v1.0.669

func (c Context) Err() error

func (Context) GetConfig added in v1.0.669

func (c Context) GetConfig() *files_sdk.Config

func (Context) Testing added in v1.0.669

func (c Context) Testing() bool

func (Context) Value added in v1.0.669

func (c Context) Value(interface{}) interface{}

type Iter

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

type ResetConfig added in v1.0.215

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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