Documentation
¶
Index ¶
- type FirewallSecurityPolicyInput
- type FmgSDKClient
- func (c *FmgSDKClient) AddSystemLicenseFortiCare(params *SystemLicenseFortiCare) (err error)
- func (c *FmgSDKClient) AddSystemLicenseVM(params *JSONSystemLicenseVM) (err error)
- func (c *FmgSDKClient) CreateDVMDevice(adom string, params *JSONDVMDeviceCreate) (err error)
- func (c *FmgSDKClient) CreateDVMInstallDev(adom string, params *JSONDVMInstallDev) (err error)
- func (c *FmgSDKClient) CreateDVMInstallPolicyPackage(params *JSONDVMInstallPolicyPackage) (err error)
- func (c *FmgSDKClient) CreateUpdateDVMScript(params *JSONDVMScript, method, adom string) (err error)
- func (c *FmgSDKClient) CreateUpdateFirewallObjectAddress(params *JSONFirewallObjectAddress, method, adom string) (err error)
- func (c *FmgSDKClient) CreateUpdateFirewallObjectIppool(params *JSONFirewallObjectIppool, method, adom string) (err error)
- func (c *FmgSDKClient) CreateUpdateFirewallObjectService(params *JSONFirewallObjectService, method, adom string) (err error)
- func (c *FmgSDKClient) CreateUpdateFirewallObjectVip(params *JSONFirewallObjectVip, method, adom string) (err error)
- func (c *FmgSDKClient) CreateUpdateFirewallSecurityPolicy(params *FirewallSecurityPolicyInput, method, adom string) (id string, err error)
- func (c *FmgSDKClient) CreateUpdateFirewallSecurityPolicyPackage(params *JSONFirewallSecurityPolicyPackage, method, adom string) (err error)
- func (c *FmgSDKClient) CreateUpdateObjectAdomRevision(params *JSONObjectAdomRevision, method, adom string) (version string, err error)
- func (c *FmgSDKClient) CreateUpdateSystemAdminProfiles(params *JSONSysAdminProfiles, method string) (err error)
- func (c *FmgSDKClient) CreateUpdateSystemAdminUser(params *JSONSysAdminUser, method string) (err error)
- func (c *FmgSDKClient) CreateUpdateSystemAdom(params *JSONSystemAdom, method string) (err error)
- func (c *FmgSDKClient) CreateUpdateSystemNetworkRoute(params *JSONSysNetworkRoute, method string) (err error)
- func (c *FmgSDKClient) CreateUpdateSystemSyslogServer(params *JSONSystemSyslogServer, method string) (err error)
- func (c *FmgSDKClient) DeleteDVMDevice(params *JSONDVMDeviceDel) (err error)
- func (c *FmgSDKClient) DeleteDVMScript(adom, id string) (err error)
- func (c *FmgSDKClient) DeleteFirewallObjectAddress(adom, name string) (err error)
- func (c *FmgSDKClient) DeleteFirewallObjectIppool(adom, name string) (err error)
- func (c *FmgSDKClient) DeleteFirewallObjectService(adom, name string) (err error)
- func (c *FmgSDKClient) DeleteFirewallObjectVip(adom, name string) (err error)
- func (c *FmgSDKClient) DeleteFirewallSecurityPolicy(adom, id, pkg_name string) (err error)
- func (c *FmgSDKClient) DeleteFirewallSecurityPolicyPackage(adom, name string) (err error)
- func (c *FmgSDKClient) DeleteObjectAdomRevision(adom, version string) (err error)
- func (c *FmgSDKClient) DeleteSystemAdminProfiles(id string) (err error)
- func (c *FmgSDKClient) DeleteSystemAdminUser(id string) (err error)
- func (c *FmgSDKClient) DeleteSystemAdom(name string) (err error)
- func (c *FmgSDKClient) DeleteSystemNetworkRoute(id string) (err error)
- func (c *FmgSDKClient) DeleteSystemSyslogServer(name string) (err error)
- func (c *FmgSDKClient) Do(method string, params map[string]interface{}) (output map[string]interface{}, err error)
- func (c *FmgSDKClient) Execute(req *Request) (result map[string]interface{}, err error)
- func (c *FmgSDKClient) ExecuteDVMScript(adom string, params *JSONDVMScriptExecute) (err error)
- func (c *FmgSDKClient) HandleJSONRPCRequest(p map[string]interface{}) ([]byte, error)
- func (c *FmgSDKClient) Login() (session string, err error)
- func (c *FmgSDKClient) Logout(s string) (err error)
- func (c *FmgSDKClient) QueryTask(task, timeout int) (err error)
- func (c *FmgSDKClient) ReadDVMScript(adom, id string) (out *JSONDVMScript, err error)
- func (c *FmgSDKClient) ReadFirewallObjectAddress(adom, name string) (out *JSONFirewallObjectAddress, err error)
- func (c *FmgSDKClient) ReadFirewallObjectIppool(adom, name string) (out *JSONFirewallObjectIppool, err error)
- func (c *FmgSDKClient) ReadFirewallObjectService(adom, name string) (out *JSONFirewallObjectService, err error)
- func (c *FmgSDKClient) ReadFirewallObjectVip(adom, name string) (out *JSONFirewallObjectVip, err error)
- func (c *FmgSDKClient) ReadFirewallSecurityPolicy(adom, id, pkg_name string) (out *JSONFirewallSecurityPolicy, err error)
- func (c *FmgSDKClient) ReadFirewallSecurityPolicyPackage(adom, name string) (out *JSONFirewallSecurityPolicyPackage, err error)
- func (c *FmgSDKClient) ReadObjectAdomRevision(adom, version string) (out *JSONObjectAdomRevision, err error)
- func (c *FmgSDKClient) ReadSystemAdmin() (out *JSONSystemAdmin, err error)
- func (c *FmgSDKClient) ReadSystemAdminProfiles(id string) (out *JSONSysAdminProfiles, err error)
- func (c *FmgSDKClient) ReadSystemAdminUser(id string) (out *JSONSysAdminUser, err error)
- func (c *FmgSDKClient) ReadSystemAdom(name string) (out *JSONSystemAdom, err error)
- func (c *FmgSDKClient) ReadSystemDNS() (out *JSONSystemDNS, err error)
- func (c *FmgSDKClient) ReadSystemGlobal() (out *JSONSystemGlobal, err error)
- func (c *FmgSDKClient) ReadSystemNTP() (out *JSONSystemNTP, err error)
- func (c *FmgSDKClient) ReadSystemNetworkInterface(name string) (out *JSONSystemNetworkInterface, err error)
- func (c *FmgSDKClient) ReadSystemNetworkRoute(id string) (out *JSONSysNetworkRoute, err error)
- func (c *FmgSDKClient) ReadSystemSyslogServer(name string) (out *JSONSystemSyslogServer, err error)
- func (c *FmgSDKClient) SetSystemAdmin(params *JSONSystemAdmin) (err error)
- func (c *FmgSDKClient) SetSystemDNS(params *JSONSystemDNS) (err error)
- func (c *FmgSDKClient) SetSystemGlobal(params *JSONSystemGlobal) (err error)
- func (c *FmgSDKClient) SetSystemNTP(params *JSONSystemNTP) (err error)
- func (f *FmgSDKClient) Trace(s string) func()
- func (c *FmgSDKClient) UpdateSystemNetworkInterface(params *JSONSystemNetworkInterface) (err error)
- type JSONDVMDeviceCreate
- type JSONDVMDeviceDel
- type JSONDVMInstallDev
- type JSONDVMInstallPolicyPackage
- type JSONDVMScript
- type JSONDVMScriptExecute
- type JSONFirewallObjectAddress
- type JSONFirewallObjectIppool
- type JSONFirewallObjectService
- type JSONFirewallObjectVip
- type JSONFirewallSecurityPolicy
- type JSONFirewallSecurityPolicyPackage
- type JSONObjectAdomRevision
- type JSONSysAdminProfileDeviceManager
- type JSONSysAdminProfileFortiGuard
- type JSONSysAdminProfileGenernal
- type JSONSysAdminProfilePolicyObject
- type JSONSysAdminProfiles
- type JSONSysAdminUser
- type JSONSysNetworkRoute
- type JSONSystemAdmin
- type JSONSystemAdom
- type JSONSystemDNS
- type JSONSystemGlobal
- type JSONSystemLicenseVM
- type JSONSystemNTP
- type JSONSystemNetworkInterface
- type JSONSystemSyslogServer
- type QueryResult
- type Request
- type SystemLicenseFortiCare
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FirewallSecurityPolicyInput ¶
type FirewallSecurityPolicyInput struct { Policy *JSONFirewallSecurityPolicy PackageName string }
FirewallSecurityPolicyInput contains the policy and the related package info
type FmgSDKClient ¶
type FmgSDKClient struct { Ipaddr string User string Passwd string Debug string Client *http.Client SessionString string DebugNum int Init bool }
FmgSDKClient is for communicating with FortiManager
func NewClient ¶
func NewClient(ip, user, passwd string, client *http.Client) *FmgSDKClient
NewClient is for creating new client Input:
@ip: ipaddress of fortimanager @user: username of fortimanager @passwd: passwd of fortimanager @client: http client used
Output:
@FmgSDKClient: fmg client
func NewEmptyClient ¶
func NewEmptyClient() *FmgSDKClient
NewEmptyClient initializes a new global empty plugin FmgSDKClient It returns the created client object
func (*FmgSDKClient) AddSystemLicenseFortiCare ¶
func (c *FmgSDKClient) AddSystemLicenseFortiCare(params *SystemLicenseFortiCare) (err error)
AddSystemLicenseFortiCare is for uploading forticare license Input:
@params: infor needed
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) AddSystemLicenseVM ¶
func (c *FmgSDKClient) AddSystemLicenseVM(params *JSONSystemLicenseVM) (err error)
AddSystemLicenseVM is for uploading vm license Input:
@params: infor needed
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) CreateDVMDevice ¶
func (c *FmgSDKClient) CreateDVMDevice(adom string, params *JSONDVMDeviceCreate) (err error)
CreateDVMDevice add device to devicemanager Input:
@params: infor needed to add the device
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) CreateDVMInstallDev ¶
func (c *FmgSDKClient) CreateDVMInstallDev(adom string, params *JSONDVMInstallDev) (err error)
CreateDVMInstallDev is for installing scripts to the related device Input:
@params: infor needed
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) CreateDVMInstallPolicyPackage ¶
func (c *FmgSDKClient) CreateDVMInstallPolicyPackage(params *JSONDVMInstallPolicyPackage) (err error)
CreateDVMInstallPolicyPackage is for installing policy package to the related device Input:
@params: infor needed
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) CreateUpdateDVMScript ¶
func (c *FmgSDKClient) CreateUpdateDVMScript(params *JSONDVMScript, method, adom string) (err error)
CreateUpdateDVMScript is for creating/updating the script Input:
@params: infor needed @method: operation method, "add" or "update" @adom: adom
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) CreateUpdateFirewallObjectAddress ¶
func (c *FmgSDKClient) CreateUpdateFirewallObjectAddress(params *JSONFirewallObjectAddress, method, adom string) (err error)
CreateUpdateFirewallObjectAddress is for creating/updating the firewall object address Input:
@params: infor needed @method: operation method, "add" or "update" @adom: adom
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) CreateUpdateFirewallObjectIppool ¶
func (c *FmgSDKClient) CreateUpdateFirewallObjectIppool(params *JSONFirewallObjectIppool, method, adom string) (err error)
CreateUpdateFirewallObjectIppool is for creating/updating the firewall object ippool Input:
@params: infor needed @method: operation method, "add" or "update" @adom: adom
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) CreateUpdateFirewallObjectService ¶
func (c *FmgSDKClient) CreateUpdateFirewallObjectService(params *JSONFirewallObjectService, method, adom string) (err error)
CreateUpdateFirewallObjectService is for creating/updating the firewall object service Input:
@params: infor needed @method: operation method, "add" or "update" @adom: adom
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) CreateUpdateFirewallObjectVip ¶
func (c *FmgSDKClient) CreateUpdateFirewallObjectVip(params *JSONFirewallObjectVip, method, adom string) (err error)
CreateUpdateFirewallObjectVip is for creating/updating the firewall object virtual ip Input:
@params: infor needed @method: operation method, "add" or "update" @adom: adom
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) CreateUpdateFirewallSecurityPolicy ¶
func (c *FmgSDKClient) CreateUpdateFirewallSecurityPolicy(params *FirewallSecurityPolicyInput, method, adom string) (id string, err error)
CreateUpdateFirewallSecurityPolicy is for creating/updating the firewall security policy Input:
@params: infor needed @method: operation method, "add" or "update" @adom: adom
Output:
@id: policy id @err: error details if failure, and nil if success
func (*FmgSDKClient) CreateUpdateFirewallSecurityPolicyPackage ¶
func (c *FmgSDKClient) CreateUpdateFirewallSecurityPolicyPackage(params *JSONFirewallSecurityPolicyPackage, method, adom string) (err error)
CreateUpdateFirewallSecurityPolicyPackage is for creating/updating the firewall security policy package Input:
@params: infor needed @adom: adom @method: operation method, "add" or "update"
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) CreateUpdateObjectAdomRevision ¶
func (c *FmgSDKClient) CreateUpdateObjectAdomRevision(params *JSONObjectAdomRevision, method, adom string) (version string, err error)
CreateUpdateObjectAdomRevision is for creating/updating the obj adom revision Input:
@params: infor needed @method: operation method, "add" or "update" @adom: adom
Output:
@version: adom revision version @err: error details if failure, and nil if success
func (*FmgSDKClient) CreateUpdateSystemAdminProfiles ¶
func (c *FmgSDKClient) CreateUpdateSystemAdminProfiles(params *JSONSysAdminProfiles, method string) (err error)
CreateUpdateSystemAdminProfiles is for creating or updating the system admin profiles Input:
@params: infor needed @method: operation method, "add" or "update"
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) CreateUpdateSystemAdminUser ¶
func (c *FmgSDKClient) CreateUpdateSystemAdminUser(params *JSONSysAdminUser, method string) (err error)
CreateUpdateSystemAdminUser is for creating or updating the system admin user Input:
@params: infor needed @method: operation method, "add" or "update"
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) CreateUpdateSystemAdom ¶
func (c *FmgSDKClient) CreateUpdateSystemAdom(params *JSONSystemAdom, method string) (err error)
CreateUpdateSystemAdom is for creating or updating the system adom Input:
@params: infor needed @method: operation method, "add" or "update"
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) CreateUpdateSystemNetworkRoute ¶
func (c *FmgSDKClient) CreateUpdateSystemNetworkRoute(params *JSONSysNetworkRoute, method string) (err error)
CreateUpdateSystemNetworkRoute is for creating or updating network route Input:
@params: infor needed @method: operation method, "add" or "update"
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) CreateUpdateSystemSyslogServer ¶
func (c *FmgSDKClient) CreateUpdateSystemSyslogServer(params *JSONSystemSyslogServer, method string) (err error)
CreateUpdateSystemSyslogServer is for creating or updating syslog server Input:
@params: infor needed @method: operation method, "add" or "update"
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) DeleteDVMDevice ¶
func (c *FmgSDKClient) DeleteDVMDevice(params *JSONDVMDeviceDel) (err error)
DeleteDVMDevice delelte device from devicemanager Input:
@params: infor needed to delete the device
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) DeleteDVMScript ¶
func (c *FmgSDKClient) DeleteDVMScript(adom, id string) (err error)
DeleteDVMScript is for deleting the related script Input:
@adom: adom @id: script name
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) DeleteFirewallObjectAddress ¶
func (c *FmgSDKClient) DeleteFirewallObjectAddress(adom, name string) (err error)
DeleteFirewallObjectAddress is for deleting the specific firewall object address Input:
@adom: adom @name: firewall object addesss name
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) DeleteFirewallObjectIppool ¶
func (c *FmgSDKClient) DeleteFirewallObjectIppool(adom, name string) (err error)
DeleteFirewallObjectIppool is for deleting the specific firewall object ippool Input:
@adom: adom @name: firewall object ippool name
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) DeleteFirewallObjectService ¶
func (c *FmgSDKClient) DeleteFirewallObjectService(adom, name string) (err error)
DeleteFirewallObjectService is for deleting the specific firewall object service Input:
@adom: adom @name: firewall object service name
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) DeleteFirewallObjectVip ¶
func (c *FmgSDKClient) DeleteFirewallObjectVip(adom, name string) (err error)
DeleteFirewallObjectVip is for deleting the specific firewall object virtual ip Input:
@adom: adom @name: firewall object virtual ip name
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) DeleteFirewallSecurityPolicy ¶
func (c *FmgSDKClient) DeleteFirewallSecurityPolicy(adom, id, pkg_name string) (err error)
DeleteFirewallSecurityPolicy is for deleting the specific firewall security policy Input:
@adom: adom @id: policy id @pkg_name: policy package name
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) DeleteFirewallSecurityPolicyPackage ¶
func (c *FmgSDKClient) DeleteFirewallSecurityPolicyPackage(adom, name string) (err error)
DeleteFirewallSecurityPolicyPackage is for deleting the specific firewall security policy package Input:
@adom: adom @name: policy package name
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) DeleteObjectAdomRevision ¶
func (c *FmgSDKClient) DeleteObjectAdomRevision(adom, version string) (err error)
DeleteObjectAdomRevision is for deleting the specific obj adom revision Input:
@adom: adom @version: adom revision version
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) DeleteSystemAdminProfiles ¶
func (c *FmgSDKClient) DeleteSystemAdminProfiles(id string) (err error)
DeleteSystemAdminProfiles is for deleting the specific admin profile Input:
@id: admin profile id
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) DeleteSystemAdminUser ¶
func (c *FmgSDKClient) DeleteSystemAdminUser(id string) (err error)
DeleteSystemAdminUser is for deleting the specific system admin user Input:
@id: admin user name
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) DeleteSystemAdom ¶
func (c *FmgSDKClient) DeleteSystemAdom(name string) (err error)
DeleteSystemAdom is for deleting the specific system adom Input:
@name: system adom name
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) DeleteSystemNetworkRoute ¶
func (c *FmgSDKClient) DeleteSystemNetworkRoute(id string) (err error)
DeleteSystemNetworkRoute is for deleting the specific network route Input:
@id: network route id
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) DeleteSystemSyslogServer ¶
func (c *FmgSDKClient) DeleteSystemSyslogServer(name string) (err error)
DeleteSystemSyslogServer is for deleting the specific syslog server Input:
@name: syslog server name
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) Do ¶
func (c *FmgSDKClient) Do(method string, params map[string]interface{}) (output map[string]interface{}, err error)
Do is for executing the related request Input:
@method: operation method @params: request infor needed
Output:
@output: result infor got back @err: error details if failure, and nil if success
func (*FmgSDKClient) Execute ¶
func (c *FmgSDKClient) Execute(req *Request) (result map[string]interface{}, err error)
Execute is for sending the http request to FortiManager Input:
@req: http request
Output:
@result: http response result @err: error details if failure, and nil if success
func (*FmgSDKClient) ExecuteDVMScript ¶
func (c *FmgSDKClient) ExecuteDVMScript(adom string, params *JSONDVMScriptExecute) (err error)
ExecuteDVMScript is for executing the script Input:
@adom: adom @params: infor needed
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) HandleJSONRPCRequest ¶
func (c *FmgSDKClient) HandleJSONRPCRequest(p map[string]interface{}) ([]byte, error)
HandleJSONRPCRequest is for handling json rpc request Input:
@p: json rpc data
Output:
@data: return data when executing "read" operation @err: error details if failure, and nil if success
func (*FmgSDKClient) Login ¶
func (c *FmgSDKClient) Login() (session string, err error)
Login is for logging in Output:
@session: login session @err: error details if failure, and nil if success
func (*FmgSDKClient) Logout ¶
func (c *FmgSDKClient) Logout(s string) (err error)
Logout is for logging out Input:
@s: login session
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) QueryTask ¶
func (c *FmgSDKClient) QueryTask(task, timeout int) (err error)
QueryTask do the query task work Input:
@task: task id @timeout: timeout for the querying operation
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) ReadDVMScript ¶
func (c *FmgSDKClient) ReadDVMScript(adom, id string) (out *JSONDVMScript, err error)
ReadDVMScript is for reading the script infor Input:
@adom: adom @id: script name
Output:
@out: script infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadFirewallObjectAddress ¶
func (c *FmgSDKClient) ReadFirewallObjectAddress(adom, name string) (out *JSONFirewallObjectAddress, err error)
ReadFirewallObjectAddress is for reading the specific firewall object address Input:
@name: firewall object addesss name @adom: adom
Output:
@out: firewall object address infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadFirewallObjectIppool ¶
func (c *FmgSDKClient) ReadFirewallObjectIppool(adom, name string) (out *JSONFirewallObjectIppool, err error)
ReadFirewallObjectIppool is for reading the specific firewall object ippool Input:
@name: firewall object ippool name @adom: adom
Output:
@out: firewall object ippool infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadFirewallObjectService ¶
func (c *FmgSDKClient) ReadFirewallObjectService(adom, name string) (out *JSONFirewallObjectService, err error)
ReadFirewallObjectService is for reading the specific firewall object service Input:
@name: firewall object service name @adom: adom
Output:
@out: firewall object service infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadFirewallObjectVip ¶
func (c *FmgSDKClient) ReadFirewallObjectVip(adom, name string) (out *JSONFirewallObjectVip, err error)
ReadFirewallObjectVip is for reading the specific firewall object virtual ip Input:
@name: firewall object virtual ip name @adom: adom
Output:
@out: firewall object virtual ip infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadFirewallSecurityPolicy ¶
func (c *FmgSDKClient) ReadFirewallSecurityPolicy(adom, id, pkg_name string) (out *JSONFirewallSecurityPolicy, err error)
ReadFirewallSecurityPolicy is for reading the specific firewall security policy Input:
@adom: adom @id: policy id @pkg_name: policy package name
Output:
@out: policy infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadFirewallSecurityPolicyPackage ¶
func (c *FmgSDKClient) ReadFirewallSecurityPolicyPackage(adom, name string) (out *JSONFirewallSecurityPolicyPackage, err error)
ReadFirewallSecurityPolicyPackage is for reading the specific firewall security policy package Input:
@adom: adom @name: policy package name
Output:
@out: policy package infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadObjectAdomRevision ¶
func (c *FmgSDKClient) ReadObjectAdomRevision(adom, version string) (out *JSONObjectAdomRevision, err error)
ReadObjectAdomRevision is for reading the specific obj adom revision Input:
@version: adom revision version @adom: adom
Output:
@out: adom revision infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadSystemAdmin ¶
func (c *FmgSDKClient) ReadSystemAdmin() (out *JSONSystemAdmin, err error)
ReadSystemAdmin is for reading the system admin setting Output:
@out: system admin infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadSystemAdminProfiles ¶
func (c *FmgSDKClient) ReadSystemAdminProfiles(id string) (out *JSONSysAdminProfiles, err error)
ReadSystemAdminProfiles is for reading the system admin profiles Input:
@id: admin profile id
Output:
@out: admin profile infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadSystemAdminUser ¶
func (c *FmgSDKClient) ReadSystemAdminUser(id string) (out *JSONSysAdminUser, err error)
ReadSystemAdminUser is for reading the specific system admin user Input:
@id: admin user name
Output:
@out: admin user infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadSystemAdom ¶
func (c *FmgSDKClient) ReadSystemAdom(name string) (out *JSONSystemAdom, err error)
ReadSystemAdom is for reading the specific system adom Input:
@name: system adom name
Output:
@out: system adom infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadSystemDNS ¶
func (c *FmgSDKClient) ReadSystemDNS() (out *JSONSystemDNS, err error)
ReadSystemDNS is for reading DNS setting Output:
@out: DNS infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadSystemGlobal ¶
func (c *FmgSDKClient) ReadSystemGlobal() (out *JSONSystemGlobal, err error)
ReadSystemGlobal is for reading the system global setting Output:
@out: system global infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadSystemNTP ¶
func (c *FmgSDKClient) ReadSystemNTP() (out *JSONSystemNTP, err error)
ReadSystemNTP is for reading NTP setting Output:
@out: system NTP infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadSystemNetworkInterface ¶
func (c *FmgSDKClient) ReadSystemNetworkInterface(name string) (out *JSONSystemNetworkInterface, err error)
ReadSystemNetworkInterface is for reading the specific network interface setting Input:
@name: network interface name
Output:
@out: network interface infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadSystemNetworkRoute ¶
func (c *FmgSDKClient) ReadSystemNetworkRoute(id string) (out *JSONSysNetworkRoute, err error)
ReadSystemNetworkRoute is for reading the specific network route Input:
@id: network route id
Output:
@out: network route infor @err: error details if failure, and nil if success
func (*FmgSDKClient) ReadSystemSyslogServer ¶
func (c *FmgSDKClient) ReadSystemSyslogServer(name string) (out *JSONSystemSyslogServer, err error)
ReadSystemSyslogServer is for reading the specific syslog server Input:
@name: syslog server name
Output:
@out: syslog server infor @err: error details if failure, and nil if success
func (*FmgSDKClient) SetSystemAdmin ¶
func (c *FmgSDKClient) SetSystemAdmin(params *JSONSystemAdmin) (err error)
SetSystemAdmin is for updating the system admin setting Input:
@params: infor needed
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) SetSystemDNS ¶
func (c *FmgSDKClient) SetSystemDNS(params *JSONSystemDNS) (err error)
SetSystemDNS is for updating DNS setting Input:
@params: infor needed
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) SetSystemGlobal ¶
func (c *FmgSDKClient) SetSystemGlobal(params *JSONSystemGlobal) (err error)
SetSystemGlobal is for updating the system global setting Input:
@params: infor needed
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) SetSystemNTP ¶
func (c *FmgSDKClient) SetSystemNTP(params *JSONSystemNTP) (err error)
SetSystemNTP is for updating NTP setting Input:
@params: infor needed
Output:
@err: error details if failure, and nil if success
func (*FmgSDKClient) Trace ¶
func (f *FmgSDKClient) Trace(s string) func()
Trace is for debugging Input:
@s: function name to be traced
Output:
@func()
func (*FmgSDKClient) UpdateSystemNetworkInterface ¶
func (c *FmgSDKClient) UpdateSystemNetworkInterface(params *JSONSystemNetworkInterface) (err error)
UpdateSystemNetworkInterface is for updating network interface setting Input:
@params: infor needed
Output:
@err: error details if failure, and nil if success
type JSONDVMDeviceCreate ¶
type JSONDVMDeviceCreate struct { UserId string `json:"adm_usr"` Passwd string `json:"adm_pass"` Ipaddr string `json:"ip"` Name string `json:"name"` MgmtMode string `json:"mgmt_mode"` }
JSONDVMDeviceCreate contains params for adding device to devicemanager
type JSONDVMDeviceDel ¶
JSONDVMDeviceDel contains params for deleting device from devicemanager
type JSONDVMInstallDev ¶
JSONDVMInstallDev contains the params for installing device
type JSONDVMInstallPolicyPackage ¶
type JSONDVMInstallPolicyPackage struct { Name string `json:"name"` Adom string `json:"adom"` Timeout int }
JSONDVMInstallPolicyPackage contains params for installing policy package
type JSONDVMScript ¶
type JSONDVMScript struct { Name string `json:"name"` Description string `json:"desc"` Content string `json:"content"` Target string `json:"target"` Type string `json:"type"` }
JSONDVMScript contains the params for creating the script
type JSONDVMScriptExecute ¶
type JSONDVMScriptExecute struct { ScriptName string `json:"script"` TargetDevName string `json:"name"` Package string `json:"package"` Vdom string `json:"vdom"` Timeout int }
JSONDVMScriptExecute contains params for executing script
type JSONFirewallObjectAddress ¶
type JSONFirewallObjectAddress struct { Name string `json:"name"` Type string `json:"type"` Comment string `json:"comment"` Fqdn string `json:"fqdn"` AssociatedIntf string `json:"associated-interface"` Subnet string `json:"subnet"` StartIp string `json:"start-ip"` EndIp string `json:"end-ip"` AllowRouting string `json:"allow-routing"` }
JSONFirewallObjectAddress contains the params for creating firewall object address
type JSONFirewallObjectIppool ¶
type JSONFirewallObjectIppool struct { Name string `json:"name"` Comment string `json:"comments"` Type string `json:"type"` ArpIntf string `json:"arp-intf"` ArpReply string `json:"arp-reply"` AssociatedIntf string `json:"associated-interface"` StartIp string `json:"startip"` EndIp string `json:"endip"` }
JSONFirewallObjectIppool contains the params for creating firewall object ippool
type JSONFirewallObjectService ¶
type JSONFirewallObjectService struct { Name string `json:"name"` Comment string `json:"comment"` Category string `json:"category"` Protocol string `json:"protocol"` Proxy string `json:"proxy"` Fqdn string `json:"fqdn"` Iprange string `json:"iprange"` TcpPortRange []string `json:"tcp-portrange"` UdpPortRange []string `json:"udp-portrange"` SctpPortRange []string `json:"sctp-portrange"` IcmpCode int `json:"icmpcode"` IcmpType int `json:"icmptype"` ProtocolNum int `json:"protocol-number"` }
JSONFirewallObjectService contains the params for creating firewall object service
type JSONFirewallObjectVip ¶
type JSONFirewallObjectVip struct { Name string `json:"name"` Comment string `json:"comment"` Type string `json:"type"` ArpReply string `json:"arp-reply"` MappedIp string `json:"mappedip"` ExtIp string `json:"extip"` ExtIntf string `json:"extintf"` ConfigDefault string `json:"_if_no_default"` MappedAddr string `json:"mapped-addr"` }
JSONFirewallObjectVip contains the params for creating firewall object virtual ip
type JSONFirewallSecurityPolicy ¶
type JSONFirewallSecurityPolicy struct { Name string `json:"name"` Action string `json:"action"` PolicyId string `json:"policyid"` SrcAddr []string `json:"srcaddr"` SrcIntf []string `json:"srcintf"` DstAddr []string `json:"dstaddr"` DstIntf []string `json:"dstintf"` Service []string `json:"service"` Schedule []string `json:"schedule"` InternetService string `json:"internet-service,omitempty"` InternetServiceID []string `json:"internet-service-id,omitempty"` InternetServiceName []string `json:"internet-service-name,omitempty"` InternetServiceSrc string `json:"internet-service-src,omitempty"` InternetServiceSrcID []string `json:"internet-service-src-id,omitempty"` InternetServiceSrcName []string `json:"internet-service-src-name,omitempty"` Users []string `json:"users"` Groups []string `json:"groups"` Fsso string `json:"fsso,omitempty"` Rsso string `json:"rsso,omitempty"` Logtraffic string `json:"logtraffic"` LogtrafficStart string `json:"logtraffic-start"` CapturePacket string `json:"capture-packet"` Comments string `json:"comments"` NAT string `json:"nat"` IpPool string `json:"ippool"` PoolName []string `json:"poolname"` FixedPort string `json:"fixedport"` VpnTunnel []string `json:"vpntunnel"` Inbound string `json:"inbound"` UTMStatus string `json:"utm-status"` ProfileType string `json:"profile-type"` // profile_type: single AvProfile []string `json:"av-profile"` WebFilterProfile []string `json:"webfilter-profile"` ApplicationList []string `json:"application-list"` IpsSensor []string `json:"ips-sensor"` WafProfile []string `json:"waf-profile"` DnsFilterProfile []string `json:"dnsfilter-profile"` ProfileProtocolOptions []string `json:"profile-protocol-options"` // profile_type: group ProfileGroup []string `json:"profile-group"` TrafficShaper []string `json:"traffic-shaper"` TrafficShaperReverse []string `json:"traffic-shaper-reverse"` PerIpShaper []string `json:"per-ip-shaper"` }
JSONFirewallSecurityPolicy contains the params for creating firewall security policy
type JSONFirewallSecurityPolicyPackage ¶
type JSONFirewallSecurityPolicyPackage struct { Name string `json:"name"` Vdom string `json:"vdom"` Target string `json:"name"` InspectionMode string `json:"inspection-mode"` }
JSONFirewallSecurityPolicyPackage contains the params for creating firewall policy package
type JSONObjectAdomRevision ¶
type JSONObjectAdomRevision struct { Name string `json:"name"` Description string `json:"desc"` CreatedBy string `json:"created_by"` Locked int `json:"locked"` Version string `json:"version"` }
JSONObjectAdomRevision contains the params for creating obj adom revision
type JSONSysAdminProfileDeviceManager ¶
type JSONSysAdminProfileDeviceManager struct { DeviceManager string `json:"device-manager"` DeviceOp string `json:"device-op"` ConfigRetrieve string `json:"config-retrieve"` ConfigRevert string `json:"config-revert"` DeviceRevisionDeletion string `json:"device-revision-deletion"` TermAccess string `json:"term-access"` DeviceConfig string `json:"device-config"` DeviceProfile string `json:"device-profile"` DeviceWanLinkLoadBalance string `json:"device-wan-link-load-balance"` }
JSONSysAdminProfileDeviceManager contains the params for creating system admin profiles with devicemanager part
type JSONSysAdminProfileFortiGuard ¶
type JSONSysAdminProfileFortiGuard struct { FgdCenter string `json:"fgd_center"` FgdCenterAdvanced string `json:"fgd-center-advanced"` FgdCenterFmwMgmt string `json:"fgd-center-fmw-mgmt"` FgdCenterLicensing string `json:"fgd-center-licensing"` }
JSONSysAdminProfileFortiGuard contains the params for creating system admin profiles with fortiguard part
type JSONSysAdminProfileGenernal ¶
type JSONSysAdminProfileGenernal struct { ProfileId string `json:"profileid"` Description string `json:"description"` SystemSetting string `json:"system-setting"` AdomSwitch string `json:"adom-switch"` DeployManagement string `json:"deploy-management"` ImportPolicyPackages string `json:"import-policy-packages"` IntfMapping string `json:"intf-mapping"` DeviceAp string `json:"device-ap"` DeviceFortiClient string `json:"device-forticlient"` DeviceFortiSwitch string `json:"device-fortiswitch"` VpnManager string `json:"vpn-manager"` LogViewer string `json:"log-viewer"` }
JSONSysAdminProfileGenernal contains the params for creating system admin profiles with genernal part
type JSONSysAdminProfilePolicyObject ¶
type JSONSysAdminProfilePolicyObject struct { PolicyObjects string `json:"policy-objects"` GlobalPolicyPackages string `json:"global-policy-packages"` Assignment string `json:"assignment"` AdomPolicyPackages string `json:"adom-policy-packages"` ConsistencyCheck string `json:"consistency-check"` SetInstallTargets string `json:"set-install-targets"` }
JSONSysAdminProfilePolicyObject contains the params for creating system admin profiles with policy object part
type JSONSysAdminProfiles ¶
type JSONSysAdminProfiles struct { *JSONSysAdminProfileGenernal *JSONSysAdminProfileFortiGuard *JSONSysAdminProfileDeviceManager *JSONSysAdminProfilePolicyObject }
JSONSysAdminProfiles contains the params for creating system admin profiles
type JSONSysAdminUser ¶
type JSONSysAdminUser struct { UserId string `json:"userid"` Passwd string `json:"password"` Description string `json:"description"` RadiusServer string `json:"radius_server"` UserType string `json:"user_type"` ProfileId string `json:"profileid"` RpcPermit string `json:"rpc-permit"` Trusthost1 string `json:"trusthost1"` Trusthost2 string `json:"trusthost2"` Trusthost3 string `json:"trusthost3"` }
JSONSysAdminUser contains the params for creating system admin user
type JSONSysNetworkRoute ¶
type JSONSysNetworkRoute struct { Device string `json:"device"` Dst string `json:"dst"` Gateway string `json:"gateway"` SeqNum string `json:"seq_num"` }
JSONSysNetworkRoute contains the params for creating or updating network route
type JSONSystemAdmin ¶
type JSONSystemAdmin struct { HttpPort int `json:"http_port,omitempty"` HttpsPort int `json:"https_port,omitempty"` IdleTimeout int `json:"idle_timeout,omitempty"` }
JSONSystemAdmin contains the params for updating system admin setting
type JSONSystemAdom ¶
type JSONSystemAdom struct { Name string `json:"name"` RestrictedPrds string `json:"restricted_prds"` Status string `json:"state"` Flags []string `json:"flags"` }
JSONSystemAdom contains the params for creating system adom
type JSONSystemDNS ¶
type JSONSystemDNS struct { Primary string `json:"primary,omitempty"` Secondary string `json:"secondary,omitempty"` }
JSONSystemDNS contains the params for updating DNS setting
type JSONSystemGlobal ¶
type JSONSystemGlobal struct { Hostname string `json:"hostname,omitempty"` FazStatus string `json:"faz-status,omitempty"` AdomStatus string `json:"adom-status,omitempty"` AdomMode string `json:"adom-mode,omitempty"` TimeZone string `json:"timezone,omitempty"` }
JSONSystemGlobal contains the params for updating system global setting
type JSONSystemLicenseVM ¶
JSONSystemLicenseVM contains the params for uploading vm license
type JSONSystemNTP ¶
type JSONSystemNTP struct { Id int `json:"id"` Server string `json:"server"` Status string `json:"status,omitempty"` SyncInterval int `json:"sync_interval,omitempty"` }
JSONSystemNTP contains the params for updating NTP setting
type JSONSystemNetworkInterface ¶
type JSONSystemNetworkInterface struct { Name string `json:"name"` Ip string `json:"ip,omitempty"` Status string `json:"status,omitempty"` Description string `json:"description,omitempty"` AllowAccess []string `json:"allowaccess,omitempty"` ServiceAccess []string `json:"serviceaccess,omitempty"` }
JSONSystemNetworkInterface contains the params for updating network interface setting
type JSONSystemSyslogServer ¶
type JSONSystemSyslogServer struct { Name string `json:"name"` Ip string `json:"ip"` Port int `json:"port"` }
JSONSystemSyslogServer contains the params for creating or updating syslog server
type QueryResult ¶
type QueryResult struct {
// contains filtered or unexported fields
}
QueryResult is for query result
type Request ¶
type Request struct { Id uint64 `json:"id"` Method string `json:"method"` Session string `json:"session"` Params [1]interface{} `json:"params"` }
Request represents a JSON-RPC request sent by a client.
type SystemLicenseFortiCare ¶
SystemLicenseFortiCare contains the params for uploading forticare license
Source Files
¶
- devicemanager_device.go
- devicemanager_install_device.go
- devicemanager_install_policypackage.go
- devicemanager_querytask.go
- devicemanager_script.go
- devicemanager_script_execute.go
- firewall_object_address.go
- firewall_object_ippool.go
- firewall_object_service.go
- firewall_object_vip.go
- firewall_security_policy.go
- firewall_security_policypackage.go
- fmgclient.go
- jsonrpc_request.go
- object_adom_revision.go
- system_admin.go
- system_admin_profiles.go
- system_admin_user.go
- system_adom.go
- system_dns.go
- system_global.go
- system_license_forticare.go
- system_license_vm.go
- system_network_interface.go
- system_network_route.go
- system_ntp.go
- system_syslogserver.go