Documentation
¶
Overview ¶
Package neonapi reads a Neon project and its branches.
Read-only on purpose. A database is not a thing to converge silently: a plan that offers to create or delete one is a plan somebody eventually runs by accident.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLISession ¶
type CLISession struct {
Token string
Expires time.Time
// Expired is checked rather than assumed: an expired token fails as a 401,
// which reads like a permission problem and sends people looking at their
// Neon account instead of at `neonctl auth`.
Expired bool
}
CLISession is a credential upkeep borrowed from neonctl rather than asking the operator for a second one.
func TokenFromCLI ¶
func TokenFromCLI() (CLISession, bool)
TokenFromCLI reads the session `neonctl auth` already stored.
It returns nothing rather than an error when neonctl has never been used: that is not a problem to report, it is simply one fewer place to look.
func (CLISession) ExpiredMessage ¶
func (s CLISession) ExpiredMessage() string
ExpiredMessage says what to do, rather than leaving a 401 to be diagnosed.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.