Skip to content

Base / Common class properties/types #255

Description

@glisignoli

Class types are created individually, even though they share a lot of common properties.

Eg:

export class RPMRepositoryType {
  autopublish?: boolean;
  checksum_type?: 'sha1' | 'sha256' | 'sha512';
  description: string | null;
  gpgcheck?: 0 | 1 | 2;
  latest_version_href?: string;
  metadata_signing_service?: string;
  name: string;
  pulp_created?: string;
  pulp_href?: string;
  pulp_labels: Record<string, string>;
  pulp_last_updated?: string;
  remote: string | null;
  repoclosure_verification?: boolean;
  repo_gpgcheck?: 0 | 1;
  retain_package_versions?: number;
  retain_repo_versions: number | null;
  versions_href?: string;
}

export class FileRepositoryType {
  autopublish?: boolean;
  description: string | null;
  latest_version_href?: string;
  manifest?: string;
  name: string;
  prn?: string;
  pulp_created?: string;
  pulp_href?: string;
  pulp_labels: Record<string, string>;
  pulp_last_updated?: string;
  remote: string | null;
  retain_repo_versions: number;
  versions_href?: string;
}

A parent class type for each pulp base type (remote, content, repository, distribution, publication), could be created to remove the duplication between these classes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleWill be closed within 32 days.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions