forms

package
v0.0.0-...-ae17a43 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudSpecFields

type CloudSpecFields struct {
	ResourceTypes  []string
	NativeIDs      []string
	EnvironmentIDs []string
	Locations      []string
}

type CloudSpecForm

type CloudSpecForm struct {
	Project *project.Project
	Client  *cloudapi.Client
	OrgID   string
	RuleID  string
	Name    string
	Fields  CloudSpecFields
	Logger  *zerolog.Logger
}

func (*CloudSpecForm) Run

func (f *CloudSpecForm) Run() error

type Form

type Form interface {
	Run() error
}

type MultiResourceRuleFields

type MultiResourceRuleFields struct {
	PrimaryResourceType   string
	SecondaryResourceType string
	Relation              string
}

type MultiResourceRuleForm

type MultiResourceRuleForm struct {
	Project   *project.Project
	RuleID    string
	InputType string
	Metadata  *project.RuleMetadata
	Fields    MultiResourceRuleFields
	Logger    *zerolog.Logger
}

func (*MultiResourceRuleForm) Run

func (f *MultiResourceRuleForm) Run() error

type ProjectFields

type ProjectFields struct {
	Name string
}

type ProjectForm

type ProjectForm struct {
	Project     *project.Project
	DefaultName string
	Fields      ProjectFields
	Logger      *zerolog.Logger
}

func (*ProjectForm) Run

func (p *ProjectForm) Run() error

type Prompter

type Prompter[T any] interface {
	RunPrompt() (T, error)
}

type RelationFields

type RelationFields struct {
	Name                  string
	PrimaryResourceType   string
	PrimaryAttributes     []string
	SecondaryResourceType string
	SecondaryAttributes   []string
}

type RelationForm

type RelationForm struct {
	Project *project.Project
	Fields  RelationFields
	Logger  *zerolog.Logger
}

func (*RelationForm) Run

func (f *RelationForm) Run() error

type RuleFields

type RuleFields struct {
	RuleID      string
	Title       string
	Severity    string
	Description string
	Product     []string
	InputType   string
	SubForm     Form
}

type RuleForm

type RuleForm struct {
	Project *project.Project
	Fields  RuleFields
	Logger  *zerolog.Logger
}

func (*RuleForm) Run

func (f *RuleForm) Run() error

type SingleResourceRuleFields

type SingleResourceRuleFields struct {
	ResourceType string
}

type SingleResourceRuleForm

type SingleResourceRuleForm struct {
	Project   *project.Project
	RuleID    string
	InputType string
	Metadata  *project.RuleMetadata
	Fields    SingleResourceRuleFields
	Logger    *zerolog.Logger
}

func (*SingleResourceRuleForm) Run

func (f *SingleResourceRuleForm) Run() error

type SpecFields

type SpecFields struct {
	RuleID    string
	Name      string
	InputType string
}

type SpecForm

type SpecForm struct {
	Project *project.Project
	Client  *cloudapi.Client
	OrgID   string
	Fields  SpecFields
	Logger  *zerolog.Logger
}

func (*SpecForm) Run

func (f *SpecForm) Run() error

Jump to

Keyboard shortcuts

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