config

package
v0.0.0-...-f14cedc Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Config

func Config() *serviceConfig

Config 配置

func Init

func Init(args CmdArgs)

Init 初始化

Types

type CmdArgs

type CmdArgs struct {
	UseDefault bool
	ConfigFile string
}

CmdArgs 命令行参数

type FirewallConfig

type FirewallConfig struct {
	Name        string                      `mapstructure:"name"`         // 防火墙名称
	Brand       string                      `mapstructure:"brand"`        // 品牌 当前支持可选[h3c fortinet]
	Version     string                      `mapstructure:"version"`      // API版本 当前仅支持[v1]
	Address     string                      `mapstructure:"address"`      // 地址
	Protocol    string                      `mapstructure:"protocol"`     // 请求协议 根据防火墙开启服务配置[http https]
	Username    string                      `mapstructure:"username"`     // 登录用户
	Password    string                      `mapstructure:"password"`     // 登录密码
	Token       string                      `mapstructure:"token"`        // 认证token
	VirtualZone []firewallVirtualZoneConfig `mapstructure:"virtual_zone"` // 虚拟防火墙
}

Jump to

Keyboard shortcuts

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