Documentation ¶
Index ¶
- Constants
- func CheckDependencies() tea.Cmd
- func GenerateClient(dir string, schema *proto.Schema, apiName string, outputDir string, ...) tea.Cmd
- func Init(dir string) tea.Cmd
- func LoadSchema(dir, environment string) tea.Cmd
- func LoadSecrets(path, environment string) (map[string]string, error)
- func NextMsgCommand(ch chan tea.Msg) tea.Cmd
- func ParsePrivateKey(path string) tea.Cmd
- func RemoveSecret(path, environment, key string) error
- func RenderError(message error) error
- func RenderSecrets(secrets map[string]string) string
- func RenderSuccess(message string)
- func Run(model *Model)
- func RunMigrations(schema *proto.Schema, database db.Database) tea.Cmd
- func SetSecret(path, environment, key, value string) error
- func SetupFunctions(dir string, nodePackagesPath string) tea.Cmd
- func StartDatabase(reset bool, mode int, projectDirectory string) tea.Cmd
- func StartFunctions(m *Model) tea.Cmd
- func StartRuntimeServer(port string, ch chan tea.Msg) tea.Cmd
- func StartWatcher(dir string, ch chan tea.Msg, filter []string) tea.Cmd
- func UpdateFunctions(schema *proto.Schema, dir string) tea.Cmd
- type ApplyMigrationsError
- type CheckDependenciesMsg
- type FunctionLog
- type FunctionsOutputMsg
- type FunctionsOutputWriter
- type GenerateClientModel
- type GenerateClientMsg
- type GenerateMsg
- type InitModel
- type InitialisedMsg
- type LoadSchemaMsg
- type Model
- type ParsePrivateKeyMsg
- type RunMigrationsMsg
- type RuntimeRequest
- type RuntimeRequestMsg
- type SetupFunctionsMsg
- type StartDatabaseMsg
- type StartFunctionsError
- type StartFunctionsMsg
- type TypeScriptError
- type UpdateFunctionsMsg
- type WatcherMsg
Constants ¶
View Source
const ( StatusGeneratingClient = iota StatusNotGenerated StatusGenerated )
View Source
const ( StatusInitializing = iota StatusInitialized )
View Source
const ( StatusCheckingDependencies = iota StatusParsePrivateKey StatusSetupDatabase StatusSetupFunctions StatusLoadSchema StatusRunMigrations StatusUpdateFunctions StatusStartingFunctions StatusRunning StatusQuitting )
View Source
const (
ModeRun = iota
)
Variables ¶
This section is empty.
Functions ¶
func CheckDependencies ¶
func GenerateClient ¶
func LoadSchema ¶
func LoadSecrets ¶
LoadSecrets lists secrets from the given file and returns a command
func ParsePrivateKey ¶
func RemoveSecret ¶
func RenderError ¶
func RenderSecrets ¶
func RenderSuccess ¶
func RenderSuccess(message string)
func StartFunctions ¶
Types ¶
type ApplyMigrationsError ¶
type ApplyMigrationsError struct {
Err error
}
func (*ApplyMigrationsError) Error ¶
func (a *ApplyMigrationsError) Error() string
func (*ApplyMigrationsError) Unwrap ¶ added in v0.369.1
func (e *ApplyMigrationsError) Unwrap() error
type CheckDependenciesMsg ¶
type CheckDependenciesMsg struct {
Err error
}
type FunctionLog ¶
type FunctionsOutputMsg ¶
type FunctionsOutputMsg struct {
Output string
}
type FunctionsOutputWriter ¶
type GenerateClientModel ¶
type GenerateClientModel struct { // The directory of the Keel project ProjectDir string Package bool Watch bool OutputDir string ApiName string Status int Err error Schema *proto.Schema SchemaFiles []*reader.SchemaFile Secrets map[string]string Config *config.ProjectConfig GeneratedFiles codegen.GeneratedFiles // contains filtered or unexported fields }
func (*GenerateClientModel) Init ¶
func (m *GenerateClientModel) Init() tea.Cmd
func (*GenerateClientModel) View ¶
func (m *GenerateClientModel) View() string
type GenerateClientMsg ¶
type GenerateClientMsg struct { Err error Status int GeneratedFiles codegen.GeneratedFiles Log string }
type GenerateMsg ¶
type GenerateMsg struct { Err error Status int GeneratedFiles codegen.GeneratedFiles Log string }
type InitModel ¶
type InitModel struct { // The directory of the Keel project ProjectDir string Err error Status int GeneratedFiles codegen.GeneratedFiles SkippedFiles codegen.GeneratedFiles // contains filtered or unexported fields }
type InitialisedMsg ¶
type InitialisedMsg struct { GeneratedFiles codegen.GeneratedFiles SkippedFiles codegen.GeneratedFiles Err error }
type LoadSchemaMsg ¶
type LoadSchemaMsg struct { Schema *proto.Schema Config *config.ProjectConfig SchemaFiles []*reader.SchemaFile Secrets map[string]string Err error }
type Model ¶
type Model struct { // The directory of the Keel project ProjectDir string // The mode the Model is running in Mode int // Port to run the runtime server on in ModeRun Port string // If true then the database will be reset. Only // applies to ModeRun. ResetDatabase bool // If set then @teamkeel/* npm packages will be installed // from this path, rather than NPM. NodePackagesPath string // If set then runtime will be configured with private key // located at this path in pem format. PrivateKeyPath string // The private key to configure on runtime, or nil. PrivateKey *rsa.PrivateKey // Pattern to pass to vitest to isolate specific tests TestPattern string // If true then an OTLP export will be setup for the runtime and the // env var KEEL_TRACING_ENABLED will be passed to the functions runtime TracingEnabled bool // Model state - used in View() Status int Err error Schema *proto.Schema Config *config.ProjectConfig SchemaFiles []*reader.SchemaFile Database db.Database DatabaseConnInfo *db.ConnectionInfo GeneratedFiles codegen.GeneratedFiles MigrationChanges []*migrations.DatabaseChange FunctionsServer *node.DevelopmentServer RuntimeHandler http.Handler JobHandler runtime.JobHandler SubscriberHandler runtime.SubscriberHandler RuntimeRequests []*RuntimeRequest FunctionsLog []*FunctionLog TestOutput string Secrets map[string]string Environment string // contains filtered or unexported fields }
type ParsePrivateKeyMsg ¶
type ParsePrivateKeyMsg struct { PrivateKey *rsa.PrivateKey Err error }
type RunMigrationsMsg ¶
type RunMigrationsMsg struct { Err error Changes []*migrations.DatabaseChange }
type RuntimeRequestMsg ¶
type RuntimeRequestMsg struct {
// contains filtered or unexported fields
}
type SetupFunctionsMsg ¶
type SetupFunctionsMsg struct {
Err error
}
type StartDatabaseMsg ¶
type StartDatabaseMsg struct { ConnInfo *db.ConnectionInfo Err error }
type StartFunctionsError ¶
func (*StartFunctionsError) Error ¶
func (s *StartFunctionsError) Error() string
type StartFunctionsMsg ¶
type StartFunctionsMsg struct { Err error Server *node.DevelopmentServer }
type TypeScriptError ¶
func (*TypeScriptError) Error ¶
func (t *TypeScriptError) Error() string
type UpdateFunctionsMsg ¶
type UpdateFunctionsMsg struct {
Err error
}
type WatcherMsg ¶
Click to show internal directories.
Click to hide internal directories.