Documentation ¶
Index ¶
- Variables
- func DefaultConfigLocation() string
- func EditBuffer(data []byte, tmpFilepattern string, saveCallback func(b []byte) error) ([]byte, error)
- func WriteDefaultCollection() error
- type Collection
- func (c *Collection) EditEnv() error
- func (c *Collection) EditName() error
- func (c *Collection) EditRequest(reqName string) error
- func (c *Collection) Flush() error
- func (c *Collection) GetRequest(req string) (*Request, bool)
- func (c *Collection) PrintInfo()
- func (c *Collection) RemoveRequest(name string) error
- func (c *Collection) SetEnvVar(env, key, val string)
- func (c *Collection) UpsertRequest(req *Request) *Collection
- type Config
- func (c *Config) CheckForRegisteredFile(path string) (bool, error)
- func (c *Config) CollectionByName(name string) (*Collection, error)
- func (c *Config) EditCurrentEnv() error
- func (c *Config) Flush() error
- func (c *Config) PrintInfo()
- func (c *Config) Register(path string) error
- func (c *Config) Unregister(path string) error
- type EnvMap
- type EnvMapValue
- type ErrNotFound
- type Request
- type Script
- type SemVer
Constants ¶
This section is empty.
Variables ¶
View Source
var (
CurrentVersion = NewSemVer(0, 1, 0)
)
Functions ¶
func DefaultConfigLocation ¶
func DefaultConfigLocation() string
DefaultConfigLocation returns the location of the sqump config file
func EditBuffer ¶
func WriteDefaultCollection ¶
func WriteDefaultCollection() error
Types ¶
type Collection ¶
type Collection struct { Path string `json:"-"` Version SemVer `json:"version"` Name string `json:"name"` Requests []Request `json:"requests"` Environment EnvMap `json:"environment"` }
func DefaultCollection ¶
func DefaultCollection() Collection
func ReadCollection ¶
func ReadCollection(path string) (*Collection, error)
func (*Collection) EditEnv ¶
func (c *Collection) EditEnv() error
func (*Collection) EditName ¶
func (c *Collection) EditName() error
func (*Collection) EditRequest ¶
func (c *Collection) EditRequest(reqName string) error
func (*Collection) Flush ¶
func (c *Collection) Flush() error
func (*Collection) GetRequest ¶
func (c *Collection) GetRequest(req string) (*Request, bool)
func (*Collection) PrintInfo ¶
func (c *Collection) PrintInfo()
func (*Collection) RemoveRequest ¶
func (c *Collection) RemoveRequest(name string) error
func (*Collection) SetEnvVar ¶
func (c *Collection) SetEnvVar(env, key, val string)
func (*Collection) UpsertRequest ¶
func (c *Collection) UpsertRequest(req *Request) *Collection
type Config ¶
type Config struct { Path string `json:"-"` Version SemVer `json:"version"` Files []string `json:"files"` CurrentEnv string `json:"current_env"` }
func CreateNewConfigFileAt ¶
func DefaultConfig ¶
func ReadConfigFrom ¶
func (*Config) CheckForRegisteredFile ¶
func (*Config) CollectionByName ¶
func (c *Config) CollectionByName(name string) (*Collection, error)
func (*Config) EditCurrentEnv ¶
func (*Config) Unregister ¶
type EnvMap ¶
type EnvMap map[string]EnvMapValue
type EnvMapValue ¶
type ErrNotFound ¶
func (ErrNotFound) Error ¶
func (e ErrNotFound) Error() string
func (ErrNotFound) Is ¶
func (e ErrNotFound) Is(target error) bool
type Request ¶
func NewRequest ¶
Click to show internal directories.
Click to hide internal directories.