result

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	Name string `json:"name,omitempty"`
	Fqbn string `json:"fqbn,omitempty"`
}

Board maps a rpc.Board

type BoardDetailsResponse

type BoardDetailsResponse struct {
	Fqbn                     string                           `json:"fqbn,omitempty"`
	Name                     string                           `json:"name,omitempty"`
	Version                  string                           `json:"version,omitempty"`
	PropertiesId             string                           `json:"properties_id,omitempty"`
	Alias                    string                           `json:"alias,omitempty"`
	Official                 bool                             `json:"official,omitempty"`
	Pinout                   string                           `json:"pinout,omitempty"`
	Package                  *Package                         `json:"package,omitempty"`
	Platform                 *BoardPlatform                   `json:"platform,omitempty"`
	ToolsDependencies        []*ToolsDependency               `json:"tools_dependencies,omitempty"`
	ConfigOptions            []*ConfigOption                  `json:"config_options,omitempty"`
	Programmers              []*Programmer                    `json:"programmers,omitempty"`
	IdentificationProperties []*BoardIdentificationProperties `json:"identification_properties,omitempty"`
	BuildProperties          []string                         `json:"build_properties,omitempty"`
	DefaultProgrammerID      string                           `json:"default_programmer_id,omitempty"`
}

type BoardIdentificationProperties

type BoardIdentificationProperties struct {
	Properties orderedmap.Map[string, string] `json:"properties,omitempty"`
}

type BoardListAllResponse

type BoardListAllResponse struct {
	Boards []*BoardListItem `json:"boards,omitempty"`
}

type BoardListItem

type BoardListItem struct {
	Name     string    `json:"name,omitempty"`
	Fqbn     string    `json:"fqbn,omitempty"`
	IsHidden bool      `json:"is_hidden,omitempty"`
	Platform *Platform `json:"platform,omitempty"`
}

func NewBoardListItem

func NewBoardListItem(b *rpc.BoardListItem) *BoardListItem

func NewBoardListItems

func NewBoardListItems(b []*rpc.BoardListItem) []*BoardListItem

type BoardListWatchResponse

type BoardListWatchResponse struct {
	EventType string        `json:"event_type,omitempty"`
	Port      *DetectedPort `json:"port,omitempty"`
	Error     string        `json:"error,omitempty"`
}

type BoardPlatform

type BoardPlatform struct {
	Architecture    string `json:"architecture,omitempty"`
	Category        string `json:"category,omitempty"`
	Url             string `json:"url,omitempty"`
	ArchiveFilename string `json:"archive_filename,omitempty"`
	Checksum        string `json:"checksum,omitempty"`
	Size            int64  `json:"size,omitempty"`
	Name            string `json:"name,omitempty"`
}

func NewBoardPlatform

func NewBoardPlatform(p *rpc.BoardPlatform) *BoardPlatform

type BuilderResult

type BuilderResult struct {
	BuildPath              string                      `json:"build_path,omitempty"`
	UsedLibraries          []*Library                  `json:"used_libraries,omitempty"`
	ExecutableSectionsSize []*ExecutableSectionSize    `json:"executable_sections_size,omitempty"`
	BoardPlatform          *InstalledPlatformReference `json:"board_platform,omitempty"`
	BuildPlatform          *InstalledPlatformReference `json:"build_platform,omitempty"`
	BuildProperties        []string                    `json:"build_properties,omitempty"`
	Diagnostics            []*CompileDiagnostic        `json:"diagnostics,omitempty"`
}

func NewBuilderResult

func NewBuilderResult(c *rpc.BuilderResult) *BuilderResult

type CompileDiagnostic

type CompileDiagnostic struct {
	Severity string                      `json:"severity,omitempty"`
	Message  string                      `json:"message,omitempty"`
	File     string                      `json:"file,omitempty"`
	Line     int64                       `json:"line,omitempty"`
	Column   int64                       `json:"column,omitempty"`
	Context  []*CompileDiagnosticContext `json:"context,omitempty"`
	Notes    []*CompileDiagnosticNote    `json:"notes,omitempty"`
}

func NewCompileDiagnostic

func NewCompileDiagnostic(cd *rpc.CompileDiagnostic) *CompileDiagnostic

func NewCompileDiagnostics

func NewCompileDiagnostics(cd []*rpc.CompileDiagnostic) []*CompileDiagnostic

type CompileDiagnosticContext

type CompileDiagnosticContext struct {
	Message string `json:"message,omitempty"`
	File    string `json:"file,omitempty"`
	Line    int64  `json:"line,omitempty"`
	Column  int64  `json:"column,omitempty"`
}

type CompileDiagnosticNote

type CompileDiagnosticNote struct {
	Message string `json:"message,omitempty"`
	File    string `json:"file,omitempty"`
	Line    int64  `json:"line,omitempty"`
	Column  int64  `json:"column,omitempty"`
}

func NewCompileDiagnosticNote

func NewCompileDiagnosticNote(cdn *rpc.CompileDiagnosticNote) *CompileDiagnosticNote

type ConfigOption

type ConfigOption struct {
	Option      string         `json:"option,omitempty"`
	OptionLabel string         `json:"option_label,omitempty"`
	Values      []*ConfigValue `json:"values,omitempty"`
}

func NewConfigOption

func NewConfigOption(o *rpc.ConfigOption) *ConfigOption

func NewConfigOptions

func NewConfigOptions(c []*rpc.ConfigOption) []*ConfigOption

type ConfigValue

type ConfigValue struct {
	Value      string `json:"value,omitempty"`
	ValueLabel string `json:"value_label,omitempty"`
	Selected   bool   `json:"selected,omitempty"`
}

func NewConfigValue

func NewConfigValue(c *rpc.ConfigValue) *ConfigValue

func NewConfigValues

func NewConfigValues(c []*rpc.ConfigValue) []*ConfigValue

type DetectedPort

type DetectedPort struct {
	MatchingBoards []*BoardListItem `json:"matching_boards,omitempty"`
	Port           *Port            `json:"port,omitempty"`
}

func NewDetectedPort

func NewDetectedPort(p *rpc.DetectedPort) *DetectedPort

func NewDetectedPorts

func NewDetectedPorts(p []*rpc.DetectedPort) []*DetectedPort

type DownloadResource

type DownloadResource struct {
	Url             string `json:"url,omitempty"`
	ArchiveFilename string `json:"archive_filename,omitempty"`
	Checksum        string `json:"checksum,omitempty"`
	Size            int64  `json:"size,omitempty"`
	CachePath       string `json:"cache_path,omitempty"`
}

func NewDownloadResource

func NewDownloadResource(r *rpc.DownloadResource) *DownloadResource

type ExecutableSectionSize

type ExecutableSectionSize struct {
	Name    string `json:"name,omitempty"`
	Size    int64  `json:"size,omitempty"`
	MaxSize int64  `json:"max_size,omitempty"`
}

type Help

type Help struct {
	Online string `json:"online,omitempty"`
}

func NewHelp

func NewHelp(h *rpc.Help) *Help

type HelpResource

type HelpResource struct {
	Online string `json:"online,omitempty"`
}

HelpResource maps a rpc.HelpResource

type IndexUpdateReportResult

type IndexUpdateReportResult struct {
	IndexURL string                   `json:"index_url"`
	Status   IndexUpdateReport_Status `json:"status"`
}

func NewIndexUpdateReportResult

func NewIndexUpdateReportResult(resp *rpc.IndexUpdateReport) *IndexUpdateReportResult

type IndexUpdateReport_Status

type IndexUpdateReport_Status string
const (
	IndexUpdateReport_StatusUnspecified     IndexUpdateReport_Status = "unspecified"
	IndexUpdateReport_StatusAlreadyUpToDate IndexUpdateReport_Status = "already-up-to-date"
	IndexUpdateReport_StatusFailed          IndexUpdateReport_Status = "failed"
	IndexUpdateReport_StatusSkipped         IndexUpdateReport_Status = "skipped"
	IndexUpdateReport_StatusUpdated         IndexUpdateReport_Status = "updated"
)

type InstalledLibrary

type InstalledLibrary struct {
	Library *Library        `json:"library,omitempty"`
	Release *LibraryRelease `json:"release,omitempty"`
}

func NewInstalledLibrary

func NewInstalledLibrary(l *rpc.InstalledLibrary) *InstalledLibrary

type InstalledPlatformReference

type InstalledPlatformReference struct {
	Id         string `json:"id,omitempty"`
	Version    string `json:"version,omitempty"`
	InstallDir string `json:"install_dir,omitempty"`
	PackageUrl string `json:"package_url,omitempty"`
}

type IsDebugSupportedResponse

type IsDebugSupportedResponse struct {
	DebuggingSupported bool   `json:"debugging_supported"`
	DebugFQBN          string `json:"debug_fqbn,omitempty"`
}

type Library

type Library struct {
	Name              string                         `json:"name,omitempty"`
	Author            string                         `json:"author,omitempty"`
	Maintainer        string                         `json:"maintainer,omitempty"`
	Sentence          string                         `json:"sentence,omitempty"`
	Paragraph         string                         `json:"paragraph,omitempty"`
	Website           string                         `json:"website,omitempty"`
	Category          string                         `json:"category,omitempty"`
	Architectures     []string                       `json:"architectures,omitempty"`
	Types             []string                       `json:"types,omitempty"`
	InstallDir        string                         `json:"install_dir,omitempty"`
	SourceDir         string                         `json:"source_dir,omitempty"`
	UtilityDir        string                         `json:"utility_dir,omitempty"`
	ContainerPlatform string                         `json:"container_platform,omitempty"`
	DotALinkage       bool                           `json:"dot_a_linkage,omitempty"`
	Precompiled       bool                           `json:"precompiled,omitempty"`
	LdFlags           string                         `json:"ld_flags,omitempty"`
	IsLegacy          bool                           `json:"is_legacy,omitempty"`
	Version           string                         `json:"version,omitempty"`
	License           string                         `json:"license,omitempty"`
	Properties        orderedmap.Map[string, string] `json:"properties,omitempty"`
	Location          LibraryLocation                `json:"location,omitempty"`
	Layout            LibraryLayout                  `json:"layout,omitempty"`
	Examples          []string                       `json:"examples,omitempty"`
	ProvidesIncludes  []string                       `json:"provides_includes,omitempty"`
	CompatibleWith    orderedmap.Map[string, bool]   `json:"compatible_with,omitempty"`
	InDevelopment     bool                           `json:"in_development,omitempty"`
}

func NewLibrary

func NewLibrary(l *rpc.Library) *Library

type LibraryDependency

type LibraryDependency struct {
	Name              string `json:"name,omitempty"`
	VersionConstraint string `json:"version_constraint,omitempty"`
}

func NewLibraryDependencies

func NewLibraryDependencies(d []*rpc.LibraryDependency) []*LibraryDependency

func NewLibraryDependency

func NewLibraryDependency(d *rpc.LibraryDependency) *LibraryDependency

type LibraryDependencyStatus

type LibraryDependencyStatus struct {
	Name             string `json:"name,omitempty"`
	VersionRequired  string `json:"version_required,omitempty"`
	VersionInstalled string `json:"version_installed,omitempty"`
}

type LibraryLayout

type LibraryLayout string
const (
	LibraryLayoutFlat      LibraryLayout = "flat"
	LibraryLayoutRecursive LibraryLayout = "recursive"
)

func NewLibraryLayout

func NewLibraryLayout(r rpc.LibraryLayout) LibraryLayout

type LibraryLocation

type LibraryLocation string
const (
	LibraryLocationUser                      LibraryLocation = "user"
	LibraryLocationIDEBuiltin                LibraryLocation = "ide"
	LibraryLocationPlatformBuiltin           LibraryLocation = "platform"
	LibraryLocationReferencedPlatformBuiltin LibraryLocation = "ref-platform"
	LibraryLocationUnmanged                  LibraryLocation = "unmanaged"
)

func NewLibraryLocation

func NewLibraryLocation(r rpc.LibraryLocation) LibraryLocation

type LibraryRelease

type LibraryRelease struct {
	Author           string               `json:"author,omitempty"`
	Version          string               `json:"version,omitempty"`
	Maintainer       string               `json:"maintainer,omitempty"`
	Sentence         string               `json:"sentence,omitempty"`
	Paragraph        string               `json:"paragraph,omitempty"`
	Website          string               `json:"website,omitempty"`
	Category         string               `json:"category,omitempty"`
	Architectures    []string             `json:"architectures,omitempty"`
	Types            []string             `json:"types,omitempty"`
	Resources        *DownloadResource    `json:"resources,omitempty"`
	License          string               `json:"license,omitempty"`
	ProvidesIncludes []string             `json:"provides_includes,omitempty"`
	Dependencies     []*LibraryDependency `json:"dependencies,omitempty"`
}

func NewLibraryRelease

func NewLibraryRelease(l *rpc.LibraryRelease) *LibraryRelease

type LibraryResolveDependenciesResponse

type LibraryResolveDependenciesResponse struct {
	Dependencies []*LibraryDependencyStatus `json:"dependencies,omitempty"`
}

type LibrarySearchResponse

type LibrarySearchResponse struct {
	Libraries []*SearchedLibrary  `json:"libraries,omitempty"`
	Status    LibrarySearchStatus `json:"status,omitempty"`
}

type LibrarySearchStatus

type LibrarySearchStatus string
const (
	LibrarySearchStatusFailed  LibrarySearchStatus = "failed"
	LibrarySearchStatusSuccess LibrarySearchStatus = "success"
)

type MonitorPortSettingDescriptor

type MonitorPortSettingDescriptor struct {
	SettingId  string   `json:"setting_id,omitempty"`
	Label      string   `json:"label,omitempty"`
	Type       string   `json:"type,omitempty"`
	EnumValues []string `json:"enum_values,omitempty"`
	Value      string   `json:"value,omitempty"`
}

type Package

type Package struct {
	Maintainer string `json:"maintainer,omitempty"`
	Url        string `json:"url,omitempty"`
	WebsiteUrl string `json:"website_url,omitempty"`
	Email      string `json:"email,omitempty"`
	Name       string `json:"name,omitempty"`
	Help       *Help  `json:"help,omitempty"`
}

func NewPackage

func NewPackage(p *rpc.Package) *Package

type Platform

type Platform struct {
	Metadata *PlatformMetadata `json:"metadata,omitempty"`
	Release  *PlatformRelease  `json:"release,omitempty"`
}

func NewPlatform

func NewPlatform(p *rpc.Platform) *Platform

type PlatformMetadata

type PlatformMetadata struct {
	Id                string `json:"id,omitempty"`
	Maintainer        string `json:"maintainer,omitempty"`
	Website           string `json:"website,omitempty"`
	Email             string `json:"email,omitempty"`
	ManuallyInstalled bool   `json:"manually_installed,omitempty"`
	Deprecated        bool   `json:"deprecated,omitempty"`
	Indexed           bool   `json:"indexed,omitempty"`
}

func NewPlatformMetadata

func NewPlatformMetadata(p *rpc.PlatformMetadata) *PlatformMetadata

type PlatformRelease

type PlatformRelease struct {
	Name            string        `json:"name,omitempty"`
	Version         string        `json:"version,omitempty"`
	Types           []string      `json:"types,omitempty"`
	Installed       bool          `json:"installed,omitempty"`
	Boards          []*Board      `json:"boards,omitempty"`
	Help            *HelpResource `json:"help,omitempty"`
	MissingMetadata bool          `json:"missing_metadata,omitempty"`
	Deprecated      bool          `json:"deprecated,omitempty"`
	Compatible      bool          `json:"compatible"`
}

PlatformRelease maps a rpc.PlatformRelease

func NewPlatformRelease

func NewPlatformRelease(in *rpc.PlatformRelease) *PlatformRelease

NewPlatformRelease creates a new result.PlatformRelease from rpc.PlatformRelease

func (*PlatformRelease) FormatName

func (p *PlatformRelease) FormatName() string

type PlatformSummary

type PlatformSummary struct {
	Id                string `json:"id,omitempty"`
	Maintainer        string `json:"maintainer,omitempty"`
	Website           string `json:"website,omitempty"`
	Email             string `json:"email,omitempty"`
	ManuallyInstalled bool   `json:"manually_installed,omitempty"`
	Deprecated        bool   `json:"deprecated,omitempty"`
	Indexed           bool   `json:"indexed,omitempty"`

	Releases orderedmap.Map[*semver.Version, *PlatformRelease] `json:"releases,omitempty"`

	InstalledVersion *semver.Version `json:"installed_version,omitempty"`
	LatestVersion    *semver.Version `json:"latest_version,omitempty"`
}

PlatformSummary maps a rpc.PlatformSummary

func NewPlatformSummary

func NewPlatformSummary(in *rpc.PlatformSummary) *PlatformSummary

NewPlatformSummary creates a new result.PlatformSummary from rpc.PlatformSummary

func (*PlatformSummary) GetInstalledRelease

func (p *PlatformSummary) GetInstalledRelease() *PlatformRelease

GetInstalledRelease returns the installed relase of this platform or nil if none available.

func (*PlatformSummary) GetLatestRelease

func (p *PlatformSummary) GetLatestRelease() *PlatformRelease

GetLatestRelease returns the latest relase of this platform or nil if none available.

func (*PlatformSummary) GetPlatformName

func (p *PlatformSummary) GetPlatformName() string

GetPlatformName compute the name of the platform based on the installed/available releases.

type Port

type Port struct {
	Address       string                         `json:"address,omitempty"`
	Label         string                         `json:"label,omitempty"`
	Protocol      string                         `json:"protocol,omitempty"`
	ProtocolLabel string                         `json:"protocol_label,omitempty"`
	Properties    orderedmap.Map[string, string] `json:"properties,omitempty"`
	HardwareId    string                         `json:"hardware_id,omitempty"`
}

func NewPort

func NewPort(p *rpc.Port) *Port

type Programmer

type Programmer struct {
	Platform string `json:"platform,omitempty"`
	Id       string `json:"id,omitempty"`
	Name     string `json:"name,omitempty"`
}

func NewProgrammer

func NewProgrammer(c *rpc.Programmer) *Programmer

func NewProgrammers

func NewProgrammers(c []*rpc.Programmer) []*Programmer

type SearchedLibrary

type SearchedLibrary struct {
	Name              string                                           `json:"name,omitempty"`
	Releases          orderedmap.Map[*semver.Version, *LibraryRelease] `json:"releases,omitempty"`
	Latest            *LibraryRelease                                  `json:"latest,omitempty"`
	AvailableVersions []string                                         `json:"available_versions,omitempty"`
}

func NewSearchedLibrary

func NewSearchedLibrary(l *rpc.SearchedLibrary) *SearchedLibrary

type System

type System struct {
	Checksum        string `json:"checksum,omitempty"`
	Host            string `json:"host,omitempty"`
	ArchiveFilename string `json:"archive_filename,omitempty"`
	Url             string `json:"url,omitempty"`
	Size            int64  `json:"size,omitempty"`
}

func NewSystem

func NewSystem(s *rpc.Systems) *System

func NewSystems

func NewSystems(p []*rpc.Systems) []*System

type ToolsDependency

type ToolsDependency struct {
	Packager string    `json:"packager,omitempty"`
	Name     string    `json:"name,omitempty"`
	Version  string    `json:"version,omitempty"`
	Systems  []*System `json:"systems,omitempty"`
}

func NewToolsDependencies

func NewToolsDependencies(p []*rpc.ToolsDependencies) []*ToolsDependency

func NewToolsDependency

func NewToolsDependency(p *rpc.ToolsDependencies) *ToolsDependency

type UpdateIndexResponse_ResultResult

type UpdateIndexResponse_ResultResult struct {
	UpdatedIndexes []*IndexUpdateReportResult `json:"updated_indexes,omitempty"`
}

type UpdateLibrariesIndexResponse_ResultResult

type UpdateLibrariesIndexResponse_ResultResult struct {
	LibrariesIndex *IndexUpdateReportResult `json:"libraries_index"`
}