setting

package
v0.0.0-...-dd46dfa Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 5

Documentation

Index

Constants

View Source
const (
	ConsoleURLSettingKey              = "console_url"
	InactiveNodesDeleteScanResultsKey = "inactive_delete_scan_results"
	ConsoleIDKey                      = "console_id"
	Port443                           = "443"
	Port80                            = "80"
)

Variables

This section is empty.

Functions

func GetManagementConsoleURL

func GetManagementConsoleURL(ctx context.Context, pgClient *postgresqlDb.Queries) (string, error)

func GetManagementConsoleURLandPort

func GetManagementConsoleURLandPort(ctx context.Context, pgClient *postgresqlDb.Queries) (string, string, error)

func InitializeAESSetting

func InitializeAESSetting(ctx context.Context, pgClient *postgresqlDb.Queries) error

func SetConsoleIDSetting

func SetConsoleIDSetting(ctx context.Context, pgClient *postgresqlDb.Queries) error

func SetScanResultsDeletionSetting

func SetScanResultsDeletionSetting(ctx context.Context, pgClient *postgresqlDb.Queries) error

Types

type Setting

type Setting struct {
	ID            int64         `json:"id"`
	Key           string        `json:"key"`
	Value         *SettingValue `json:"value"`
	IsVisibleOnUI bool          `json:"is_visible_on_ui"`
}

func GetSettingByKey

func GetSettingByKey(ctx context.Context, pgClient *postgresqlDb.Queries, key string) (*Setting, error)

func (*Setting) Create

func (s *Setting) Create(ctx context.Context, pgClient *postgresqlDb.Queries) (*postgresqlDb.Setting, error)

func (*Setting) Delete

func (s *Setting) Delete(ctx context.Context, pgClient *postgresqlDb.Queries) error

func (*Setting) Update

func (s *Setting) Update(ctx context.Context, pgClient *postgresqlDb.Queries) error

type SettingUpdateRequest

type SettingUpdateRequest struct {
	ID    int64  `path:"id" validate:"required" required:"true"`
	Key   string `` /* 173-byte string literal not displayed */
	Value string `json:"value" validate:"required" required:"true"`
}

type SettingValue

type SettingValue struct {
	Label       string      `json:"label"`
	Value       interface{} `json:"value"`
	Description string      `json:"description"`
}

type SettingsResponse

type SettingsResponse struct {
	ID          int64       `json:"id" required:"true"`
	Key         string      `json:"key" required:"true"`
	Label       string      `json:"label" required:"true"`
	Value       interface{} `json:"value" required:"true"`
	Description string      `json:"description" required:"true"`
}

func GetVisibleSettings

func GetVisibleSettings(ctx context.Context, pgClient *postgresqlDb.Queries) ([]SettingsResponse, error)

Jump to

Keyboard shortcuts

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