Documentation
¶
Index ¶
- Constants
- func FullRootPath() string
- func MajorRootPath() string
- func RootPrefix() string
- func ZestTaskResponseToApi(zestTaskResponse *zest.TaskResponse, apiTaskResponse *PulpTaskResponse)
- type AddUploadsRequest
- type AdminTaskFilterData
- type AdminTaskInfoCollectionResponse
- type AdminTaskInfoResponse
- type Artifact
- type CollectionMetadataSettable
- type ContentUnitListRequest
- type ContentUnitSearchRequest
- type CreateUploadRequest
- type DetectRpmsRequest
- type DetectRpmsResponse
- type EmptiableDate
- type Feature
- type FeatureServiceContentResponse
- type FeatureSet
- type FeatureStatus
- type FetchGPGKeyRequest
- type FetchGPGKeyResponse
- type FilterData
- type FinishUploadRequest
- type GenericAttributeValidationResponse
- type Links
- type ListFeaturesResponse
- type ListSnapshotByDateRequest
- type ListSnapshotByDateResponse
- type PaginationData
- type PopularRepositoriesCollectionResponse
- type PopularRepositoryResponse
- type PublicRepositoryCollectionResponse
- type PublicRepositoryResponse
- type PulpResponse
- type PulpTaskResponse
- type PulpUploadChunkRequest
- type RedHatRepoStructure
- type RepositoryCollectionResponse
- type RepositoryConfigurationFile
- type RepositoryEnvironment
- type RepositoryEnvironmentCollectionResponse
- type RepositoryExportRequest
- type RepositoryExportResponse
- type RepositoryImportResponse
- type RepositoryIntrospectRequest
- type RepositoryPackageGroup
- type RepositoryPackageGroupCollectionResponse
- type RepositoryParameterResponse
- type RepositoryRequest
- type RepositoryResponse
- type RepositoryRpm
- type RepositoryRpmCollectionResponse
- type RepositoryRpmRequest
- type RepositoryUpdateRequest
- type RepositoryValidationRequest
- type RepositoryValidationResponse
- type ResponseMetadata
- type SearchEnvironmentResponse
- type SearchModuleStreams
- type SearchModuleStreamsRequest
- type SearchPackageGroupResponse
- type SearchRpmRequest
- type SearchRpmResponse
- type SearchSnapshotModuleStreamsRequest
- type SnapshotCollectionResponse
- type SnapshotErrata
- type SnapshotErrataCollectionResponse
- type SnapshotErrataListRequest
- type SnapshotForDate
- type SnapshotResponse
- type SnapshotRpm
- type SnapshotRpmCollectionResponse
- type SnapshotSearchRpmRequest
- type Stream
- type SubscriptionCheckResponse
- type TaskInfoCollectionResponse
- type TaskInfoFilterData
- type TaskInfoResponse
- type TaskRequest
- type TemplateCollectionResponse
- type TemplateFilterData
- type TemplateRequest
- type TemplateResponse
- type TemplateUpdateRequest
- type UUIDListRequest
- type Upload
- type UploadChunkRequest
- type UploadResponse
- type UrlValidationResponse
Constants ¶
const ApiVersion = "1.0"
const ApiVersionMajor = "1"
const ContentUnitSearchRequestLimitDefault int = 100
const ContentUnitSearchRequestLimitMaximum int = 500
const IdentityHeader = "x-rh-identity"
const SearchRpmRequestLimitDefault int = 100
const SearchRpmRequestLimitMaximum int = 500
Variables ¶
This section is empty.
Functions ¶
func FullRootPath ¶
func FullRootPath() string
func MajorRootPath ¶
func MajorRootPath() string
func RootPrefix ¶
func RootPrefix() string
func ZestTaskResponseToApi ¶
func ZestTaskResponseToApi(zestTaskResponse *zest.TaskResponse, apiTaskResponse *PulpTaskResponse)
Types ¶
type AddUploadsRequest ¶
type AdminTaskFilterData ¶
type AdminTaskInfoCollectionResponse ¶
type AdminTaskInfoCollectionResponse struct { Data []AdminTaskInfoResponse `json:"data"` // Requested Data Meta ResponseMetadata `json:"meta"` // Metadata about the request Links Links `json:"links"` // Links to other pages of results }
func (*AdminTaskInfoCollectionResponse) SetMetadata ¶
func (a *AdminTaskInfoCollectionResponse) SetMetadata(meta ResponseMetadata, links Links)
type AdminTaskInfoResponse ¶
type AdminTaskInfoResponse struct { UUID string `json:"uuid"` // UUID of the object Status string `json:"status"` // Status of task (running, failed, completed, canceled, pending) Typename string `json:"typename"` // Type of task (e.g. introspect, completed) QueuedAt string `json:"queued_at"` // Timestamp task was queued at StartedAt string `json:"started_at"` // Timestamp task started running at FinishedAt string `json:"finished_at"` // Timestamp task finished running at Error string `json:"error"` // Error thrown while running task OrgId string `json:"org_id"` // Organization ID of the owner AccountId string `json:"account_id"` // Account ID of the owner Payload json.RawMessage `json:"payload"` // Payload of task (only returned in fetch) Pulp PulpResponse `json:"pulp,omitempty"` // Pulp data for snapshot tasks (only returned in fetch) }
AdminTaskInfoResponse holds data returned by a admin tasks API response
type CollectionMetadataSettable ¶
type CollectionMetadataSettable interface {
SetMetadata(meta ResponseMetadata, links Links)
}
CollectionMetadataSettable a collection response with settable metadata
type ContentUnitListRequest ¶
type ContentUnitSearchRequest ¶
type ContentUnitSearchRequest struct { URLs []string `json:"urls,omitempty"` // URLs of repositories to search UUIDs []string `json:"uuids,omitempty"` // List of repository UUIDs to search Search string `json:"search"` // Search string to search content unit names ExactNames []string `json:"exact_names,omitempty"` // List of names to search using an exact match Limit *int `json:"limit,omitempty"` // Maximum number of records to return for the search }
type CreateUploadRequest ¶
type DetectRpmsRequest ¶
type DetectRpmsRequest struct { URLs []string `json:"urls,omitempty"` // URLs of repositories to search UUIDs []string `json:"uuids,omitempty"` // List of repository UUIDs to search RpmNames []string `json:"rpm_names"` // List of rpm names to search Limit *int `json:"limit,omitempty"` // Maximum number of records to return for the search }
type DetectRpmsResponse ¶
type EmptiableDate ¶
func (EmptiableDate) AsTime ¶
func (d EmptiableDate) AsTime() time.Time
func (EmptiableDate) IsZero ¶
func (d EmptiableDate) IsZero() bool
func (EmptiableDate) MarshalJSON ¶
func (d EmptiableDate) MarshalJSON() ([]byte, error)
func (*EmptiableDate) UnmarshalJSON ¶
func (d *EmptiableDate) UnmarshalJSON(b []byte) error
type FeatureServiceContentResponse ¶
type FeatureServiceContentResponse struct { Name string `json:"name"` URL string `json:"url"` RedHatRepoStructure RedHatRepoStructure `json:"red_hat_repo_structure"` }
type FeatureSet ¶
type FeatureStatus ¶
type FetchGPGKeyRequest ¶
type FetchGPGKeyRequest struct {
URL string `json:"url" validate:"required"` // The url from which to download the GPG Key.
}
type FetchGPGKeyResponse ¶
type FetchGPGKeyResponse struct {
GpgKey string `json:"gpg_key" ` // The downloaded GPG Keys from the provided url.
}
type FilterData ¶
type FilterData struct { Search string `query:"search" json:"search" ` // Search string based query to optionally filter on Arch string `query:"arch" json:"arch" ` // Comma separated list of architecture to optionally filter on (e.g. 'x86_64,s390x' would return Repositories with x86_64 or s390x only) Version string `query:"version" json:"version"` // Comma separated list of versions to optionally filter on (e.g. '7,8' would return Repositories with versions 7 or 8 only) AvailableForArch string `query:"available_for_arch" json:"available_for_arch"` // Filter by compatible arch (e.g. 'x86_64' would return Repositories with the 'x86_64' arch and Repositories where arch is not set) AvailableForVersion string `query:"available_for_version" json:"available_for_version"` // Filter by compatible version (e.g. 7 would return Repositories with the version 7 or where version is not set) Name string `query:"name" json:"name"` // Filter repositories by name using an exact match. URL string `query:"url" json:"url"` // Comma separated list of urls to optionally filter on. UUID string `query:"uuid" json:"uuid"` // Comma separated list of uuids to optionally filter on. Status string `query:"status" json:"status"` // Comma separated list of statuses to optionally filter on. Origin string `query:"origin" json:"origin"` // Comma separated list of origins to filter on (e.g. external, red_hat, upload) ContentType string `query:"content_type" json:"content_type"` // Filter repositories by content type (e.g. rpm) }
type FinishUploadRequest ¶
type GenericAttributeValidationResponse ¶
type GenericAttributeValidationResponse struct { Skipped bool `json:"skipped"` // Skipped if the attribute is not passed in for validation Valid bool `json:"valid"` // Valid if not skipped and the provided attribute is valid Error string `json:"error"` // Error message if the attribute is not valid }
type ListFeaturesResponse ¶
type ListFeaturesResponse struct {
Features []string `json:"features"`
}
type ListSnapshotByDateResponse ¶
type ListSnapshotByDateResponse struct {
Data []SnapshotForDate `json:"data"` // Requested Data
}
type PaginationData ¶
type PopularRepositoriesCollectionResponse ¶
type PopularRepositoriesCollectionResponse struct { Data []PopularRepositoryResponse `json:"data"` // Meta ResponseMetadata `json:"meta"` // Metadata about the request Links Links `json:"links"` // Links to other pages of results }
func (*PopularRepositoriesCollectionResponse) SetMetadata ¶
func (r *PopularRepositoriesCollectionResponse) SetMetadata(meta ResponseMetadata, links Links)
type PopularRepositoryResponse ¶
type PopularRepositoryResponse struct { UUID string `json:"uuid"` // UUID of the repository if it exists for the user ExistingName string `json:"existing_name"` // Existing reference name for repository SuggestedName string `json:"suggested_name"` // Suggested name of the popular repository URL string `json:"url"` // URL of the remote yum repository DistributionVersions []string `json:"distribution_versions" example:"7,8"` // Versions to restrict client usage to DistributionArch string `json:"distribution_arch" example:"x86_64"` // Architecture to restrict client usage to GpgKey string `json:"gpg_key"` // GPG key for repository MetadataVerification bool `json:"metadata_verification"` // Verify packages }
PopularRepositoryResponse holds data returned by the popular repositories API response
type PublicRepositoryCollectionResponse ¶
type PublicRepositoryCollectionResponse struct { Data []PublicRepositoryResponse `json:"data"` // Meta ResponseMetadata `json:"meta"` // Metadata about the request Links Links `json:"links"` // Links to other pages of results }
func (*PublicRepositoryCollectionResponse) SetMetadata ¶
func (r *PublicRepositoryCollectionResponse) SetMetadata(meta ResponseMetadata, links Links)
type PublicRepositoryResponse ¶
type PublicRepositoryResponse struct { URL string `json:"url"` // URL of the remote yum repository Status string `json:"status"` // Combined introspection and snapshot status of the repository LastIntrospectionTime string `json:"last_introspection_time"` // Timestamp of last attempted introspection LastIntrospectionSuccessTime string `json:"last_success_introspection_time"` // Timestamp of last successful introspection LastIntrospectionUpdateTime string `json:"last_update_introspection_time"` // Timestamp of last introspection that had updates LastIntrospectionError string `json:"last_introspection_error"` // Error of last attempted introspection LastIntrospectionStatus string `json:"last_introspection_status"` // Status of last introspection PackageCount int `json:"package_count"` // Number of packages last read in the repository }
PublicRepositoryResponse holds data returned by the public repositories API response
type PulpResponse ¶
type PulpResponse struct { Sync *PulpTaskResponse `json:"sync,omitempty"` Distribution *PulpTaskResponse `json:"distribution,omitempty"` Publication *PulpTaskResponse `json:"publication,omitempty"` }
type PulpTaskResponse ¶
type PulpTaskResponse struct { PulpHref *string `json:"pulp_href,omitempty"` // Timestamp of creation. PulpCreated *time.Time `json:"pulp_created,omitempty"` // The current state of the task. The possible values include: 'waiting', 'skipped', 'running', 'completed', 'failed', 'canceled' and 'canceling'. State *string `json:"state,omitempty"` // The name of task. Name string `json:"name"` // The logging correlation id associated with this task LoggingCid string `json:"logging_cid"` // Timestamp of the when this task started execution. StartedAt *time.Time `json:"started_at,omitempty"` // Timestamp of the when this task stopped execution. FinishedAt *time.Time `json:"finished_at,omitempty"` // A JSON Object of a fatal error encountered during the execution of this task. Error map[string]string `json:"error,omitempty"` // The worker associated with this task. This field is empty if a worker is not yet assigned. Worker *string `json:"worker,omitempty"` // The parent task that spawned this task. ParentTask *string `json:"parent_task,omitempty"` // Any tasks spawned by this task. ChildTasks []string `json:"child_tasks,omitempty"` // The task group that this task is a member of. TaskGroup *string `json:"task_group,omitempty"` ProgressReports []pulpProgressReportResponse `json:"progress_reports,omitempty"` // Resources created by this task. CreatedResources []string `json:"created_resources,omitempty"` // A list of resources required by that task. ReservedResourcesRecord []string `json:"reserved_resources_record,omitempty"` }
type PulpUploadChunkRequest ¶
type RedHatRepoStructure ¶
type RepositoryCollectionResponse ¶
type RepositoryCollectionResponse struct { Data []RepositoryResponse `json:"data"` // Requested Data Meta ResponseMetadata `json:"meta"` // Metadata about the request Links Links `json:"links"` // Links to other pages of results }
func (*RepositoryCollectionResponse) SetMetadata ¶
func (r *RepositoryCollectionResponse) SetMetadata(meta ResponseMetadata, links Links)
type RepositoryConfigurationFile ¶
type RepositoryConfigurationFile string
type RepositoryEnvironment ¶
type RepositoryEnvironmentCollectionResponse ¶
type RepositoryEnvironmentCollectionResponse struct { Data []RepositoryEnvironment `json:"data"` // List of environments Meta ResponseMetadata `json:"meta"` // Metadata about the request Links Links `json:"links"` // Links to other pages of results }
func (*RepositoryEnvironmentCollectionResponse) SetMetadata ¶
func (r *RepositoryEnvironmentCollectionResponse) SetMetadata(meta ResponseMetadata, links Links)
SetMetadata Map metadata to the collection. meta Metadata about the request. links Links to other pages of results.
type RepositoryExportRequest ¶
type RepositoryExportRequest struct {
RepositoryUuids []string `json:"repository_uuids" validate:"required"` // List of repository uuids to export
}
type RepositoryExportResponse ¶
type RepositoryExportResponse struct { Name string `json:"name"` // Name of the remote yum repository URL string `json:"url"` // URL of the remote yum repository Origin string `json:"origin"` // Origin of the repository DistributionVersions []string `json:"distribution_versions" example:"8"` // Versions to restrict client usage to DistributionArch string `json:"distribution_arch" example:"x86_64"` // Architecture to restrict client usage to GpgKey string `json:"gpg_key"` // GPG key for repository MetadataVerification bool `json:"metadata_verification"` // Verify packages ModuleHotfixes bool `json:"module_hotfixes"` // Disable modularity filtering on this repository Snapshot bool `json:"snapshot"` // Enable snapshotting and hosting of this repository }
type RepositoryImportResponse ¶
type RepositoryImportResponse struct { RepositoryResponse Warnings []map[string]interface{} `json:"warnings"` // Warnings to alert user of mismatched fields if there is an existing repo with the same URL }
type RepositoryIntrospectRequest ¶
type RepositoryIntrospectRequest struct {
ResetCount bool `json:"reset_count"` // Reset the failed introspections count
}
type RepositoryPackageGroup ¶
type RepositoryPackageGroup struct { UUID string `json:"uuid"` // Identifier of the package group ID string `json:"id"` // The package group ID Name string `json:"name"` // The package group name Description string `json:"description"` // The package group description PackageList []string `json:"packagelist"` // The list of packages in the package group }
type RepositoryPackageGroupCollectionResponse ¶
type RepositoryPackageGroupCollectionResponse struct { Data []RepositoryPackageGroup `json:"data"` // List of package groups Meta ResponseMetadata `json:"meta"` // Metadata about the request Links Links `json:"links"` // Links to other pages of results }
func (*RepositoryPackageGroupCollectionResponse) SetMetadata ¶
func (r *RepositoryPackageGroupCollectionResponse) SetMetadata(meta ResponseMetadata, links Links)
SetMetadata Map metadata to the collection. meta Metadata about the request. links Links to other pages of results.
type RepositoryParameterResponse ¶
type RepositoryParameterResponse struct { DistributionVersions []config.DistributionVersion `json:"distribution_versions" ` // Versions available for repository creation DistributionArches []config.DistributionArch `json:"distribution_arches"` // Architectures available for repository creation }
RepositoryParameterResponse holds data returned by a repositories API response
type RepositoryRequest ¶
type RepositoryRequest struct { UUID *string `json:"uuid" readonly:"true" swaggerignore:"true"` AccountID *string `json:"account_id" readonly:"true" swaggerignore:"true"` // Account ID of the owner OrgID *string `json:"org_id" readonly:"true" swaggerignore:"true"` // Organization ID of the owner Origin *string `json:"origin" readonly:"true"` // Origin of the repository ContentType *string `json:"content_type" readonly:"true" swaggerignore:"true"` // Content Type (rpm) of the repository Name *string `json:"name" validate:"required"` // Name of the remote yum repository URL *string `json:"url"` // URL of the remote yum repository DistributionVersions *[]string `json:"distribution_versions" example:"7,8"` // Versions to restrict client usage to DistributionArch *string `json:"distribution_arch" example:"x86_64"` // Architecture to restrict client usage to GpgKey *string `json:"gpg_key"` // GPG key for repository MetadataVerification *bool `json:"metadata_verification"` // Verify packages ModuleHotfixes *bool `json:"module_hotfixes"` // Disable modularity filtering on this repository Snapshot *bool `json:"snapshot"` // Enable snapshotting and hosting of this repository }
RepositoryRequest holds data received from request to create repository
func (*RepositoryRequest) FillDefaults ¶
func (r *RepositoryRequest) FillDefaults()
func (*RepositoryRequest) ToRepositoryUpdateRequest ¶
func (r *RepositoryRequest) ToRepositoryUpdateRequest() RepositoryUpdateRequest
type RepositoryResponse ¶
type RepositoryResponse struct { UUID string `json:"uuid" readonly:"true"` // UUID of the object Name string `json:"name"` // Name of the remote yum repository Label string `json:"label"` // Label used to configure the yum repository on clients URL string `json:"url"` // URL of the remote yum repository Origin string `json:"origin" ` // Origin of the repository ContentType string `json:"content_type" ` // Content Type (rpm) of the repository DistributionVersions []string `json:"distribution_versions" example:"7,8"` // Versions to restrict client usage to DistributionArch string `json:"distribution_arch" example:"x86_64"` // Architecture to restrict client usage to AccountID string `json:"account_id" readonly:"true"` // Account ID of the owner OrgID string `json:"org_id" readonly:"true"` // Organization ID of the owner LastIntrospectionTime string `json:"last_introspection_time"` // Timestamp of last attempted introspection LastIntrospectionSuccessTime string `json:"last_success_introspection_time"` // Timestamp of last successful introspection LastIntrospectionUpdateTime string `json:"last_update_introspection_time"` // Timestamp of last introspection that had updates LastIntrospectionError string `json:"last_introspection_error"` // Error of last attempted introspection LastIntrospectionStatus string `json:"last_introspection_status"` // Status of last introspection FailedIntrospectionsCount int `json:"failed_introspections_count"` // Number of consecutive failed introspections FailedSnapshotCount int `json:"failed_snapshot_count"` // Number of consecutive failed snapshots PackageCount int `json:"package_count"` // Number of packages last read in the repository Status string `json:"status"` // Combined status of last introspection and snapshot of repository (Valid, Invalid, Unavailable, Pending) GpgKey string `json:"gpg_key"` // GPG key for repository MetadataVerification bool `json:"metadata_verification"` // Verify packages ModuleHotfixes bool `json:"module_hotfixes"` // Disable modularity filtering on this repository RepositoryUUID string `json:"-" swaggerignore:"true"` // UUID of the dao.Repository Snapshot bool `json:"snapshot"` // Enable snapshotting and hosting of this repository LastSnapshotUUID string `json:"last_snapshot_uuid,omitempty"` // UUID of the last dao.Snapshot LastSnapshot *SnapshotResponse `json:"last_snapshot,omitempty"` // Latest Snapshot taken LastSnapshotTaskUUID string `json:"last_snapshot_task_uuid,omitempty"` // UUID of the last snapshot task LastSnapshotTask *TaskInfoResponse `json:"last_snapshot_task,omitempty"` // Last snapshot task response (contains last snapshot status) LatestSnapshotURL string `json:"latest_snapshot_url,omitempty"` // Latest URL for the snapshot distribution FeatureName string `json:"feature_name,omitempty"` // The feature name this repo requires }
RepositoryResponse holds data returned by a repositories API response
func (*RepositoryResponse) Introspectable ¶
func (r *RepositoryResponse) Introspectable() bool
type RepositoryRpm ¶
type RepositoryRpm struct { UUID string `json:"uuid"` // Identifier of the rpm Name string `json:"name"` // The rpm package name Arch string `json:"arch"` // The architecture of the rpm Version string `json:"version"` // The version of the rpm Release string `json:"release"` // The release of the rpm Epoch int32 `json:"epoch"` // The epoch of the rpm Summary string `json:"summary"` // The summary of the rpm Checksum string `json:"checksum"` // The checksum of the rpm }
type RepositoryRpmCollectionResponse ¶
type RepositoryRpmCollectionResponse struct { Data []RepositoryRpm `json:"data"` // List of rpms Meta ResponseMetadata `json:"meta"` // Metadata about the request Links Links `json:"links"` // Links to other pages of results }
func (*RepositoryRpmCollectionResponse) SetMetadata ¶
func (r *RepositoryRpmCollectionResponse) SetMetadata(meta ResponseMetadata, links Links)
SetMetadata Map metadata to the collection. meta Metadata about the request. links Links to other pages of results.
type RepositoryRpmRequest ¶
type RepositoryUpdateRequest ¶
type RepositoryUpdateRequest struct { Name *string `json:"name"` // Name of the remote yum repository URL *string `json:"url"` // URL of the remote yum repository DistributionVersions *[]string `json:"distribution_versions" example:"7,8"` // Versions to restrict client usage to DistributionArch *string `json:"distribution_arch" example:"x86_64"` // Architecture to restrict client usage to GpgKey *string `json:"gpg_key"` // GPG key for repository MetadataVerification *bool `json:"metadata_verification"` // Verify packages ModuleHotfixes *bool `json:"module_hotfixes"` // Disable modularity filtering on this repository Snapshot *bool `json:"snapshot"` // Enable snapshotting and hosting of this repository }
func (*RepositoryUpdateRequest) FillDefaults ¶
func (r *RepositoryUpdateRequest) FillDefaults()
type RepositoryValidationRequest ¶
type RepositoryValidationRequest struct { Name *string `json:"name"` // Name of the remote yum repository URL *string `json:"url"` // URL of the remote yum repository GPGKey *string `json:"gpg_key"` // GPGKey of the remote yum repository UUID *string `json:"uuid"` // If set, this is an "Update" validation MetadataVerification bool `json:"metadata_verification"` // If set, attempt to validate the yum metadata with the specified GPG Key }
type RepositoryValidationResponse ¶
type RepositoryValidationResponse struct { Name GenericAttributeValidationResponse `json:"name"` // Validation response for repository name URL UrlValidationResponse `json:"url"` // Validation response for repository url GPGKey GenericAttributeValidationResponse `json:"gpg_key"` // Validation response for the GPG Key }
type ResponseMetadata ¶
type SearchModuleStreams ¶
type SearchModuleStreamsRequest ¶
type SearchModuleStreamsRequest struct { UUIDs []string `json:"uuids" validate:"required"` // List of repository UUIDs to search URLs []string `json:"urls" validate:"required"` // List of repository URLs to search RpmNames []string `json:"rpm_names" validate:"required"` // List of rpm names to search SortBy string `json:"sort_by"` // SortBy sets the sort order of the result Search string `json:"search"` // Search string to search rpm names }
type SearchPackageGroupResponse ¶
type SearchPackageGroupResponse struct { PackageGroupName string `json:"package_group_name"` // Name of package group found ID string `json:"id"` // Package group ID Description string `json:"description"` // Description of the package group found PackageList pq.StringArray `json:"package_list" gorm:"type:text"` // Package list of the package group found }
type SearchRpmRequest ¶
type SearchRpmRequest struct { URLs []string `json:"urls,omitempty"` // URLs of repositories to search UUIDs []string `json:"uuids,omitempty"` // List of repository UUIDs to search Search string `json:"search"` // Search string to search rpm names Limit *int `json:"limit,omitempty"` // Maximum number of records to return for the search }
type SearchRpmResponse ¶
type SearchSnapshotModuleStreamsRequest ¶
type SearchSnapshotModuleStreamsRequest struct { UUIDs []string `json:"uuids" validate:"required"` // List of snapshot UUIDs to search RpmNames []string `json:"rpm_names" validate:"required"` // List of rpm names to restrict returned modules SortBy string `json:"sort_by"` // SortBy sets the sort order of the result Search string `json:"search"` // Search string to search module names }
type SnapshotCollectionResponse ¶
type SnapshotCollectionResponse struct { Data []SnapshotResponse `json:"data"` // Requested Data Meta ResponseMetadata `json:"meta"` // Metadata about the request Links Links `json:"links"` // Links to other pages of results }
func (*SnapshotCollectionResponse) SetMetadata ¶
func (r *SnapshotCollectionResponse) SetMetadata(meta ResponseMetadata, links Links)
type SnapshotErrata ¶
type SnapshotErrata struct { Id string `json:"id"` ErrataId string `json:"errata_id"` // ID of the errata Title string `json:"title"` // Title of the errata Summary string `json:"summary"` // Summary of the errata Description string `json:"description"` // Description of the errata IssuedDate string `json:"issued_date"` // IssuedDate of the errata UpdateDate string `json:"updated_date"` // UpdateDate of the errata Type string `json:"type"` // Type of the errata Severity string `json:"severity"` // Severity of the errata RebootSuggested bool `json:"reboot_suggested"` // Whether a reboot is suggested CVEs []string `json:"cves"` // List of CVEs }
type SnapshotErrataCollectionResponse ¶
type SnapshotErrataCollectionResponse struct { Data []SnapshotErrata `json:"data"` // List of errata Meta ResponseMetadata `json:"meta"` // Metadata about the request Links Links `json:"links"` // Links to other pages of results }
func (*SnapshotErrataCollectionResponse) SetMetadata ¶
func (r *SnapshotErrataCollectionResponse) SetMetadata(meta ResponseMetadata, links Links)
type SnapshotErrataListRequest ¶
type SnapshotErrataListRequest struct { UUID string `param:"uuid" validate:"required"` // Identifier of the repository Search string `query:"search"` // Errata Id to optionally filter-on Type []string `query:"type"` // Type to optionally filter-on Severity []string `query:"severity"` // Severity to optionally filter-on }
type SnapshotForDate ¶
type SnapshotForDate struct { RepositoryUUID string `json:"repository_uuid"` // Repository uuid for associated snapshot IsAfter bool `json:"is_after"` // Is the snapshot after the specified date Match *SnapshotResponse `json:"match,omitempty"` // This is the snapshot (if found) }
type SnapshotResponse ¶
type SnapshotResponse struct { UUID string `json:"uuid"` CreatedAt time.Time `json:"created_at"` // Datetime the snapshot was created RepositoryPath string `json:"repository_path"` // Path to repository snapshot contents ContentCounts map[string]int64 `json:"content_counts"` // Count of each content type AddedCounts map[string]int64 `json:"added_counts"` // Count of each content type RemovedCounts map[string]int64 `json:"removed_counts"` // Count of each content type URL string `json:"url"` // URL to the snapshot's content RepositoryName string `json:"repository_name"` // Name of repository the snapshot belongs to RepositoryUUID string `json:"repository_uuid"` // UUID of the repository the snapshot belongs to PublicationHref string `json:"-" swaggerignore:"true"` // Publication href of the snapshot in pulp }
type SnapshotRpm ¶
type SnapshotRpm struct { Name string `json:"name"` // The rpm package name Arch string `json:"arch"` // The architecture of the rpm Version string `json:"version"` // The version of the rpm Release string `json:"release"` // The release of the rpm Epoch string `json:"epoch"` // The epoch of the rpm Summary string `json:"summary"` // The summary of the rpm }
type SnapshotRpmCollectionResponse ¶
type SnapshotRpmCollectionResponse struct { Data []SnapshotRpm `json:"data"` // List of rpms Meta ResponseMetadata `json:"meta"` // Metadata about the request Links Links `json:"links"` // Links to other pages of results }
func (*SnapshotRpmCollectionResponse) SetMetadata ¶
func (r *SnapshotRpmCollectionResponse) SetMetadata(meta ResponseMetadata, links Links)
type Stream ¶
type Stream struct { Name string `json:"name"` // Name of the module Stream string `json:"stream"` // Module stream version Context string `json:"context"` // Context of the module Arch string `json:"arch"` // The Architecture of the rpm Version string `json:"version"` // The version of the rpm Description string `json:"description"` // Module description Profiles map[string][]string `json:"profiles"` // Module profile data }
type SubscriptionCheckResponse ¶
type SubscriptionCheckResponse struct {
RedHatEnterpriseLinux bool `json:"red_hat_enterprise_linux"`
}
type TaskInfoCollectionResponse ¶
type TaskInfoCollectionResponse struct { Data []TaskInfoResponse `json:"data"` // Requested Data Meta ResponseMetadata `json:"meta"` // Metadata about the request Links Links `json:"links"` // Links to other pages of results }
func (*TaskInfoCollectionResponse) SetMetadata ¶
func (t *TaskInfoCollectionResponse) SetMetadata(meta ResponseMetadata, links Links)
type TaskInfoFilterData ¶
type TaskInfoFilterData struct { Status string `query:"status" json:"status"` Typename string `query:"type" json:"type"` RepoConfigUUID string `query:"repository_uuid" json:"repository_uuid"` TemplateUUID string `query:"template_uuid" json:"template_uuid"` ExcludeRedHatOrg bool `json:"exclude_red_hat_org"` }
type TaskInfoResponse ¶
type TaskInfoResponse struct { UUID string `json:"uuid"` // UUID of the object Status string `json:"status"` // Status of task (running, failed, completed, canceled, pending) CreatedAt string `json:"created_at"` // Timestamp of task creation EndedAt string `json:"ended_at"` // Timestamp task ended running at Error string `json:"error"` // Error thrown while running task OrgId string `json:"org_id"` // Organization ID of the owner Typename string `json:"type"` // Type of task ObjectType string `json:"object_type"` // Type of the associated object, either repository or template ObjectName string `json:"object_name"` // Name of the associated repository or template ObjectUUID string `json:"object_uuid"` // UUID of the associated repository or template Dependencies []string `json:"dependencies,omitempty"` // UUIDs of parent tasks Dependents []string `json:"dependents,omitempty"` // UUIDs of child tasks }
TaskInfoResponse holds data returned by a tasks API response
type TaskRequest ¶
type TaskRequest struct {
TaskHref string `param:"task_href" validate:"required"` // Task identifier
}
type TemplateCollectionResponse ¶
type TemplateCollectionResponse struct { Data []TemplateResponse `json:"data"` // Requested Data Meta ResponseMetadata `json:"meta"` // Metadata about the request Links Links `json:"links"` // Links to other pages of results }
func (*TemplateCollectionResponse) SetMetadata ¶
func (r *TemplateCollectionResponse) SetMetadata(meta ResponseMetadata, links Links)
type TemplateFilterData ¶
type TemplateFilterData struct { Name string `json:"name"` // Filter templates by name using an exact match. Arch string `json:"arch"` // Filter templates by arch using an exact match. Version string `json:"version"` // Filter templates by version using an exact match. Search string `json:"search"` // Search string based query to optionally filter on RepositoryUUIDs []string `json:"repository_uuids"` // List templates that contain one or more of these Repositories SnapshotUUIDs []string `json:"snapshot_uuids"` // List templates that contain one or more of these Snapshots UseLatest bool `json:"use_latest"` // List templates that have use_latest set to true }
type TemplateRequest ¶
type TemplateRequest struct { UUID *string `json:"uuid" readonly:"true" swaggerignore:"true"` Name *string `json:"name" validate:"required"` // Name of the template Description *string `json:"description"` // Description of the template RepositoryUUIDS []string `json:"repository_uuids" validate:"required"` // Repositories to add to the template Arch *string `json:"arch" validate:"required"` // Architecture of the template Version *string `json:"version" validate:"required"` // Version of the template Date *EmptiableDate `json:"date"` // Latest date to include snapshots for OrgID *string `json:"org_id" readonly:"true" swaggerignore:"true"` // Organization ID of the owner User *string `json:"created_by" readonly:"true" swaggerignore:"true"` // User creating the template UseLatest *bool `json:"use_latest"` // Use latest snapshot for all repositories in the template }
type TemplateResponse ¶
type TemplateResponse struct { UUID string `json:"uuid" readonly:"true"` Name string `json:"name"` // Name of the template OrgID string `json:"org_id"` // Organization ID of the owner Description string `json:"description"` // Description of the template Arch string `json:"arch"` // Architecture of the template Version string `json:"version"` // Version of the template Date time.Time `json:"date"` // Latest date to include snapshots for RepositoryUUIDS []string `json:"repository_uuids"` // Repositories added to the template Snapshots []SnapshotResponse `json:"snapshots,omitempty" readonly:"true"` // The list of snapshots in use by the template ToBeDeletedSnapshots []SnapshotResponse `json:"to_be_deleted_snapshots,omitempty" readonly:"true"` // List of snapshots used by this template which are going to be deleted soon RHSMEnvironmentID string `json:"rhsm_environment_id"` // Environment ID used by subscription-manager and candlepin CreatedBy string `json:"created_by"` // User that created the template LastUpdatedBy string `json:"last_updated_by"` // User that most recently updated the template CreatedAt time.Time `json:"created_at"` // Datetime template was created UpdatedAt time.Time `json:"updated_at"` // Datetime template was last updated DeletedAt gorm.DeletedAt `json:"-" swaggerignore:"true"` // Datetime template was deleted UseLatest bool `json:"use_latest"` // Use latest snapshot for all repositories in the template LastUpdateSnapshotError string `json:"last_update_snapshot_error"` // Error of last update_latest_snapshot task that updated the template LastUpdateTaskUUID string `json:"last_update_task_uuid,omitempty"` // UUID of the last update_template_content task that updated the template LastUpdateTask *TaskInfoResponse `json:"last_update_task,omitempty"` // Response of last update_template_content task that updated the template RHSMEnvironmentCreated bool `json:"rhsm_environment_created" readonly:"true"` // Whether the candlepin environment is created and systems can be added }
type TemplateUpdateRequest ¶
type TemplateUpdateRequest struct { UUID *string `json:"uuid" readonly:"true" swaggerignore:"true"` Name *string `json:"name"` // Name of the template Description *string `json:"description"` // Description of the template RepositoryUUIDS []string `json:"repository_uuids"` // Repositories to add to the template Date *EmptiableDate `json:"date"` // Latest date to include snapshots for OrgID *string `json:"org_id" readonly:"true" swaggerignore:"true"` // Organization ID of the owner User *string `json:"last_updated_by" readonly:"true" swaggerignore:"true"` // User creating the template UseLatest *bool `json:"use_latest"` // Use latest snapshot for all repositories in the template }
We use a separate struct because version and arch cannot be updated
func (*TemplateUpdateRequest) FillDefaults ¶
func (r *TemplateUpdateRequest) FillDefaults()
Provides defaults if not provided during PUT request
func (*TemplateUpdateRequest) IsUsingLatest ¶
func (r *TemplateUpdateRequest) IsUsingLatest() bool
type UUIDListRequest ¶
type UUIDListRequest struct {
UUIDs []string `json:"uuids" validate:"required"`
}
type UploadChunkRequest ¶
type UploadResponse ¶
type UploadResponse struct { ArtifactHref *string `json:"artifact_href,omitempty"` // Artifact href if one exists (on create only) CompletedChecksums []string `json:"completed_checksums,omitempty"` // A list of already completed checksums UploadUuid *string `json:"upload_uuid"` // Upload UUID Created *time.Time `json:"created,omitempty"` // Timestamp of creation LastUpdated *time.Time `json:"last_updated,omitempty"` // Timestamp of last update Size int64 `json:"size"` // Size of the upload in bytes Completed *time.Time `json:"completed,omitempty"` // Timestamp when upload is committed }
type UrlValidationResponse ¶
type UrlValidationResponse struct { Skipped bool `json:"skipped"` // Skipped if the URL is not passed in for validation Valid bool `json:"valid"` // Valid if not skipped and the provided attribute is valid Error string `json:"error"` // Error message if the attribute is not valid HTTPCode int `json:"http_code"` // If the metadata cannot be fetched successfully, the http code that is returned if the http request was completed MetadataPresent bool `json:"metadata_present"` // True if the metadata can be fetched successfully MetadataSignaturePresent bool `json:"metadata_signature_present"` // True if a repomd.xml.sig file was found in the repository }