cmd

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package cmd handles the command-line interface and operations for the application.

This file contains the command for seeding the database with initial data for development or testing purposes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RootProcess

type RootProcess struct {
	Config   config.Config
	Logger   logger.ILogger
	Settings config.Settings

	Router   *mux.Router
	Modules  map[string]modules.IBaseModule
	Prompter userio.Prompter
	// contains filtered or unexported fields
}

RootProcess holds the root process configuration.

func (*RootProcess) Execute

func (root *RootProcess) Execute() error

Execute starts the root process.

type SeedProcess

type SeedProcess struct {
	Config    config.Config
	Logger    logger.ILogger
	Settings  config.Settings
	Router    *mux.Router
	Modules   map[string]modules.IBaseModule
	IsNewOnly bool
}

SeedProcess represents the process of seeding the db with initial data.

func (*SeedProcess) GetCmd

func (sp *SeedProcess) GetCmd(prompter userio.Prompter) (*cobra.Command, error)

GetCmd returns the cobra command for seeding the db.

func (*SeedProcess) Seed

func (sp *SeedProcess) Seed(mods map[string]modules.IBaseModule, prompter userio.Prompter) error

Seed seeds the database with the given modules.

Jump to

Keyboard shortcuts

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