Documentation
¶
Index ¶
- func LookPath() (string, error)
- type Branch
- type Client
- func (c *Client) ConnectionString(ctx context.Context, projectID, roleName string, pooled bool) (string, error)
- func (c *Client) ConnectionStringForBranch(ctx context.Context, projectID, roleName, branch string, pooled bool) (string, error)
- func (c *Client) CreateProject(ctx context.Context, name string) (Project, error)
- func (c *Client) ListBranches(ctx context.Context, projectID string) ([]Branch, error)
- func (c *Client) ListProjects(ctx context.Context) ([]Project, error)
- func (c *Client) WithRunner(...) *Client
- type Project
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a small wrapper around the Neon CLI.
The official CLI is invoked as `neon` (and may also be installed as `neonctl`). We keep the wrapper tolerant of CLI output differences and treat all returned connection strings as secret material.
func (*Client) ConnectionString ¶
func (c *Client) ConnectionString(ctx context.Context, projectID, roleName string, pooled bool) (string, error)
ConnectionString returns a connection string for a project and role. The returned string contains credentials and must be treated as secret.
func (*Client) ConnectionStringForBranch ¶
func (c *Client) ConnectionStringForBranch(ctx context.Context, projectID, roleName, branch string, pooled bool) (string, error)
ConnectionStringForBranch returns a connection string for the requested branch. The returned string contains credentials and must be treated as secret.
func (*Client) CreateProject ¶
func (*Client) ListBranches ¶
Click to show internal directories.
Click to hide internal directories.