MCPcopy Create free account
hub / github.com/OverloadBlitz/cloudcent-cli / New

Function New

internal/api/client.go:31–41  ·  view source on GitHub ↗

New creates a new Client and loads config from disk.

()

Source from the content-addressed store, hash-verified

29
30// New creates a new Client and loads config from disk.
31func New() (*Client, error) {
32 c := &Client{
33 http: &http.Client{Timeout: 30 * time.Second},
34 }
35 cfg, err := config.Load()
36 if err != nil {
37 return nil, err
38 }
39 c.Config = cfg
40 return c, nil
41}
42
43// IsInitialized returns true if credentials are present.
44func (c *Client) IsInitialized() bool {

Callers 5

NewAppFunction · 0.92
runMetadataRefreshFunction · 0.92
runInitFunction · 0.92
runPricingFunction · 0.92
runPulumiEstimateFunction · 0.92

Calls 1

LoadFunction · 0.92

Tested by

no test coverage detected