Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessTokenPath ¶
func AccessTokenPath() string
AccessTokenPath is the path for the access token file
func DefaultConfigPath ¶
func DefaultConfigPath() string
DefaultConfigPath is the path for the config file.
func GetProjectConfigFile ¶ added in v0.2.0
func GetProjectConfigFile() string
func GetRootGitRepoDir ¶ added in v0.2.0
func ProjectConfigPath ¶ added in v0.2.0
Types ¶
type Config ¶
type Config struct { AccessToken string BaseURL string Organization string ServiceTokenName string ServiceToken string // Project Configuration Database string Branch string }
func (*Config) IsAuthenticated ¶
func (*Config) NewClientFromConfig ¶
NewClientFromConfig creates a PlaentScale API client from our configuration
func (*Config) ToWritableConfig ¶
func (c *Config) ToWritableConfig() *WritableConfig
ToWritableConfig returns an instance of WritableConfig from the Config struct.
func (*Config) ToWritableProjectConfig ¶ added in v0.2.0
func (c *Config) ToWritableProjectConfig() *WritableProjectConfig
ToWritableProjectConfig returns an instance of WritableProjectConfig from the Config struct.
type WritableConfig ¶
type WritableConfig struct {
Organization string `yaml:"org" json:"org"`
}
WritableConfig maps
func (*WritableConfig) Write ¶
func (w *WritableConfig) Write(path string) error
Write persists the writable config at the designated path.
type WritableProjectConfig ¶ added in v0.2.0
type WritableProjectConfig struct { Database string `yaml:"database"` Branch string `yaml:"branch"` }
func (*WritableProjectConfig) WriteDefault ¶ added in v0.2.0
func (w *WritableProjectConfig) WriteDefault() error
WriteDefault persists the writable project config at the default path which is pulled from the root of the git repository if a user is in one.
Click to show internal directories.
Click to hide internal directories.