Documentation
¶
Index ¶
- Constants
- func CheckDependencies() tea.Cmd
- func FetchLatestVersion() 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 SeedData(dir string, schema *proto.Schema, database db.Database) tea.Cmd
- func SetSecret(path, environment, key, value string) error
- func SetupCron(schema *proto.Schema, database db.Database, ...) tea.Cmd
- func SetupFunctions(dir string, nodePackagesPath string, packageManager string, mode int) tea.Cmd
- func SnapshotDatabase(dir string, schema *proto.Schema, database db.Database) tea.Cmd
- func StartDatabase(reset bool, mode int, projectDirectory string) tea.Cmd
- func StartFunctions(m *Model) tea.Cmd
- func StartRpcServer(port string, ch chan tea.Msg) tea.Cmd
- func StartRuntimeServer(port string, customHostname string, ch chan tea.Msg) tea.Cmd
- func StartStorage(projectDirectory string) tea.Cmd
- func StartTraceServer(port string) tea.Cmd
- func StartWatcher(dir string, ch chan tea.Msg, filter []string) tea.Cmd
- func UpdateFunctions(schema *proto.Schema, cfg *config.ProjectConfig, dir string) tea.Cmd
- type ApplyMigrationsError
- type CheckDependenciesMsg
- type CronRunnerMsg
- type FetchLatestVersionMsg
- type FunctionLog
- type FunctionsOutputMsg
- type FunctionsOutputWriter
- type GenerateClientModel
- type GenerateClientMsg
- type GenerateMsg
- type InitModel
- type InitialisedMsg
- type LoadSchemaMsg
- type Model
- type ParsePrivateKeyMsg
- type RpcRequestMsg
- type RunMigrationsMsg
- type RuntimeRequest
- type RuntimeRequestMsg
- type SeedDataError
- type SeedDataMsg
- type SetupFunctionsMsg
- type SnapshotDatabaseMsg
- type StartDatabaseMsg
- type StartFunctionsError
- type StartFunctionsMsg
- type StartServerError
- type StartStorageMsg
- type TypeScriptError
- type UpdateFunctionsMsg
- type WatcherMsg
Constants ¶
View Source
const ( StatusGeneratingClient = iota StatusNotGenerated StatusGenerated )
View Source
const ( StatusInitializing = iota StatusInitialized )
View Source
const ( ModeRun = iota ModeSeed ModeReset )
View Source
const ( StatusCheckingDependencies = iota StatusParsePrivateKey StatusSetupStorage StatusSetupDatabase StatusSetupFunctions StatusLoadSchema StatusRunMigrations StatusSeedData StatusUpdateFunctions StatusStartingFunctions StatusRunning StatusQuitting StatusSeedCompleted StatusSnapshotDatabase StatusSnapshotCompleted StatusErrorStartingServers )
Variables ¶
This section is empty.
Functions ¶
func CheckDependencies ¶
func FetchLatestVersion ¶ added in v0.380.0
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 SetupFunctions ¶
func SnapshotDatabase ¶ added in v0.410.0
func StartFunctions ¶
func StartRuntimeServer ¶
func StartStorage ¶ added in v0.425.0
func StartTraceServer ¶ added in v0.377.0
func UpdateFunctions ¶
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 CronRunnerMsg ¶ added in v0.415.3
type CronRunnerMsg struct {
Err error
}
type FetchLatestVersionMsg ¶ added in v0.380.0
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 servers on in ModeRun
Port string
RpcPort string
TracePort 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
// Either 'npm' or 'pnpm'
PackageManager 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 traces will be sent to localhost:4318 instead of the default exporter
// This does mean that the Console Monitoring page will not reflect any traces.
CustomTracing bool
// If true, do not filter events in the local trace exporter.
// This will then show all system events in the local console.
VerboseTracing bool
// A custom configured hostname, which may be necessary to change for SSO callback.
CustomHostname string
// 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
RpcHandler http.Handler
RuntimeRequests []*RuntimeRequest
FunctionsLog []*FunctionLog
StorageConnInfo *storagecmd.ConnectionInfo
Storage storage.Storer
CronRunner *cron.Cron
TestOutput string
Secrets map[string]string
Environment string
SeedData bool
SeededFiles []string
SnapshotDatabase bool
// The current latest version of Keel in NPM
LatestVersion *semver.Version
// contains filtered or unexported fields
}
type ParsePrivateKeyMsg ¶
type ParsePrivateKeyMsg struct {
PrivateKey *rsa.PrivateKey
Err error
}
type RpcRequestMsg ¶ added in v0.376.0
type RpcRequestMsg struct {
// contains filtered or unexported fields
}
type RunMigrationsMsg ¶
type RunMigrationsMsg struct {
Err error
Changes []*migrations.DatabaseChange
}
type RuntimeRequestMsg ¶
type RuntimeRequestMsg struct {
// contains filtered or unexported fields
}
type SeedDataError ¶ added in v0.410.0
type SeedDataError struct {
Err error
}
func (*SeedDataError) Error ¶ added in v0.410.0
func (a *SeedDataError) Error() string
func (*SeedDataError) Unwrap ¶ added in v0.410.0
func (e *SeedDataError) Unwrap() error
type SeedDataMsg ¶ added in v0.410.0
type SetupFunctionsMsg ¶
type SetupFunctionsMsg struct {
Err error
}
type SnapshotDatabaseMsg ¶ added in v0.410.0
type SnapshotDatabaseMsg 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 StartServerError ¶ added in v0.413.4
type StartServerError struct {
Err error
}
type StartStorageMsg ¶ added in v0.425.0
type StartStorageMsg struct {
ConnInfo *storage.ConnectionInfo
Err error
}
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.