cmd

package
v0.0.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2025 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version string = "dev"
	Commit  string = "dev"
	Date    string
)

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ReadOutput added in v0.0.6

func ReadOutput(logger logger.Logger, outputPath string, sessionId string) (map[string]any, error)

func SaveInput added in v0.0.2

func SaveInput(logger logger.Logger, message []byte) (string, string, error)

Types

type Agent added in v0.0.20

type Agent struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

type InitProjectArgs

type InitProjectArgs struct {
	BaseURL           string
	Dir               string
	Token             string
	OrgId             string
	Name              string
	Description       string
	EnableWebhookAuth bool
	Provider          *templates.TemplateRules
	AgentName         string
	AgentDescription  string
}

type InputMessage added in v0.0.6

type InputMessage struct {
	ID      string `json:"id"`
	Type    string `json:"type"`
	From    string `json:"from"`
	Payload struct {
		SessionID   string `json:"sessionId"`
		Trigger     string `json:"trigger"`
		ContentType string `json:"contentType"`
		Payload     string `json:"payload"`
	} `json:"payload"`
}

type LiveDevConnection

type LiveDevConnection struct {
	// contains filtered or unexported fields
}

func NewLiveDevConnection

func NewLiveDevConnection(logger logger.Logger, sdkEventsFile string, websocketId string, websocketUrl string, apiKey string) (*LiveDevConnection, error)

func (*LiveDevConnection) Close

func (c *LiveDevConnection) Close() error

func (*LiveDevConnection) SendMessage

func (c *LiveDevConnection) SendMessage(payload map[string]any, messageType string) error

func (*LiveDevConnection) SetOnMessage added in v0.0.2

func (c *LiveDevConnection) SetOnMessage(onMessage func(message []byte) error)

func (*LiveDevConnection) WebURL

func (c *LiveDevConnection) WebURL(appUrl string) string

func (*LiveDevConnection) Write

func (c *LiveDevConnection) Write(jsonLogMessage []byte) (int, error)

implements io.Writer to send logs

type Message

type Message struct {
	ID      string         `json:"id"`
	Type    string         `json:"type"`
	Payload map[string]any `json:"payload"`
}

type OutputPayload added in v0.0.6

type OutputPayload struct {
	ContentType string `json:"contentType"`
	Payload     string `json:"payload"`
}

type Resources added in v0.0.26

type Resources struct {
	Memory int64 `json:"memory,omitempty"`
	CPU    int64 `json:"cpu,omitempty"`
	Disk   int64 `json:"disk,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL