Documentation
¶
Index ¶
- Variables
- func CheckForUpdates(currentVersion string)
- func DocCmd() *cobra.Command
- func ErrorHandler(request *http.Request, kind string, name string, body string) error
- func Execute(releaseVersion string, releaseCommit string, releaseDate string) error
- func GetAppURL() string
- func GetBaseURL() string
- func GetClient() *sdk.ClientWithResponses
- func GetCommand(name string) *cobra.Command
- func GetCommandSecrets() []string
- func GetEnvFiles() []string
- func GetHuhTheme() *huh.Theme
- func GetOutputFormat() string
- func GetRegistryURL() string
- func GetRunURL() string
- func GetWorkspace() string
- func LoadCommandSecrets(commandSecrets []string)
- func ModuleLanguage(directory string) string
- func Output(resource Resource, slices []interface{}, outputFormat string)
- func ReadConfigToml(folder string)
- func ReadSecrets(folder string, envFiles []string)
- func RegisterCommand(name string, cmdFunc func() *cobra.Command)
- func SeedCache(cwd string) error
- func SetCommandSecrets(secrets []string)
- func SetEnvs()
- func SetWorkspace(ws string)
- type CommandEnv
- type Config
- type Entrypoints
- type Env
- type Envs
- type ErrorModel
- type IgnoreDir
- type IgnoreFile
- type NameRetriever
- type Operations
- type Package
- type Resource
- type Result
- type ResultMetadata
- type Secrets
- type Template
- type TemplateOptions
- type Templates
Constants ¶
This section is empty.
Variables ¶
View Source
var APP_URL = "https://app.blaxel.ai"
View Source
var BASE_URL = "https://api.blaxel.ai/v0"
View Source
var GITHUB_RELEASES_URL = "https://api.github.com/repos/blaxel-ai/toolkit/releases"
View Source
var REGISTRY_URL = "https://us.registry.blaxel.ai"
View Source
var RUN_URL = "https://run.blaxel.ai"
View Source
var UPDATE_CLI_DOC_URL = "https://docs.blaxel.ai/cli-reference/introduction#update"
Functions ¶
func CheckForUpdates ¶
func CheckForUpdates(currentVersion string)
func ErrorHandler ¶
func GetBaseURL ¶
func GetBaseURL() string
func GetCommand ¶
GetCommand returns a registered command
func GetCommandSecrets ¶
func GetCommandSecrets() []string
func GetEnvFiles ¶
func GetEnvFiles() []string
func GetHuhTheme ¶
getTheme returns a custom theme configuration for the CLI interface using the Dracula color scheme. It customizes various UI elements like buttons, text inputs, and selection indicators.
func GetOutputFormat ¶
func GetOutputFormat() string
GetOutputFormat returns the current output format
func GetRegistryURL ¶
func GetRegistryURL() string
func LoadCommandSecrets ¶
func LoadCommandSecrets(commandSecrets []string)
func ModuleLanguage ¶
func ReadConfigToml ¶
func ReadConfigToml(folder string)
func ReadSecrets ¶
func RegisterCommand ¶
RegisterCommand allows commands to register themselves
func SetCommandSecrets ¶
func SetCommandSecrets(secrets []string)
Types ¶
type CommandEnv ¶
func (*CommandEnv) AddClientEnv ¶
func (c *CommandEnv) AddClientEnv()
func (*CommandEnv) Set ¶
func (c *CommandEnv) Set(key, value string)
func (*CommandEnv) ToEnv ¶
func (c *CommandEnv) ToEnv() []string
type Config ¶
type Config struct {
Name string `toml:"name"`
Workspace string `toml:"workspace"`
Type string `toml:"type"`
Protocol string `toml:"protocol"`
Functions []string `toml:"functions"`
Models []string `toml:"models"`
Agents []string `toml:"agents"`
Entrypoint Entrypoints `toml:"entrypoint"`
Env Envs `toml:"env"`
Function map[string]Package `toml:"function"`
Agent map[string]Package `toml:"agent"`
SkipRoot bool `toml:"skipRoot"`
Runtime *map[string]interface{} `toml:"runtime"`
Triggers *[]map[string]interface{} `toml:"triggers"`
Policies []string `toml:"policies,omitempty"`
}
readConfigToml reads the config.toml file and upgrade config according to content
type Entrypoints ¶
type Env ¶
func GetUniqueEnvs ¶
func GetUniqueEnvs() []Env
type ErrorModel ¶
type IgnoreFile ¶
type NameRetriever ¶
type NameRetriever struct {
Metadata struct {
Name string `yaml:"name"`
} `yaml:"metadata"`
}
type Operations ¶
func (*Operations) CliCommand ¶
func (o *Operations) CliCommand(ctx context.Context, operationId string, fn interface{})
type Resource ¶
type Resource struct {
Kind string
Short string
Plural string
Singular string
SpecType reflect.Type
List interface{}
Get interface{}
Delete interface{}
Put interface{}
Post interface{}
WithStatus bool
WithImage bool
}
type Result ¶
type Result struct {
ApiVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata interface{} `yaml:"metadata" json:"metadata"`
Spec interface{} `yaml:"spec" json:"spec"`
Status string `yaml:"status,omitempty" json:"status,omitempty"`
}
func GetResults ¶
GetResults is a public wrapper for getResults
type ResultMetadata ¶
type TemplateOptions ¶
type TemplateOptions struct {
Directory string // Target directory for the new agent app
ProjectName string // Name of the project
ProjectPrompt string // Description of the project
Language string // Language to use for the project
TemplateName string // Name of the template to use for the project
Author string // Author of the project
}
func CreateDefaultTemplateOptions ¶
func CreateDefaultTemplateOptions(directory, templateName string, templates Templates) TemplateOptions
CreateDefaultTemplateOptions creates default options when template is specified via flag
type Templates ¶
type Templates []Template
func RetrieveTemplates ¶
func (Templates) FilterByLanguage ¶
func (Templates) GetLanguages ¶
Click to show internal directories.
Click to hide internal directories.