Documentation
¶
Index ¶
- Constants
- Variables
- func InstallPath(baseDir string, kind Kind, id string) string
- func InstallPathForScope(baseDir string, kind Kind, id string, orgID string) string
- func LegacyStatePath(baseDir string) string
- func RequiredMarker(kind Kind) string
- func StatePath(baseDir string) string
- type ActionResult
- type Asset
- type BuiltinItem
- type Catalog
- type CatalogItem
- type ItemStatus
- type Kind
- type ListItem
- type ListResult
- type ManagedItemRecord
- type Options
- type OrgListResult
- type OrgView
- type Service
- func (s *Service) GetState(ctx context.Context) (*StateResult, error)
- func (s *Service) InstallItem(ctx context.Context, kind Kind, id string, usage UsageReport) (*ActionResult, error)
- func (s *Service) InstallOrgItem(ctx context.Context, orgID string, kind Kind, id string, usage UsageReport) (*ActionResult, error)
- func (s *Service) ListItems(ctx context.Context, force bool, usage UsageReport) (*ListResult, error)
- func (s *Service) ListItemsForOrg(ctx context.Context, orgID string, force bool, usage UsageReport) (*ListResult, error)
- func (s *Service) ListOrgs(ctx context.Context) (*OrgListResult, error)
- func (s *Service) Reconcile(ctx context.Context) error
- func (s *Service) Refresh(ctx context.Context, usage UsageReport) (*ListResult, error)
- func (s *Service) RefreshForOrg(ctx context.Context, orgID string, usage UsageReport) (*ListResult, error)
- func (s *Service) UpdateItem(ctx context.Context, kind Kind, id string, usage UsageReport) (*ActionResult, error)
- func (s *Service) UpdateOrgItem(ctx context.Context, orgID string, kind Kind, id string, usage UsageReport) (*ActionResult, error)
- type StateFile
- type StateResult
- type UsageReport
Constants ¶
View Source
const (
DefaultCatalogURL = "https://download.op-agent.com/marketplace/latest/index.json"
)
Variables ¶
View Source
var BuiltinManagedItems = []BuiltinItem{}
Functions ¶
func InstallPathForScope ¶
func LegacyStatePath ¶
func RequiredMarker ¶
Types ¶
type ActionResult ¶
type BuiltinItem ¶
type Catalog ¶
type Catalog struct {
Version string `json:"version"`
GeneratedAt string `json:"generatedAt,omitempty"`
Items []CatalogItem `json:"items"`
}
type CatalogItem ¶
type CatalogItem struct {
ID string `json:"id"`
Kind Kind `json:"kind"`
Name string `json:"name"`
Description string `json:"description"`
Builtin bool `json:"builtin"`
Version string `json:"version"`
Assets map[string]Asset `json:"assets"`
Scope string `json:"scope,omitempty"`
OrgID string `json:"orgID,omitempty"`
OrgName string `json:"orgName,omitempty"`
}
type ItemStatus ¶
type ItemStatus string
const ( StatusNotInstalled ItemStatus = "not_installed" StatusInstalled ItemStatus = "installed" StatusUpdateAvail ItemStatus = "update_available" )
type ListItem ¶
type ListItem struct {
ID string `json:"id"`
Kind Kind `json:"kind"`
Scope string `json:"scope,omitempty"`
OrgID string `json:"orgID,omitempty"`
OrgName string `json:"orgName,omitempty"`
LocalName string `json:"localName,omitempty"`
Name string `json:"name"`
Description string `json:"description"`
Builtin bool `json:"builtin"`
Version string `json:"version,omitempty"`
InstalledVersion string `json:"installedVersion,omitempty"`
InstallPath string `json:"installPath"`
SourceURL string `json:"sourceUrl,omitempty"`
Managed bool `json:"managed"`
UpdateAvailable bool `json:"updateAvailable"`
InUse bool `json:"inUse"`
Status ItemStatus `json:"status"`
MissingFromCatalog bool `json:"missingFromCatalog"`
}
type ListResult ¶
type ManagedItemRecord ¶
type ManagedItemRecord struct {
ID string `json:"id"`
Kind Kind `json:"kind"`
Scope string `json:"scope,omitempty"`
OrgID string `json:"orgID,omitempty"`
OrgName string `json:"orgName,omitempty"`
LocalName string `json:"localName,omitempty"`
InstalledVersion string `json:"installedVersion,omitempty"`
SourceURL string `json:"sourceUrl,omitempty"`
Managed bool `json:"managed"`
Builtin bool `json:"builtin"`
InstallPath string `json:"installPath"`
ProjectedPaths []string `json:"projectedPaths,omitempty"`
LastCheckedAt int64 `json:"lastCheckedAt"`
UpdateAvailable bool `json:"updateAvailable"`
}
type OrgListResult ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) InstallItem ¶
func (s *Service) InstallItem(ctx context.Context, kind Kind, id string, usage UsageReport) (*ActionResult, error)
func (*Service) InstallOrgItem ¶
func (s *Service) InstallOrgItem(ctx context.Context, orgID string, kind Kind, id string, usage UsageReport) (*ActionResult, error)
func (*Service) ListItems ¶
func (s *Service) ListItems(ctx context.Context, force bool, usage UsageReport) (*ListResult, error)
func (*Service) ListItemsForOrg ¶
func (s *Service) ListItemsForOrg(ctx context.Context, orgID string, force bool, usage UsageReport) (*ListResult, error)
func (*Service) Refresh ¶
func (s *Service) Refresh(ctx context.Context, usage UsageReport) (*ListResult, error)
func (*Service) RefreshForOrg ¶
func (s *Service) RefreshForOrg(ctx context.Context, orgID string, usage UsageReport) (*ListResult, error)
func (*Service) UpdateItem ¶
func (s *Service) UpdateItem(ctx context.Context, kind Kind, id string, usage UsageReport) (*ActionResult, error)
func (*Service) UpdateOrgItem ¶
func (s *Service) UpdateOrgItem(ctx context.Context, orgID string, kind Kind, id string, usage UsageReport) (*ActionResult, error)
type StateFile ¶
type StateFile struct {
Version int `json:"version"`
LastCatalogVersion string `json:"lastCatalogVersion,omitempty"`
LastCatalogAt string `json:"lastCatalogAt,omitempty"`
Items []ManagedItemRecord `json:"items"`
}
type StateResult ¶
type UsageReport ¶
Click to show internal directories.
Click to hide internal directories.