payloads

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Payloads = make(map[string]Payload)

Functions

func NewResultError added in v0.3.0

func NewResultError(payload any, exitCode int, err error) error

Types

type BucketCheck added in v0.2.3

type BucketCheck struct{}

func (BucketCheck) Desc added in v0.2.3

func (p BucketCheck) Desc() string

func (BucketCheck) Result added in v0.3.0

func (p BucketCheck) Result(ctx context.Context, config map[string]string) (any, error)

func (BucketCheck) Run added in v0.2.3

func (p BucketCheck) Run(ctx context.Context, config map[string]string)

type BucketCheckResult added in v0.3.0

type BucketCheckResult struct {
	Provider    string                `json:"provider"`
	Action      string                `json:"action"`
	BucketName  string                `json:"bucket_name,omitempty"`
	ObjectCount int64                 `json:"object_count,omitempty"`
	Objects     []schema.BucketObject `json:"objects,omitempty"`
	Message     string                `json:"message,omitempty"`
	Status      string                `json:"status"`
	Error       string                `json:"error,omitempty"`
}

type CloudList

type CloudList struct{}

func (CloudList) Desc

func (p CloudList) Desc() string

func (CloudList) Result added in v0.3.0

func (p CloudList) Result(ctx context.Context, config map[string]string) (any, error)

func (CloudList) Run

func (p CloudList) Run(ctx context.Context, config map[string]string)

type CloudListResult added in v0.3.0

type CloudListResult struct {
	Provider    string                 `json:"provider"`
	Hosts       []schema.Host          `json:"hosts,omitempty"`
	Storages    []schema.Storage       `json:"storages,omitempty"`
	Users       []schema.User          `json:"users,omitempty"`
	Databases   []schema.Database      `json:"databases,omitempty"`
	Domains     []schema.Domain        `json:"domains,omitempty"`
	Logs        []schema.Log           `json:"logs,omitempty"`
	SMS         schema.Sms             `json:"sms,omitempty"`
	Errors      []schema.ResourceError `json:"errors,omitempty"`
	OutputFiles []string               `json:"output_files,omitempty"`
}

type Entry added in v0.2.3

type Entry struct {
	Name    string
	Payload Payload
}

func Visible added in v0.2.3

func Visible() []Entry

type EventCheck added in v0.2.3

type EventCheck struct{}

func (EventCheck) Desc added in v0.2.3

func (p EventCheck) Desc() string

func (EventCheck) Run added in v0.2.3

func (p EventCheck) Run(ctx context.Context, config map[string]string)

func (EventCheck) Sensitivity added in v0.3.0

func (p EventCheck) Sensitivity(metadata string) Sensitivity

type IAMUserCheck added in v0.2.3

type IAMUserCheck struct{}

func (IAMUserCheck) Desc added in v0.2.3

func (p IAMUserCheck) Desc() string

func (IAMUserCheck) Result added in v0.3.0

func (p IAMUserCheck) Result(ctx context.Context, config map[string]string) (any, error)

func (IAMUserCheck) Run added in v0.2.3

func (p IAMUserCheck) Run(ctx context.Context, config map[string]string)

func (IAMUserCheck) Sensitivity added in v0.3.0

func (p IAMUserCheck) Sensitivity(metadata string) Sensitivity

type IAMUserCheckResult added in v0.3.0

type IAMUserCheckResult struct {
	Provider  string `json:"provider"`
	Action    string `json:"action"`
	Username  string `json:"username"`
	Password  string `json:"password,omitempty"`
	Status    string `json:"status"`
	LoginURL  string `json:"login_url,omitempty"`
	AccountID string `json:"account_id,omitempty"`
	Message   string `json:"message,omitempty"`
	Error     string `json:"error,omitempty"`
}

type InstanceCmdCheck added in v0.2.3

type InstanceCmdCheck struct{}

func (InstanceCmdCheck) Desc added in v0.2.3

func (p InstanceCmdCheck) Desc() string

func (InstanceCmdCheck) Run added in v0.2.3

func (p InstanceCmdCheck) Run(ctx context.Context, config map[string]string)

func (InstanceCmdCheck) Sensitivity added in v0.3.0

func (p InstanceCmdCheck) Sensitivity(metadata string) Sensitivity

type Payload

type Payload interface {
	Run(context.Context, map[string]string)
	Desc() string
}

func Lookup added in v0.2.3

func Lookup(name string) (Payload, string, bool)

type RDSAccountCheck added in v0.2.3

type RDSAccountCheck struct{}

func (RDSAccountCheck) Desc added in v0.2.3

func (p RDSAccountCheck) Desc() string

func (RDSAccountCheck) Run added in v0.2.3

func (p RDSAccountCheck) Run(ctx context.Context, config map[string]string)

func (RDSAccountCheck) Sensitivity added in v0.3.0

func (p RDSAccountCheck) Sensitivity(metadata string) Sensitivity

type ResultError added in v0.3.0

type ResultError interface {
	error
	ResultPayload() any
	ExitCode() int
}

type ResultProducer added in v0.3.0

type ResultProducer interface {
	Result(context.Context, map[string]string) (any, error)
}

type SensitivePayload added in v0.3.0

type SensitivePayload interface {
	Sensitivity(metadata string) Sensitivity
}

type Sensitivity added in v0.3.0

type Sensitivity struct {
	Level      string
	ConfirmKey string
	Resource   string
}

func DescribeSensitivity added in v0.3.0

func DescribeSensitivity(name, metadata string) Sensitivity

func (Sensitivity) RequiresConfirmation added in v0.3.0

func (s Sensitivity) RequiresConfirmation() bool

Jump to

Keyboard shortcuts

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