Versions in this module Expand all Collapse all v1 v1.37.0 May 10, 2024 Changes in this version + var ErrorCodeMap = map[string]int64 + type AIError struct + Code string + Message string v1.35.3 Apr 12, 2024 Changes in this version + const ErrDocPrefix + const PathDocPrefix + func ParseSQLSchema(app *apps.Instance, schema string) (*daemon.SQLCPlugin_Catalog, error) + type AINotification struct + Error string + Finished bool + SubscriptionID string + Value any + type AINotifier func(context.Context, *AINotification) error + type AISessionID string + type AIStreamMessage struct + Error string + Finished bool + Value TaskMessage + type AIStreamUpdate = Result[AIUpdateType] + type AIUpdateType interface + IsAIUpdateType func() + type BaseAIUpdateType struct + Type string + func (b BaseAIUpdateType) IsAIUpdateType() + type CodeType string + const CodeTypeEndpoint + const CodeTypeTypes + type Endpoint struct + Doc string + EndpointSource string + Errors []*Error + ID string + Language string + Method string + Name string + Path PathSegments + RequestType string + ResponseType string + TypeSource string + Types []*Type + Visibility VisibilityType + func (e *Endpoint) Render() string + func (s *Endpoint) Auth() bool + func (s *Endpoint) GraphQL() *Endpoint + type EndpointUpdate struct + Doc string + Errors []string + Method string + Name string + Path []PathSegment + RequestType string + ResponseType string + Service string + Visibility VisibilityType + type Error struct + Code string + Doc string + func (e Error) DocItem() (string, string) + func (e Error) String() string + type ErrorUpdate struct + Code string + Doc string + Endpoint string + Service string + type LazySubClient struct + func (l *LazySubClient) Subscribe(query interface{}, variables map[string]interface{}, ...) (string, error) + type LocalEndpointUpdate struct + Endpoint *Endpoint + Service string + Type string + type Manager struct + func NewAIManager(client *graphql.SubscriptionClient) *Manager + func (m *Manager) DefineEndpoints(ctx context.Context, appSlug string, sessionID AISessionID, prompt string, ...) (string, error) + func (m *Manager) ModifySystemDesign(ctx context.Context, appSlug string, sessionID AISessionID, ...) (string, error) + func (m *Manager) ParseCode(ctx context.Context, services []Service, app *apps.Instance) (*SyncResult, error) + func (m *Manager) PreviewFiles(ctx context.Context, services []Service, app *apps.Instance) (*PreviewFilesResponse, error) + func (m *Manager) ProposeSystemDesign(ctx context.Context, appSlug, prompt string, md *meta.Data, ...) (string, error) + func (m *Manager) Unsubscribe(id string) error + func (m *Manager) UpdateCode(ctx context.Context, services []Service, app *apps.Instance, overwrite bool) (*SyncResult, error) + func (m *Manager) WriteFiles(ctx context.Context, services []Service, app *apps.Instance) (*WriteFilesResponse, error) + type PathParamUpdate struct + Doc string + Endpoint string + Param string + Service string + type PathSegment struct + Doc string + Type SegmentType + Value *string + ValueType *SegmentValueType + func (p PathSegment) DocItem() (string, string) + type PathSegments []PathSegment + func (p PathSegments) Render() (docPath string, goParams []string) + type Pos struct + Column int + Line int + type PreviewFile struct + Content string + Path paths.RelSlash + type PreviewFilesResponse struct + Files []PreviewFile + type Result struct + Error *string + Finished *bool + Value T + type SegmentType string + const SegmentTypeFallback + const SegmentTypeLiteral + const SegmentTypeParam + const SegmentTypeWildcard + type SegmentValueType string + const SegmentValueTypeString + type Service struct + Doc string + Endpoints []*Endpoint + ID string + Name string + func (s Service) GetEndpoints() []*Endpoint + func (s Service) GetName() string + func (s Service) GraphQL() ServiceInput + type ServiceInput Service + type ServiceUpdate struct + Doc string + Name string + type SessionUpdate struct + Id AISessionID + type SyncResult struct + Errors []ValidationError + Services []Service + type TaskMessage struct + Type string + func (u *TaskMessage) GetValue() AIUpdateType + type TitleUpdate struct + Title string + type Type struct + Doc string + Fields []*TypeField + Name string + func (s *Type) Render() string + type TypeField struct + Doc string + Location apienc.WireLoc + Name string + Type string + WireName string + type TypeFieldUpdate struct + Doc string + Endpoint string + Name string + Service string + Struct string + Type string + type TypeUpdate struct + Doc string + Endpoint string + Name string + Service string + type ValidationError struct + CodeType CodeType + End *Pos + Endpoint string + Message string + Service string + Start *Pos + type VisibilityType string + const VisibilityTypeAuth + const VisibilityTypePrivate + const VisibilityTypePublic + type WriteFilesResponse struct + FilesPaths []paths.RelSlash