Documentation
¶
Index ¶
- func GetValidator() *validator.Validate
- type ArchType
- type CheckUpdatesRequest
- type CheckUpdatesResponse
- type ComponentInfo
- type ComponentStatus
- type ComponentType
- type DownloadPackageRequest
- type IQuery
- type IValid
- type OSType
- type PackageInfoRequest
- type PackageInfoResponse
- type ProductStack
- type SignatureReader
- type SignatureValue
- func (sv *SignatureValue) FromBytes(b []byte) (SignatureValue, error)
- func (sv *SignatureValue) Scan(value any) error
- func (sv SignatureValue) String() string
- func (sv SignatureValue) ToBytes() ([]byte, error)
- func (sv SignatureValue) Valid() error
- func (sv SignatureValue) ValidateData(data []byte) error
- func (sv SignatureValue) ValidateFile(path string) error
- func (sv SignatureValue) ValidateHash(hash []byte) error
- func (sv SignatureValue) ValidateWrapReader(r io.Reader) SignatureReader
- func (sv SignatureValue) ValidateWrapWriter(w io.Writer) SignatureWriter
- func (sv SignatureValue) Value() (driver.Value, error)
- type SignatureWriter
- type SupportErrorRequest
- type SupportErrorResponse
- type SupportInvestigationRequest
- type SupportInvestigationResponse
- type SupportIssueRequest
- type SupportIssueResponse
- type SupportLogs
- type UpdateInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetValidator ¶
Types ¶
type CheckUpdatesRequest ¶
type CheckUpdatesRequest struct {
InstallerVersion string `json:"installer_version" validate:"required,semver"`
InstallerOS OSType `json:"installer_os" validate:"required,valid"`
InstallerArch ArchType `json:"installer_arch" validate:"required,valid"`
// Current installed components
Components []ComponentInfo `json:"components" validate:"dive,valid"`
}
CheckUpdatesRequest represents public API request for checking updates
func (CheckUpdatesRequest) Valid ¶
func (p CheckUpdatesRequest) Valid() error
type CheckUpdatesResponse ¶
type CheckUpdatesResponse struct {
Updates []UpdateInfo `json:"updates" validate:"dive,valid"`
}
CheckUpdatesResponse represents response for update check
func (CheckUpdatesResponse) Valid ¶
func (c CheckUpdatesResponse) Valid() error
type ComponentInfo ¶
type ComponentInfo struct {
Component ComponentType `json:"component" validate:"required,valid"`
Status ComponentStatus `json:"status" validate:"required,valid"`
Version *string `json:"version,omitempty" validate:"omitempty,semver"`
Hash *string `json:"hash,omitempty" validate:"omitempty,min=1,max=255"`
Repository *string `json:"repository,omitempty" validate:"omitempty,min=1,max=255"`
Tag *string `json:"tag,omitempty" validate:"omitempty,min=1,max=100"`
}
ComponentInfo represents information about installed component
func (ComponentInfo) Valid ¶
func (c ComponentInfo) Valid() error
type ComponentStatus ¶
type ComponentStatus string
ComponentStatus represents component status enum
const ( ComponentStatusUnused ComponentStatus = "unused" ComponentStatusConnected ComponentStatus = "connected" ComponentStatusInstalled ComponentStatus = "installed" ComponentStatusRunning ComponentStatus = "running" )
func (*ComponentStatus) Scan ¶
func (cs *ComponentStatus) Scan(value any) error
func (ComponentStatus) String ¶
func (cs ComponentStatus) String() string
func (ComponentStatus) Valid ¶
func (cs ComponentStatus) Valid() error
type ComponentType ¶
type ComponentType string
ComponentType represents component type enum
const ( ComponentTypePentagi ComponentType = "pentagi" ComponentTypeScraper ComponentType = "scraper" ComponentTypeLangfuseWorker ComponentType = "langfuse-worker" ComponentTypeLangfuseWeb ComponentType = "langfuse-web" ComponentTypeGrafana ComponentType = "grafana" ComponentTypeOtelcol ComponentType = "otelcol" ComponentTypeWorker ComponentType = "worker" ComponentTypeInstaller ComponentType = "installer" ComponentTypeEngine ComponentType = "engine" )
func (*ComponentType) Scan ¶
func (ct *ComponentType) Scan(value any) error
func (ComponentType) String ¶
func (ct ComponentType) String() string
func (ComponentType) Valid ¶
func (ct ComponentType) Valid() error
type DownloadPackageRequest ¶
type DownloadPackageRequest struct {
Component ComponentType `json:"component" validate:"required,valid"`
Version string `json:"version" validate:"required,semver"`
OS OSType `json:"os" validate:"required,valid"`
Arch ArchType `json:"arch" validate:"required,valid"`
}
DownloadPackageRequest represents public API request to download package
func (DownloadPackageRequest) Query ¶
func (p DownloadPackageRequest) Query() map[string]string
func (DownloadPackageRequest) Valid ¶
func (p DownloadPackageRequest) Valid() error
type IValid ¶
type IValid interface {
Valid() error
}
IValid is interface to control all models from user code
type PackageInfoRequest ¶
type PackageInfoRequest struct {
Component ComponentType `json:"component" validate:"required,valid"`
Version string `json:"version" validate:"required,semver"`
OS OSType `json:"os" validate:"required,valid"`
Arch ArchType `json:"arch" validate:"required,valid"`
}
PackageInfoRequest represents public API request to get package info
func (PackageInfoRequest) Query ¶
func (p PackageInfoRequest) Query() map[string]string
func (PackageInfoRequest) Valid ¶
func (p PackageInfoRequest) Valid() error
type PackageInfoResponse ¶
type PackageInfoResponse struct {
Size int64 `json:"size" validate:"required,min=1"`
Hash string `json:"hash" validate:"required,len=64"`
Version string `json:"version" validate:"required,semver"`
OS OSType `json:"os" validate:"required,valid"`
Arch ArchType `json:"arch" validate:"required,valid"`
Signature SignatureValue `json:"signature,omitempty" validate:"omitempty,valid"`
}
PackageInfoResponse represents response for package info
func (PackageInfoResponse) Valid ¶
func (p PackageInfoResponse) Valid() error
type ProductStack ¶
type ProductStack string
ProductStack represents product stack enum
const ( ProductStackPentagi ProductStack = "pentagi" ProductStackLangfuse ProductStack = "langfuse" ProductStackObservability ProductStack = "observability" ProductStackWorker ProductStack = "worker" ProductStackInstaller ProductStack = "installer" ProductStackEngine ProductStack = "engine" )
func (*ProductStack) Scan ¶
func (ps *ProductStack) Scan(value any) error
func (ProductStack) String ¶
func (ps ProductStack) String() string
func (ProductStack) Valid ¶
func (ps ProductStack) Valid() error
type SignatureReader ¶
type SignatureValue ¶
type SignatureValue string
func (*SignatureValue) FromBytes ¶
func (sv *SignatureValue) FromBytes(b []byte) (SignatureValue, error)
func (*SignatureValue) Scan ¶
func (sv *SignatureValue) Scan(value any) error
func (SignatureValue) String ¶
func (sv SignatureValue) String() string
func (SignatureValue) ToBytes ¶
func (sv SignatureValue) ToBytes() ([]byte, error)
func (SignatureValue) Valid ¶
func (sv SignatureValue) Valid() error
func (SignatureValue) ValidateData ¶
func (sv SignatureValue) ValidateData(data []byte) error
func (SignatureValue) ValidateFile ¶
func (sv SignatureValue) ValidateFile(path string) error
func (SignatureValue) ValidateHash ¶
func (sv SignatureValue) ValidateHash(hash []byte) error
func (SignatureValue) ValidateWrapReader ¶
func (sv SignatureValue) ValidateWrapReader(r io.Reader) SignatureReader
func (SignatureValue) ValidateWrapWriter ¶
func (sv SignatureValue) ValidateWrapWriter(w io.Writer) SignatureWriter
type SignatureWriter ¶
type SupportErrorRequest ¶
type SupportErrorRequest struct {
Component ComponentType `json:"component" validate:"required,valid"`
Version string `json:"version" validate:"required,semver"`
OS OSType `json:"os" validate:"required,valid"`
Arch ArchType `json:"arch" validate:"required,valid"`
ErrorDetails any `json:"error_details" validate:"required"`
}
SupportErrorRequest represents public API request to report an error automatically
func (SupportErrorRequest) Valid ¶
func (p SupportErrorRequest) Valid() error
type SupportErrorResponse ¶
type SupportErrorResponse struct {
}
SupportErrorResponse represents response for error reporting (empty for now, reserved for future)
func (SupportErrorResponse) Valid ¶
func (ser SupportErrorResponse) Valid() error
type SupportInvestigationRequest ¶
type SupportInvestigationRequest struct {
IssueID uuid.UUID `json:"issue_id" validate:"required"`
UseSteam bool `json:"use_steam,omitempty" validate:"omitempty"`
UserInput string `json:"user_input" validate:"required,min=1,max=4000"`
}
SupportInvestigationRequest represents public API request to investigate an issue with AI assistance
func (SupportInvestigationRequest) Valid ¶
func (sir SupportInvestigationRequest) Valid() error
type SupportInvestigationResponse ¶
type SupportInvestigationResponse struct {
Answer string `json:"answer" validate:"required"`
}
SupportInvestigationResponse represents response for investigation of issue with AI assistance (without steam response)
func (SupportInvestigationResponse) Valid ¶
func (sir SupportInvestigationResponse) Valid() error
type SupportIssueRequest ¶
type SupportIssueRequest struct {
Component ComponentType `json:"component" validate:"required,valid"`
Version string `json:"version" validate:"required,semver"`
OS OSType `json:"os" validate:"required,valid"`
Arch ArchType `json:"arch" validate:"required,valid"`
Logs []SupportLogs `json:"logs" validate:"omitempty,valid"`
ErrorDetails any `json:"error_details" validate:"required"`
}
SupportIssueRequest represents public API request to report an issue manually with AI assistance
func (SupportIssueRequest) Valid ¶
func (sir SupportIssueRequest) Valid() error
type SupportIssueResponse ¶
SupportIssueResponse represents response for issue reporting with AI assistance
func (SupportIssueResponse) Valid ¶
func (sir SupportIssueResponse) Valid() error
type SupportLogs ¶
type SupportLogs struct {
Component ComponentType `json:"component" validate:"required,valid"`
Logs []string `json:"logs" validate:"omitempty,dive,min=1,max=8192"`
}
SupportLogs represents logs for a component
func (SupportLogs) Valid ¶
func (sl SupportLogs) Valid() error
type UpdateInfo ¶
type UpdateInfo struct {
Stack ProductStack `json:"stack" validate:"required,valid" swaggertype:"string"`
HasUpdate bool `json:"has_update"`
CurrentVersion *string `json:"current_version,omitempty" validate:"omitempty,semver"`
LatestVersion *string `json:"latest_version,omitempty" validate:"omitempty,semver"`
Changelog *string `json:"changelog,omitempty" validate:"omitempty"`
ReleaseNotes *string `json:"release_notes,omitempty" validate:"omitempty"`
}
UpdateInfo represents available update information
func (UpdateInfo) Valid ¶
func (u UpdateInfo) Valid() error