seeds

package
v0.0.0-...-1d32ba8 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandStringBytes

func RandStringBytes(n int) string

func RandStringWithChars

func RandStringWithChars(n int, lookup string) string

RandStringWithChars Return a random string of size n using the lookup table. n size of the string to be returned lookup A string representing the lookup table. Return the random string.

func RandomAccountId

func RandomAccountId() string

func RandomOrgId

func RandomOrgId() string

func SeedRepository

func SeedRepository(db *gorm.DB, size int, options SeedOptions) error

func SeedRepositoryConfigurations

func SeedRepositoryConfigurations(db *gorm.DB, size int, options SeedOptions) error

func SeedRpms

func SeedRpms(db *gorm.DB, repo *models.Repository, size int) error

SeedRpms Populate database with random package information db The database descriptor. size The number of rpm packages per repository to be generated.

func SeedSnapshots

func SeedSnapshots(db *gorm.DB, repoConfigUuid string, size int) ([]models.Snapshot, error)

func SeedTasks

func SeedTasks(db *gorm.DB, size int, options TaskSeedOptions) ([]models.TaskInfo, error)

func SeedTemplates

func SeedTemplates(db *gorm.DB, size int, options TemplateSeedOptions) error

Types

type IntrospectionStatusMetadata

type IntrospectionStatusMetadata struct {
	LastIntrospectionStatus *string
	// contains filtered or unexported fields
}

type SeedOptions

type SeedOptions struct {
	OrgID       string
	BatchSize   int
	Arch        *string
	Versions    *[]string
	Status      *string
	ContentType *string
	Origin      *string
	Version     *string
	TaskID      string
}

type TaskSeedOptions

type TaskSeedOptions struct {
	AccountID      string
	OrgID          string
	BatchSize      int
	Status         string
	Error          *string
	Typename       string
	RepoConfigUUID string
	RepoUUID       string
	QueuedAt       *time.Time
}

type TemplateSeedOptions

type TemplateSeedOptions struct {
	OrgID                 string
	BatchSize             int
	Arch                  *string
	Version               *string
	RepositoryConfigUUIDs []string
}

Jump to

Keyboard shortcuts

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