consumerapi

package
v0.2.22 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func (*API) AdoptSkill

func (a *API) AdoptSkill(
	ctx context.Context,
	request *AdoptSkillRequest,
) (*AdoptSkillResponse, error)

func (*API) AttachSkillBundleSource

func (a *API) AttachSkillBundleSource(
	ctx context.Context,
	request *AttachSkillBundleSourceRequest,
) (*AttachSkillBundleSourceResponse, error)

func (*API) AttachSource

func (a *API) AttachSource(
	ctx context.Context,
	bundle collection.CollectionRef,
	expectedCollectionRevision uint64,
	draft skillDomain.AttachmentDraft,
) (skillDomain.SkillBundle, error)

func (*API) CreateBundle

func (a *API) CreateBundle(
	ctx context.Context,
	request CreateSkillBundleBody,
) (skillDomain.SkillBundle, error)

func (*API) CreateManagedSkill

func (a *API) CreateManagedSkill(
	ctx context.Context,
	request *CreateManagedSkillRequest,
) (*CreateManagedSkillStoreResponse, error)

func (*API) CreateSkillBundle

func (a *API) CreateSkillBundle(
	ctx context.Context,
	request *CreateSkillBundleRequest,
) (*CreateSkillBundleResponse, error)

func (*API) EnsureBuiltInBundleCurrent

func (a *API) EnsureBuiltInBundleCurrent(
	ctx context.Context,
	ref collection.CollectionRef,
) error

EnsureBuiltInBundleCurrent preserves startup convergence without publishing a new catalog when the protected bundle is already current. It is reserved for the trusted built-in installer and explicit built-in update paths.

func (*API) EnsureBuiltInBundleTopology

func (a *API) EnsureBuiltInBundleTopology(
	ctx context.Context,
	request skillDomain.BuiltInBundleTopology,
) (skillDomain.SkillBundle, error)

func (*API) GetBundle

func (a *API) GetBundle(
	ctx context.Context,
	ref collection.CollectionRef,
) (skillDomain.SkillBundle, error)

func (*API) GetManagedSkillDocument

func (a *API) GetManagedSkillDocument(
	ctx context.Context,
	request *GetManagedSkillDocumentRequest,
) (*GetManagedSkillDocumentResponse, error)

func (*API) GetSkill

func (a *API) GetSkill(
	ctx context.Context,
	request *GetSkillRequest,
) (*GetSkillResponse, error)

func (*API) GetSkillBundle

func (a *API) GetSkillBundle(
	ctx context.Context,
	request *GetSkillBundleRequest,
) (*GetSkillBundleResponse, error)

func (*API) InstallBuiltInCollection

func (a *API) InstallBuiltInCollection(
	ctx context.Context,
	request BuiltInCollectionInstallRequest,
) ([]CreateManagedSkillResponse, error)

func (*API) ListBundleSkills

func (a *API) ListBundleSkills(
	ctx context.Context,
	request *ListBundleSkillsRequest,
) (*ListBundleSkillsResponse, error)

func (*API) ListBundles

func (a *API) ListBundles(
	ctx context.Context,
	rootID root.RootID,
) ([]skillDomain.SkillBundle, error)

func (*API) ListSkillBundles

func (a *API) ListSkillBundles(
	ctx context.Context,
	request *ListSkillBundlesRequest,
) (*ListSkillBundlesResponse, error)

func (*API) ListSkills

func (a *API) ListSkills(
	ctx context.Context,
	bundle collection.CollectionRef,
) ([]artifact.Artifact, error)

func (*API) PinSkill

func (a *API) PinSkill(
	ctx context.Context,
	request *PinSkillRequest,
) (*PinSkillResponse, error)

func (*API) PurgeBundle

func (a *API) PurgeBundle(
	ctx context.Context,
	ref collection.CollectionRef,
	expectedRevision uint64,
) error

func (*API) PurgeSkill

func (a *API) PurgeSkill(
	ctx context.Context,
	request *PurgeSkillRequest,
) (*PurgeSkillResponse, error)

func (*API) PurgeSkillBundle

func (a *API) PurgeSkillBundle(
	ctx context.Context,
	request *PurgeSkillBundleRequest,
) (*PurgeSkillBundleResponse, error)

func (*API) RefreshBundle

func (*API) RefreshSkillBundle

func (a *API) RefreshSkillBundle(
	ctx context.Context,
	request *RefreshSkillBundleRequest,
) (*RefreshSkillBundleResponse, error)

func (*API) RegisterBundleDirectory

func (a *API) RegisterBundleDirectory(
	ctx context.Context,
	bundle collection.CollectionRef,
	expectedCollectionRevision uint64,
	rootPath string,
	sourceDisplayName string,
) (skillDomain.SkillBundle, error)

RegisterBundleDirectory owns filesystem Source creation, Bundle attachment, and failed-attachment compensation. The frontend never receives source configuration, source IDs, or source storage keys for this operation.

func (*API) RegisterSkillBundleDirectory

func (a *API) RegisterSkillBundleDirectory(
	ctx context.Context,
	request *RegisterSkillBundleDirectoryRequest,
) (*RegisterSkillBundleDirectoryResponse, error)

func (*API) RetireBundle

func (a *API) RetireBundle(
	ctx context.Context,
	ref collection.CollectionRef,
	expectedRevision uint64,
) (collection.Collection, error)

func (*API) RetireSkillBundle

func (a *API) RetireSkillBundle(
	ctx context.Context,
	request *RetireSkillBundleRequest,
) (*RetireSkillBundleResponse, error)

func (*API) SetSkillEnabled

func (a *API) SetSkillEnabled(
	ctx context.Context,
	request *SetSkillEnabledRequest,
) (*SetSkillEnabledResponse, error)

func (*API) UnadoptSkill

func (a *API) UnadoptSkill(
	ctx context.Context,
	request *UnadoptSkillRequest,
) (*UnadoptSkillResponse, error)

func (*API) UpdateBundle

func (a *API) UpdateBundle(
	ctx context.Context,
	request UpdateSkillBundleBody,
) (skillDomain.SkillBundle, error)

func (*API) UpdateSkillBundle

func (a *API) UpdateSkillBundle(
	ctx context.Context,
	request *UpdateSkillBundleRequest,
) (*UpdateSkillBundleResponse, error)

type AdoptSkillBody

type AdoptSkillBody struct {
	Bundle                  collection.CollectionRef
	Occurrence              catalog.OccurrenceKey
	ArtifactID              artifact.ArtifactID
	ExpectedCatalogRevision uint64
	Name                    string
	Enabled                 bool
}

type AdoptSkillRequest

type AdoptSkillRequest struct {
	Body *AdoptSkillBody `json:"body"`
}

type AdoptSkillResponse

type AdoptSkillResponse struct {
	Body *artifact.Artifact `json:"body"`
}

type AttachSkillBundleSourceBody

type AttachSkillBundleSourceBody struct {
	Bundle                     collection.CollectionRef
	ExpectedCollectionRevision uint64
	Attachment                 skillDomain.AttachmentDraft
}

type AttachSkillBundleSourceRequest

type AttachSkillBundleSourceRequest struct {
	Body *AttachSkillBundleSourceBody `json:"body"`
}

type AttachSkillBundleSourceResponse

type AttachSkillBundleSourceResponse struct {
	Body *skillDomain.SkillBundle `json:"body"`
}

type BuiltInCollectionInstallRequest

type BuiltInCollectionInstallRequest struct {
	Bundle                     collection.CollectionRef
	ExpectedCollectionRevision uint64
	PackageAddress             source.ManagedPackageAddress
	PackageFiles               []source.ManagedPackageFile
	Skills                     []skillDomain.BuiltInCollectionSkill
}

type BuiltinStore

type BuiltinStore interface {
	ListBundles(
		ctx context.Context,
		rootID root.RootID,
	) ([]skillDomain.SkillBundle, error)

	ListSkills(
		ctx context.Context,
		ref collection.CollectionRef,
	) ([]artifact.Artifact, error)

	EnsureBuiltInBundleTopology(
		ctx context.Context,
		request skillDomain.BuiltInBundleTopology,
	) (skillDomain.SkillBundle, error)

	InstallBuiltInCollection(
		ctx context.Context,
		request BuiltInCollectionInstallRequest,
	) ([]CreateManagedSkillResponse, error)

	EnsureBuiltInBundleCurrent(
		ctx context.Context,
		ref collection.CollectionRef,
	) error
}

type BundleReader

type BundleReader interface {
	GetBundle(
		ctx context.Context,
		ref collection.CollectionRef,
	) (skillDomain.SkillBundle, error)
}

type CreateManagedSkillBody

type CreateManagedSkillBody struct {
	Bundle                     collection.CollectionRef
	ExpectedCollectionRevision uint64
	ArtifactID                 artifact.ArtifactID
	SkillName                  string
	SKILLMD                    []byte
	ExpectedArtifactRevision   uint64
	Document                   *document.SkillDocument
	Files                      []source.ManagedPackageFile
	Enabled                    bool
}

type CreateManagedSkillRequest

type CreateManagedSkillRequest struct {
	Body *CreateManagedSkillBody `json:"body"`
}

type CreateManagedSkillResponse

type CreateManagedSkillResponse struct {
	Artifact artifact.Artifact
	Address  artifact.ArtifactAddress
}

type CreateManagedSkillStoreResponse

type CreateManagedSkillStoreResponse struct {
	Body *CreateManagedSkillResponse `json:"body"`
}

type CreateSkillBundleBody

type CreateSkillBundleBody struct {
	RootID                  root.RootID
	CollectionID            collection.CollectionID
	ManagedSourceID         source.SourceID
	ManagedSourceStorageKey basespec.StorageKey
	DisplayName             string
	Description             string
	Enabled                 bool
	LogicalName             basespec.LogicalName
	LogicalVersion          basespec.LogicalVersion
	Labels                  map[string]string
	Attachments             []skillDomain.AttachmentDraft
}

type CreateSkillBundleRequest

type CreateSkillBundleRequest struct {
	Body *CreateSkillBundleBody `json:"body"`
}

type CreateSkillBundleResponse

type CreateSkillBundleResponse struct {
	Body *skillDomain.SkillBundle `json:"body"`
}

type GetManagedSkillDocumentRequest

type GetManagedSkillDocumentRequest struct {
	Artifact artifact.ArtifactRef `json:"artifact"`
}

type GetManagedSkillDocumentResponse

type GetManagedSkillDocumentResponse struct {
	Body *skillDomain.ManagedSkillDocument `json:"body"`
}

type GetSkillBundleRequest

type GetSkillBundleRequest struct {
	Bundle collection.CollectionRef `json:"bundle"`
}

type GetSkillBundleResponse

type GetSkillBundleResponse struct {
	Body *skillDomain.SkillBundle `json:"body"`
}

type GetSkillRequest

type GetSkillRequest struct {
	Artifact artifact.ArtifactRef `json:"artifact"`
}

type GetSkillResponse

type GetSkillResponse struct {
	Body *artifact.Artifact `json:"body"`
}

type ListBundleSkillsRequest

type ListBundleSkillsRequest struct {
	Bundle collection.CollectionRef `json:"bundle"`
}

type ListBundleSkillsResponse

type ListBundleSkillsResponse struct {
	Body *ListBundleSkillsResponseBody `json:"body"`
}

type ListBundleSkillsResponseBody

type ListBundleSkillsResponseBody struct {
	Skills []artifact.Artifact `json:"skills"`
}

type ListSkillBundlesRequest

type ListSkillBundlesRequest struct {
	RootID root.RootID `json:"rootID"`
}

type ListSkillBundlesResponse

type ListSkillBundlesResponse struct {
	Body *ListSkillBundlesResponseBody `json:"body"`
}

type ListSkillBundlesResponseBody

type ListSkillBundlesResponseBody struct {
	Bundles []skillDomain.SkillBundle `json:"bundles"`
}

type PinSkillBody

type PinSkillBody struct {
	Bundle                     collection.CollectionRef
	ExpectedCollectionRevision uint64
	ArtifactID                 artifact.ArtifactID
	Binding                    artifact.SourceBinding
	Name                       string
	Enabled                    bool
}

type PinSkillRequest

type PinSkillRequest struct {
	Body *PinSkillBody `json:"body"`
}

type PinSkillResponse

type PinSkillResponse struct {
	Body *artifact.Artifact `json:"body"`
}

type PurgeSkillBundleRequest

type PurgeSkillBundleRequest struct {
	Bundle           collection.CollectionRef `json:"bundle"`
	ExpectedRevision uint64                   `json:"expectedRevision"`
}

type PurgeSkillBundleResponse

type PurgeSkillBundleResponse struct {
	Bundle collection.CollectionRef `json:"bundle"`
}

type PurgeSkillRequest

type PurgeSkillRequest struct {
	Artifact         artifact.ArtifactRef `json:"artifact"`
	ExpectedRevision uint64               `json:"expectedRevision"`
}

type PurgeSkillResponse

type PurgeSkillResponse struct {
	Artifact artifact.ArtifactRef `json:"artifact"`
}

type RefreshSkillBundleRequest

type RefreshSkillBundleRequest struct {
	Bundle collection.CollectionRef `json:"bundle"`
}

type RefreshSkillBundleResponse

type RefreshSkillBundleResponse struct {
	Body *catalog.RefreshCollectionResult `json:"body"`
}

type RegisterSkillBundleDirectoryRequest

type RegisterSkillBundleDirectoryRequest struct {
	Bundle                     collection.CollectionRef `json:"bundle"`
	ExpectedCollectionRevision uint64                   `json:"expectedCollectionRevision"`
	RootPath                   string                   `json:"rootPath"`
	SourceDisplayName          string                   `json:"sourceDisplayName"`
}

type RegisterSkillBundleDirectoryResponse

type RegisterSkillBundleDirectoryResponse struct {
	Body *skillDomain.SkillBundle `json:"body"`
}

type RetireSkillBundleRequest

type RetireSkillBundleRequest struct {
	Bundle           collection.CollectionRef `json:"bundle"`
	ExpectedRevision uint64                   `json:"expectedRevision"`
}

type RetireSkillBundleResponse

type RetireSkillBundleResponse struct {
	Body *collection.Collection `json:"body"`
}

type SetSkillEnabledBody

type SetSkillEnabledBody struct {
	Artifact         artifact.ArtifactRef
	ExpectedRevision uint64
	Enabled          bool
}

type SetSkillEnabledRequest

type SetSkillEnabledRequest struct {
	Body *SetSkillEnabledBody `json:"body"`
}

type SetSkillEnabledResponse

type SetSkillEnabledResponse struct {
	Body *artifact.Artifact `json:"body"`
}

type UnadoptSkillRequest

type UnadoptSkillRequest struct {
	Artifact         artifact.ArtifactRef `json:"artifact"`
	ExpectedRevision uint64               `json:"expectedRevision"`
	Suppress         bool                 `json:"suppress"`
}

type UnadoptSkillResponse

type UnadoptSkillResponse struct {
	Artifact artifact.ArtifactRef `json:"artifact"`
}

type UpdateSkillBundleBody

type UpdateSkillBundleBody struct {
	Bundle           collection.CollectionRef
	ExpectedRevision uint64
	DisplayName      string
	Description      string
	Enabled          bool
}

type UpdateSkillBundleRequest

type UpdateSkillBundleRequest struct {
	Body *UpdateSkillBundleBody `json:"body"`
}

type UpdateSkillBundleResponse

type UpdateSkillBundleResponse struct {
	Body *skillDomain.SkillBundle `json:"body"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL