package
0.0.0-20240910131244-13d20f98e541
Repository: https://github.com/redhatinsights/edge-api.git
Documentation: pkg.go.dev
# Functions
AddSlashToURL cleanup url from leading and trailing white spaces and add slash "/" at the end if missing e.g.
No description provided by the author
ValidateRepoURL validates the repo URL Request.
# Constants
ArchitectureCantBeEmptyMessage is the error message when the architecture is empty.
DeviceGroupNameEmptyErrorMessage is the error message returned when device group Name is empty.
DeviceGroupNameInvalidErrorMessage is the error message returned when device group name is invalid.
DeviceGroupOrgIDEmptyErrorMessage is the error message returned when device group orgID is empty.
DeviceGroupTypeDefault correspond to the default device group type value.
DeviceGroupTypeDynamic correspond to the device group type value "dynamic".
DeviceGroupTypeInvalidErrorMessage is the error message returned when device group type is invalid.
DeviceGroupTypeStatic correspond to the device group type value "static".
DevicesCantBeEmptyMessage is the error message when the hosts are empty.
DeviceViewStatusRunning is for when a device is in a normal state.
DeviceViewStatusUpdateAvail is for when a update available for a device.
DeviceViewStatusUpdating is for when a update is sent to a device.
DispatchRecordStatusComplete is for when a playbook dispatcher job is complete.
DispatchRecordStatusCreated is for when a the DispatchRecord is created.
DispatchRecordStatusError is for when a playbook dispatcher job is in a error state.
DispatchRecordStatusPending is for when a UpdateTransaction has started scheduling PlaybookDispatcher jobs but this one hasn't started yet.
DispatchRecordStatusRunning is for when a the DispatchRecord is running.
DistributionCantBeNilMessage is the error message when a distribution is nil.
EventTypeEdgeCommitCompleted indicates a commit has completed.
EventTypeEdgeImageISORequested indicates an image update has been requested.
EventTypeEdgeImageRequested indicates an image has been requested.
EventTypeEdgeImageUpdateRequested indicates an image update has been requested.
EventTypeEdgeInstallerCompleted indicates an installer has completed.
EventTypeEdgeOstreeRepoCompleted indicates an ostree repo has completed.
EventTypeEdgeUpdateRepoRequested indicates an update transaction repository has been requested.
EventTypeEdgeWriteTemplateRequested indicates an update transaction write template repository has been requested.
ImageNameAlreadyExists is the error message when an image name already exists.
ImageStatusBuilding is for when an image is building.
ImageStatusCreated is for when an image is created.
ImageStatusError is for when an image is on a error state.
ImageStatusInterrupted is for when an image build is interrupted.
ImageStatusPending is for when an image or installer is waiting to be built.
ImageStatusStorageCleaned is for when an image commit or image commit repo or image installer content has storage cleaned this status is set only for Commit, Repo and Installer models this happen when an image is going to be deleted forever or when image status is ERROR.
ImageStatusSuccess is for when an image is available to the user.
ImageTypeCommit is the installer image type on Image Builder.
ImageTypeInstaller is the installer image type on Image Builder.
ImageTypeNotAccepted is the error message when an image type is not accepted.
InvalidSSHKeyError is the error message for not supported or invalid ssh key format.
InvalidURL is the error when type invalid URL.
MissingInstaller is the error message for not passing an installer in the request.
MissingOrganizationId is the error message for not providing an org id in the request.
MissingSSHKeyError is the error message when SSH Key is not given.
MissingUsernameError is the error message for not passing username in the request.
NameCantBeInvalidMessage is the error message when the name is invalid.
NoOutputTypes is the error message when the output types list is empty.
RepoNameCantBeInvalidMessage is the error message when the name is invalid.
RepoNameCantBeNilMessage is the error when Repository name is nil.
RepoStatusBuilding is for when a image is on a error state.
RepoStatusError is for when a Repo is on a error state.
RepoStatusSuccess is for when a Repo is available to the user.
RepoURLCantBeNilMessage is the error message when Repository url is nil.
ReservedUsernameError is the error message for passing a reserved username in the request.
SourceEdgeEventAPI indicates the API service is the source.
StaticDeltaStatusDownloading represents the to and from commits are being downloaded.
StaticDeltaStatusError represents there has been an error in the process.
StaticDeltaStatusFailedPrereq skips the static delta and uses existing to_commit URL.
StaticDeltaStatusForceGenerate is a feature flag override to force static delta generation.
StaticDeltaStatusGenerating represents static delta generation is in process.
StaticDeltaStatusNotFound represents when a static delta is not found (not an error).
StaticDeltaStatusNotFound represents static delta under development (not an error).
StaticDeltaStatusReady represents the static delta is ready to be used for an update.
StaticDeltaStatusUploading represents the delta is being uploaded to repo storage.
UpdateReasonFailure is for when the update failed.
UpdateReasonTimeout is for when the device took more time than expected to update.
UpdateStatusBuilding is for when a update is building.
UpdateStatusCreated is for when a update is created.
UpdateStatusDeviceDisconnected is for when a update is UpdateStatusDeviceDisconnected.
UpdateStatusDeviceUnresponsive is for when an update is UpdateStatusDeviceUnresponsive.
UpdateStatusError is for when a update is on a error state.
UpdateStatusStorageCleaned is for when an update-transaction repo content has storage cleaned this happen when an update-transaction is going to be deleted forever.
UpdateStatusSuccess is for when a update is available to the user.
# Variables
ErrDeviceExists is for UUID already registered on our DB.
ErrOrgIDIsMandatory is for when orgID is not set.
RepoURLCleanUp define the cleanup function, by default equal to AddSlashToURL, now it's used only to allow unit-testing of the migration preparation scripts.
# Structs
CheckGroupNameParamAPI is the /checkName parameter to check uniqueness.
CheckThirdPartyRepoNameAPI is the third party repository check name result data.
CheckThirdPartyRepoNameDataAPI is the third party repository check name data.
Commit represents an OSTree commit from image builder.
CommitAPI is a struct ...
No description provided by the author
CRCCloudEvent is a standard event schema that wraps the Edge-specific "Data" payload.
CreateDeviceGroupAPI is the /device-group POST endpoint struct for openapi.json auto-gen.
CreateImageAPI is the /images POST endpoint struct for openapi.json auto-gen.
CustomPackagesAPI is a struct for auto-generation of openapi.json.
Device is a record of Edge Devices referenced by their UUID as per the cloud.redhat.com Inventory.
DeviceAPI is entity for device.
DeviceDetails is a Device with Image and Update transactions It contains data from multiple tables on the database.
DeviceDetailsAPI is a Device with Image and Update transactions It contains data from multiple tables on the database.
DeviceDetailsList is the list of devices with details from Inventory and Edge API.
DeviceDetailsListAPI is the list of devices with details from Inventory and Edge API.
DeviceDeviceGroup is a struct of device group name and id needed for DeviceView.
DeviceForDeviceGroupAPI is a device array expected to create groups with devices.
DeviceGroup is a record of Edge Devices Groups Account is the account associated with the device group Type is the device group type and must be "static" or "dynamic".
DeviceGroupAPI is a record of Edge Devices Groups Account is the account associated with the device group Type is the device group type and must be "static" or "dynamic".
DeviceGroupDetails is a record of Device Groups and DeviceDetails.
DeviceGroupDetailsView is a record of Device Groups and DeviceView.
DeviceGroupDevicesAPI is the /device-group return endpoint struct for openapi.json auto-gen.
DeviceGroupListDetail is a record of Edge Devices Groups with images and status information.
DeviceGroupViewAPI is the return of /view endpoint.
DeviceGroupViewResponseAPI is the detail return of /view endpoint.
DeviceImageInfo is a record of group with the current images running on the device.
DeviceImageInfoAPI is a record of group with the current images running on the device.
DeviceNotificationAPI is the implementation of expected notification payload.
DevicesUpdate contains the update structure for the device.
DevicesUpdateAPI the structure for creating device updates.
DeviceUpdateImagesFilters is the device image.
DeviceView is the device information needed for the UI.
DeviceViewAPI is the device information needed for the UI.
DeviceViewList is the list of devices for a given account, formatted for the UI.
DeviceViewListAPI is the list of devices for a given account, formatted for the UI.
DeviceViewListResponseAPI is the struct returned by the devices view endpoint.
DispatchRecord represents the combination of a Playbook Dispatcher (https://github.com/RedHatInsights/playbook-dispatcher), of a PlaybookURL, a pointer to a Device, and the status.
DispatchRecordAPI represents the combination of a Playbook Dispatcher (https://github.com/RedHatInsights/playbook-dispatcher), of a PlaybookURL, a pointer to a Device, and the status.
EdgeBasePayload describes the edge standard fields for payloads.
EdgeCommitCompletedEventPayload provides image data when a commit is complete.
EdgeDevice is the entity that represents and Edge Device It is a combination of the data of a Device owned by Inventory API and the Device data saved on Edge API.
EdgeDeviceAPI is the entity that represents and Edge Device It is a combination of the data of a Device owned by Inventory API and the Device data saved on Edge API.
EdgeImageISORequestedEventPayload provides edge-specific data when an image iso is requested.
EdgeImageRequestedEventPayload provides edge-specific data when an image is requested.
EdgeImageUpdateRequestedEventPayload provides edge-specific data when an image update is requested.
EdgeInstallerCompletedEventPayload provides image data when an installer is complete.
EdgeOstreeRepoCompletedEventPayload provides image data when an ostree repo is complete.
EdgeUpdateRepoRequestedEventPayload provides update transaction data when requested to build a repository installer for devices update.
EnforceEdgeGroupsAPI is the result of /device-groups/enforce-edge-groups end point.
Error An error reported by an application.
EventNotificationAPI is used to track events to notification.
FilterByDevicesAPI is the deviceUUID list.
Image is what generates a OSTree Commit.
ImageDetailAPI return the structure to inform package info to images.
ImageInfo contains Image with updates available and rollback image.
ImageResponseAPI is a struct for auto-generation of openapi.json.
ImageSet represents a collection of images.
No description provided by the author
ImageSetDetailsResponseAPI is a struct for auto-generation of openapi.json.
ImageSetDevicesAPI contains the count and data for a list of Imagesets.
ImageSetIDViewAPI is the image set details view returned for ui image-set display.
ImageSetImageIDViewAPI is the image set image view returned for ui image-set / version display.
ImageSetImagePackagesAPI return info related to details on images from imageset.
ImageSetInstallerURLAPI returns ImagesetAPI structure with last installer available.
ImageSetsResponseAPI is a struct for auto-generation of openapi.json.
ImageSetsViewResponseAPI is the image-set row returned for ui image-sets display.
ImageSetView is the image-set row returned for ui image-sets display.
ImagesViewDataAPI is the images view data return for images view with filters , limit, offSet.
ImageUpdateAvailable contains image and differences between current and available commits.
ImageValidationRequestAPI is the structure for validating images for device updates.
ImageValidationResponseAPI is the validation response of images for device updates.
ImageView is the image row returned for ui images-set display.
InstalledPackage represents installed packages a image has.
Installer defines the model for a ISO installer.
InstallerAPI ...
InventoryGroupDevicesUpdateInfo is the inventory group update info.
InventoryGroupDevicesUpdateInfoResponseAPI is the inventory group update info.
MetaCount contains Count of a SearchPackageResult.
Model is a basic GoLang struct based on gorm.Model with the JSON tags for openapi3gen.
ModelWithoutTimestamps is a basic GoLang struct based on gorm.Model without timestamps.
Package represents the packages a Commit can have.
PackageDiff provides package difference details between current and available commits.
PackagesAPI ...
PostDeviceForDeviceGroupAPI is the expected values to add device to a group.
PutGroupNameParamAPI is the parameter to check update device group.
RecipientNotificationAPI is used to track recipients to notification.
Repo is the delivery mechanism of a Commit over HTTP.
SearchPackage contains Name of package.
SearchPackageResult contains Meta of a MetaCount.
StaticDelta models the basic data needed to generate a static delta.
StaticDeltaCommit models a commit specific to generation of static deltas.
StaticDeltaState models the state of a static delta database record.
SuccessPlaceholderResponse is a placeholder.
ThirdPartyRepo is a record of Third Party Repository or we can call it as Custom Repository provided by customers per OrgID.
ThirdPartyRepoAPI is the third party repository entity main data.
ThirdPartyRepoListAPI is the third party repositories list result data.
ThirdPartyReposAPI ...
UpdateAPI The structure of a device update.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UpdateTransaction represents the combination of an OSTree commit and a set of Inventory hosts that need to have the commit deployed to them This will ultimately kick off a transaction where the old version(s) of OSTree commit that are currently deployed onto those devices are combined with the new commit into a new OSTree repo, static deltas are computed, and then the result is stored in a way that can be served(proxied) by a Server (pkg/repo/server.go).
UpdateTransactionAPI represents the combination of an OSTree commit and a set of Inventory.
# Type aliases
EdgeAPITime is a time.Time with a valid flag.