seed

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const SeedKey = ".hub.db.seed"

SeedKey identifies the setting containing the applied seed digest.

View Source
const UITargetOrder = "ui.target.order"

Variables

This section is empty.

Functions

func Seed

func Seed() (err error)

Seed applies DB seeds.

Types

type Hub

Hub is responsible for collecting and applying Hub seeds.

func (*Hub) Apply

func (r *Hub) Apply(db *gorm.DB) (err error)

Apply seeds the database with resources from the seed files.

func (*Hub) With

func (r *Hub) With(seed libseed.Seed) (err error)

With collects the resources to be seeded.

type JobFunction

type JobFunction struct {
	// contains filtered or unexported fields
}

JobFunction applies JobFunction seeds.

func (*JobFunction) Apply

func (r *JobFunction) Apply(db *gorm.DB) (err error)

Apply seeds the database with JobFunctions.

func (*JobFunction) With

func (r *JobFunction) With(seed libseed.Seed) (err error)

With collects all the JobFunction seeds.

type Questionnaire

type Questionnaire struct {
	// contains filtered or unexported fields
}

Questionnaire applies Questionnaire seeds.

func (*Questionnaire) Apply

func (r *Questionnaire) Apply(db *gorm.DB) (err error)

Apply seeds the database with Questionnaires.

func (*Questionnaire) With

func (r *Questionnaire) With(seed libseed.Seed) (err error)

With collects all the Questionnaire seeds.

type RuleSet

type RuleSet struct {
	// contains filtered or unexported fields
}

RuleSet applies RuleSet seeds.

func (*RuleSet) Apply

func (r *RuleSet) Apply(db *gorm.DB) (err error)

Apply seeds the database with RuleSets.

func (*RuleSet) With

func (r *RuleSet) With(seed libseed.Seed) (err error)

With collects all the RuleSet seeds.

type Seeder

type Seeder interface {
	With(libseed.Seed) error
	Apply(*gorm.DB) error
}

Seeder specifies an interface for seeding DB models.

type TagCategory

type TagCategory struct {
	// contains filtered or unexported fields
}

TagCategory applies TagCategory seeds.

func (*TagCategory) Apply

func (r *TagCategory) Apply(db *gorm.DB) (err error)

Apply seeds the database with TagCategories and Tags.

func (*TagCategory) With

func (r *TagCategory) With(seed libseed.Seed) (err error)

With collects all the TagCategory seeds.

type Target

type Target struct {
	// contains filtered or unexported fields
}

Target applies Target seeds.

func (*Target) Apply

func (r *Target) Apply(db *gorm.DB) (err error)

Apply seeds the database with JobFunctions.

func (*Target) With

func (r *Target) With(seed libseed.Seed) (err error)

With collects all the Target seeds.

Jump to

Keyboard shortcuts

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