Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDatabaseFilename ¶
Types ¶
type Catalog ¶ added in v0.28.0
type Catalog struct {
Ref string `db:"ref"`
Digest string `db:"digest"`
Title string `db:"title"`
Source string `db:"source"`
Servers []CatalogServer `db:"-"`
}
type CatalogDAO ¶ added in v0.28.0
type CatalogServer ¶ added in v0.28.0
type CatalogServer struct {
ID *int64 `db:"id" json:"id"`
ServerType string `db:"server_type" json:"server_type"`
Tools ToolList `db:"tools" json:"tools"`
Source string `db:"source" json:"source"`
Image string `db:"image" json:"image"`
CatalogRef string `db:"catalog_ref" json:"catalog_ref"`
Snapshot *ServerSnapshot `db:"snapshot" json:"snapshot"`
}
type DAO ¶
type DAO interface {
WorkingSetDAO
CatalogDAO
}
type Server ¶
type Server struct {
Type string `json:"type"`
Config map[string]any `json:"config,omitempty"`
Secrets string `json:"secrets,omitempty"`
Tools []string `json:"tools"`
Source string `json:"source,omitempty"`
Image string `json:"image,omitempty"`
// Optional snapshot of the server schema
Snapshot *ServerSnapshot `json:"snapshot,omitempty"`
}
type ServerList ¶
type ServerList []Server
func (*ServerList) Scan ¶
func (servers *ServerList) Scan(value any) error
type ServerSnapshot ¶ added in v0.26.0
type ServerSnapshot struct {
// TODO(cody): hacky reference to the same type that we use elsewhere
Server catalog.Server `json:"server"`
}
func (*ServerSnapshot) Scan ¶ added in v0.28.0
func (snapshot *ServerSnapshot) Scan(value any) error
type WorkingSet ¶
type WorkingSet struct {
ID string `db:"id"`
Name string `db:"name"`
Servers ServerList `db:"servers"`
Secrets SecretMap `db:"secrets"`
}
type WorkingSetDAO ¶
type WorkingSetDAO interface {
GetWorkingSet(ctx context.Context, id string) (*WorkingSet, error)
FindWorkingSetsByIDPrefix(ctx context.Context, prefix string) ([]WorkingSet, error)
ListWorkingSets(ctx context.Context) ([]WorkingSet, error)
CreateWorkingSet(ctx context.Context, workingSet WorkingSet) error
UpdateWorkingSet(ctx context.Context, workingSet WorkingSet) error
RemoveWorkingSet(ctx context.Context, id string) error
SearchWorkingSets(ctx context.Context, query string, workingSetID string) ([]WorkingSet, error)
}
Click to show internal directories.
Click to hide internal directories.