global

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (

	// 版本信息
	Team       = "WgpSec"
	Name       = "CloudSword"
	Version    = "0.0.1"
	UpdateDate = "2024.12.21"

	Aliyun       = "aliyun"
	TencentCloud = "tencent_cloud"
	HuaweiCloud  = "huawei_cloud"
	BaiduCloud   = "baidu_cloud"

	AKId     = "ak_id"
	AKSecret = "ak_secret"
	AKToken  = "ak_token"
	//UserAgent = "user_agent"
	//Proxy     = "Proxy"
	Detail         = "detail"
	Region         = "region"
	ResultFilePath = "result_file_path"
	MaxResults     = "max_results"
	QueryValue     = "query_value"
	BucketName     = "bucket_name"
	UserName       = "user_name"
	Description    = "description"
	PolicyName     = "policy_name"
	Webhook        = "webhook"

	CloudSwordAccessKeyID     = "CLOUD_SWORD_ACCESS_KEY_ID"
	CloudSwordAccessKeySecret = "CLOUD_SWORD_ACCESS_KEY_SECRET"
	CloudSwordSecurityToken   = "CLOUD_SWORD_SECURITY_TOKEN"
	//CloudSwordUserAgent       = "CLOUD_SWORD_USER_AGENT"
	//CloudSwordProxy           = "CLOUD_SWORD_PROXY"
	CloudSwordDetail = "CLOUD_SWORD_DETAIL"

	True  = "true"
	False = "false"

	AliyunDefaultRegion       = "cn-hangzhou"
	TencentCloudDefaultRegion = "ap-guangzhou"
	HuaweiCloudDefaultRegion  = "cn-north-4"

	DefaultPrefix = Name + " > "
	TeamsSix      = "TeamsSix"
	Tab           = "\t"
	NULL          = ""
	All           = "all"
)

Variables

View Source
var BasicOptionBucketName = BasicOptions{
	Key:       BucketName,
	Value:     NULL,
	Required:  true,
	Introduce: "设置 Bucket 名称",
}
View Source
var BasicOptionDescription = BasicOptions{
	Key:       Description,
	Value:     fmt.Sprintf("此资源由%v创建", Name),
	Required:  false,
	Introduce: "设置资源描述",
}
View Source
var BasicOptionDetail = BasicOptions{
	Key:       Detail,
	Value:     False,
	Required:  true,
	Introduce: "设置详细输出模式(true 或 false)",
}
View Source
var BasicOptionMaxResults = BasicOptions{
	Key:       MaxResults,
	Value:     strconv.Itoa(50),
	Required:  true,
	Introduce: "设置最大结果数量输出限制,-1 代表不限制",
}
View Source
var BasicOptionPolicyName = BasicOptions{
	Key:       PolicyName,
	Value:     NULL,
	Required:  true,
	Introduce: "设置策略名称",
}
View Source
var BasicOptionQueryValue = BasicOptions{
	Key:       QueryValue,
	Value:     NULL,
	Required:  true,
	Introduce: "设置要查询的内容",
}
View Source
var BasicOptionRegion = BasicOptions{
	Key:       Region,
	Value:     All,
	Required:  true,
	Introduce: "设置要列出的区域",
}
View Source
var BasicOptionResultFilePath = BasicOptions{
	Key:       ResultFilePath,
	Value:     NULL,
	Required:  false,
	Introduce: "设置结果导出路径,默认导出格式为 xlsx 格式",
}
View Source
var BasicOptionUserName = BasicOptions{
	Key:       UserName,
	Value:     NULL,
	Required:  true,
	Introduce: "设置用户名称",
}
View Source
var BasicOptionWebhook = BasicOptions{
	Key:       Webhook,
	Value:     NULL,
	Required:  true,
	Introduce: "设置通知 Webhook 地址。",
}
View Source
var BasicOptionsDefault = []BasicOptions{
	{
		Key:       AKId,
		Value:     "",
		Required:  true,
		Introduce: "访问凭证 ID",
	},
	{
		Key:       AKSecret,
		Value:     "",
		Required:  true,
		Introduce: "访问凭证 Secret",
	},
	{
		Key:       AKToken,
		Value:     "",
		Required:  false,
		Introduce: "可选,访问凭证的临时令牌部分",
	},
}
View Source
var BasicOptionsFull []BasicOptions
View Source
var BasicOptionsWithIds []BasicOptionsWithId

Functions

func GetBasicOptionValue

func GetBasicOptionValue(key string) string

func UpdateBasicOptionValue

func UpdateBasicOptionValue(key string, value string)

Types

type BasicOptions

type BasicOptions struct {
	Key       string
	Value     string
	Required  bool
	Introduce string
}

func GetBasicOptionsWithId

func GetBasicOptionsWithId(id int) []BasicOptions

type BasicOptionsWithId

type BasicOptionsWithId struct {
	Id           int
	BasicOptions []BasicOptions
}

type Module

type Module struct {
	ID             int
	Provider       Provider
	Name           string
	ModuleProvider string
	Introduce      string
	Level          int
	Info           string
	BasicOptions   []BasicOptions
}

type Provider

type Provider struct {
	Name   string
	EnName string
}

Jump to

Keyboard shortcuts

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