api

package
v0.0.0-...-f6d42a1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ApiVersion = "1.0"
View Source
const ApiVersionMajor = "1"
View Source
const ContentUnitSearchRequestLimitDefault int = 100
View Source
const ContentUnitSearchRequestLimitMaximum int = 500
View Source
const IdentityHeader = "x-rh-identity"
View Source
const SearchRpmRequestLimitDefault int = 100
View Source
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 AdminTaskFilterData

type AdminTaskFilterData struct {
	Status    string `json:"status"` // Comma separated list of statuses to optionally filter on.
	OrgId     string `json:"org_id"`
	AccountId string `json:"account_id"`
}

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 ContentUnitListRequest struct {
	UUID   string `param:"uuid"`    // Identifier of the repository
	Search string `query:"search"`  // Search string based query to optionally filter-on
	SortBy string `query:"sort_by"` // SortBy sets the sort order of the result
}

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
	Limit  *int     `json:"limit,omitempty"` // Maximum number of records to return for the search
}

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 DetectRpmsResponse struct {
	Found   []string `json:"found"`   // List of rpm names found in given repositories
	Missing []string `json:"missing"` // List of rpm names not found in given repositories
}

type Feature

type Feature struct {
	Enabled    bool `json:"enabled"`    // Whether the feature is enabled on the running server
	Accessible bool `json:"accessible"` // Whether the current user can access the feature
}

type FeatureSet

type FeatureSet map[string]Feature

type FetchGPGKeyRequest

type FetchGPGKeyRequest struct {
	URL string `json:"url"` // 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 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 Links struct {
	First string `json:"first"`          // Path to first page of results
	Next  string `json:"next,omitempty"` // Path to next page of results
	Prev  string `json:"prev,omitempty"` // Path to previous page of results
	Last  string `json:"last"`           // Path to last page of results
}

type ListSnapshotByDateRequest

type ListSnapshotByDateRequest struct {
	RepositoryUUIDS []string `json:"repository_uuids"` // Repository UUIDs to find snapshots for
	Date            string   `json:"date"`             // Exact date to search by.
}

type ListSnapshotByDateResponse

type ListSnapshotByDateResponse struct {
	Data []SnapshotForDate `json:"data"` // Requested Data
}

type PaginationData

type PaginationData struct {
	Limit  int    `query:"limit" json:"limit" `    // Number of results to return
	Offset int    `query:"offset" json:"offset"`   // Offset into the total results
	SortBy string `query:"sort_by" json:"sort_by"` // SortBy sets the sort order of the results
}

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 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 RepositoryEnvironment struct {
	UUID        string `json:"uuid"`        // Identifier of the environment
	ID          string `json:"id"`          // The environment ID
	Name        string `json:"name"`        // The environment name
	Description string `json:"description"` // The environment description
}

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

SetMetadata Map metadata to the collection. meta Metadata about the request. links Links to other pages of results.

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

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"`
	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
	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" swaggerignore:"true"`       // Origin of the repository
	ContentType          *string   `json:"content_type" readonly:"true" swaggerignore:"true"` // Content Type (rpm) of the repository
}

RepositoryRequest holds data received from request to create/update repository

func (*RepositoryRequest) FillDefaults

func (r *RepositoryRequest) FillDefaults()

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
	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)
}

RepositoryResponse holds data returned by a repositories API response

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 RepositoryRpmRequest struct {
	UUID   string `param:"uuid"`    // Identifier of the repository
	Search string `query:"search"`  // Search string based query to optionally filter-on
	SortBy string `query:"sort_by"` // SortBy sets the sort order of the result
}

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 ResponseMetadata struct {
	Limit  int   `query:"limit" json:"limit"`   // Limit of results used for the request
	Offset int   `query:"offset" json:"offset"` // Offset into results used for the request
	Count  int64 `json:"count"`                 // Total count of results
}

type SearchEnvironmentResponse

type SearchEnvironmentResponse struct {
	EnvironmentName string `json:"environment_name"` // Environment found
	Description     string `json:"description"`      // Description of the environment found
	ID              string `json:"id"`               // ID of the environment found
}

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 SearchRpmResponse struct {
	PackageName string `json:"package_name"` // Package name found
	Summary     string `json:"summary"`      // Summary of the package found
}

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
}

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"`     // 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
}

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 SnapshotSearchRpmRequest

type SnapshotSearchRpmRequest struct {
	UUIDs  []string `json:"uuids,omitempty"` // List of Snapshot 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 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"`
}

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
	RepoConfigName string `json:"repository_name"` // Name of the associated repository
	RepoConfigUUID string `json:"repository_uuid"` // UUID of the associated repository
}

TaskInfoResponse holds data returned by a tasks API response

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
}

type TemplateRequest

type TemplateRequest 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
	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
	OrgID           *string    `json:"org_id" readonly:"true" swaggerignore:"true"` // Organization ID of the owner
}

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

}

type TemplateUpdateRequest

type TemplateUpdateRequest struct {
	UUID            *string    `json:"uuid" readonly:"true" swaggerignore:"true"`
	Description     *string    `json:"description"`                                 // Description of the template
	RepositoryUUIDS []string   `json:"repository_uuids"`                            // Repositories to add to the template
	Date            *time.Time `json:"date"`                                        // Latest date to include snapshots for
	OrgID           *string    `json:"org_id" readonly:"true" swaggerignore:"true"` // Organization ID of the owner
}

We use a separate struct because name, version, arch cannot be updated

func (*TemplateUpdateRequest) FillDefaults

func (r *TemplateUpdateRequest) FillDefaults()

Provides defaults if not provided during PUT request

type UUIDListRequest

type UUIDListRequest struct {
	UUIDs []string `json:"uuids"`
}

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
}

Jump to

Keyboard shortcuts

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