Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) Delete(path string, options ...Option) (*jnode.Node, error)
- func (c *Client) Download(path string) ([]byte, error)
- func (c *Client) Get(path string, options ...Option) (*jnode.Node, error)
- func (c *Client) GetClient() *resty.Client
- func (c *Client) GetHostURL() string
- func (c *Client) GetOrganization() string
- func (c *Client) GetWithParams(path string, params map[string]string, options ...Option) (*jnode.Node, error)
- func (c *Client) Patch(path string, body *jnode.Node, options ...Option) (*jnode.Node, error)
- func (c *Client) Post(path string, body *jnode.Node, options ...Option) (*jnode.Node, error)
- func (c *Client) XCPPost(module string, files []string, values map[string]string, options ...Option) (*jnode.Node, error)
- type Config
- type Credentials
- type Option
- type ProfileCredentials
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoContent = errors.New("no content")
View Source
var HTTPError httpError
View Source
var UserAgent = "soluble-cli/" + version.Version
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) GetHostURL ¶
func (*Client) GetOrganization ¶
func (*Client) GetWithParams ¶
type Config ¶
type Config struct { Organization string OrganizationFromConfigFile bool LegacyAPIToken string LaceworkAccount string LaceworkAPIToken string LaceworkAPIKey string LaceworkAPISecret string APIServer string APIPrefix string Debug bool TLSNoVerify bool Timeout time.Duration RetryCount int RetryWaitSeconds float64 Headers []string }
type Credentials ¶ added in v0.5.39
type Credentials map[string]*ProfileCredentials
func (Credentials) Find ¶ added in v0.5.39
func (c Credentials) Find(profileName string) *ProfileCredentials
func (Credentials) Save ¶ added in v0.5.39
func (c Credentials) Save() error
type Option ¶
type Option interface {
Apply(*resty.Request)
}
func CloseableOptionFunc ¶ added in v0.5.9
func OptionFunc ¶ added in v0.5.9
func OptionFunc(f func(*resty.Request)) Option
type ProfileCredentials ¶ added in v0.5.39
type ProfileCredentials struct { Token string `json:"token"` ExpiresAt time.Time `json:"expiresAt"` }
func (*ProfileCredentials) IsNearExpiration ¶ added in v0.5.39
func (p *ProfileCredentials) IsNearExpiration() bool
func (*ProfileCredentials) RefreshToken ¶ added in v0.5.39
func (p *ProfileCredentials) RefreshToken(domain string, keyID string, secretKey string) error
Click to show internal directories.
Click to hide internal directories.