Versions in this module Expand all Collapse all v0 v0.2.2 Jul 14, 2026 Changes in this version type Client + func (fm *Client) GetObjectsByMetafield(adom, metafieldName string, metafieldValues []interface{}) (*ObjectsByMetafieldResult, error) + type GetObjectsParams struct + Fields []string + Option []string + Url string + type GetObjectsReq struct + Method string + Params []GetObjectsParams + Session string + Verbose int + type GetObjectsResp struct + Result []GetObjectsResult + type GetObjectsResult struct + Data json.RawMessage + Status Status + Url string + type ObjectsByMetafieldResult struct + AddrGrp []GetAddressGroupData + Address []GetAddressData + Service []GetServiceData v0.2.1 Jul 1, 2026 Changes in this version + type AddressGroupOptions func(*AddressGroupReqData) + func WithAddressGroupMetafields(metafields map[string]interface{}) AddressGroupOptions + type AddressGroupReq struct + Method string + Params []AddressGroupReqParams + Session string + type AddressGroupReqData struct + Comment string + Member []string + Metafields map[string]interface{} + Name string + type AddressGroupReqParams struct + Data []AddressGroupReqData + Url string + type AddressGroupResp struct + Result []AddressGroupRespResult + type AddressGroupRespData struct + Name string + type AddressGroupRespResult struct + Data AddressGroupRespData + Status Status + Url string type Client + func (fm *Client) CreateAddressGroup(adom, name string, members []string, comment string, ...) error + func (fm *Client) DeleteAddressGroup(adom, groupName string) error + func (fm *Client) GetAddressGroupByMetafield(adom, key string, value interface{}) (*GetAddressGroupData, error) + func (fm *Client) GetAddressGroupByName(adom, groupName string) (*GetAddressGroupData, error) + func (fm *Client) GetAddressGroupsByMetafield(adom, key string, values []interface{}) ([]GetAddressGroupData, error) + func (fm *Client) GetAddressGroupsByName(groupNames []string, adom string) ([]GetAddressGroupData, error) + func (fm *Client) UpdateAddressGroupWithMetafields(adom, name string, metafields map[string]interface{}) error + type DeleteFromParams struct + Data []string + Url string + type DeleteFromReq struct + Method string + Params DeleteFromParams + Session string + type DeleteResourceReq struct + Method string + Params []UrlParam + Session string + type GetAddressGroupData struct + Member []string + Metafields map[string]interface{} + Name string + type GetAddressGroupResp struct + Result []GetAddressGroupResult + type GetAddressGroupResult struct + Data GetAddressGroupData + Status Status + Url string + type GetAddressGroupsParams struct + Fields []string + Option []string + Url string + type GetAddressGroupsReq struct + Method string + Params []GetAddressGroupsParams + Session string + Verbose int + type GetAddressGroupsResp struct + Result []GetAddressGroupsResult + type GetAddressGroupsResult struct + Data []GetAddressGroupData + Status Status + Url string v0.2.0 Jul 1, 2026 Changes in this version type Client + func (fm *Client) CreateGroup(adom, name string, members []string, comment string, opts ...GroupOptions) error + func (fm *Client) DeleteAddress(adom, addressName string) error + func (fm *Client) DeleteGroup(adom, groupName string) error + func (fm *Client) DeletePolicy(adom, pkg string, id int) error + func (fm *Client) DeleteService(adom, serviceName string) error + func (fm *Client) UpdateGroupWithMetafields(adom, name string, metafields map[string]interface{}) error + type DeletePolicyReq struct + Method string + Params []UrlParam + Session string + type GroupOptions func(*GroupReqData) + func WithGroupMetafields(metafields map[string]interface{}) GroupOptions + type GroupReq struct + Method string + Params []GroupReqParams + Session string + type GroupReqData struct + Comment string + Member []string + Metafields map[string]interface{} + Name string + type GroupReqParams struct + Data []GroupReqData + Url string + type GroupResp struct + Result []GroupRespResult + type GroupRespData struct + Name string + type GroupRespResult struct + Data GroupRespData + Status Status + Url string v0.1.0 Jun 24, 2026 Changes in this version + type AddPolicyResp struct + Result []CreatePolicyResult + type AddressOptions func(*SubnetAddressReqData) + func WithAddressMetafields(metafields map[string]interface{}) AddressOptions + type Client struct + Host string + Key string + Password string + Session string + User string + func NewAPIClient(host, key string, opts ...ClientOptions) *Client + func NewUserClient(host, user, password string, opts ...ClientOptions) *Client + func (fm *Client) Commit(adom string) error + func (fm *Client) CreatePolicy(pkg, adom, comment string, srcs, dsts, services []string, ...) error + func (fm *Client) CreateService(adom, name, protocol string, minPort, maxPort int, comment string, ...) error + func (fm *Client) CreateSubnetAddress(adom, name, subnet, netmask, comment string, opts ...AddressOptions) error + func (fm *Client) DeleteFromPolicy(id int, objects []string, role, vdom, device, adom string) error + func (fm *Client) DisablePolicies(ids []int, vdom, device, adom string) error + func (fm *Client) DisablePolicy(adom, pkg string, id int) error + func (fm *Client) GetAddressByMetafield(adom, key string, value interface{}) (*GetAddressData, error) + func (fm *Client) GetAddressByName(adom, objectName string) (*GetAddressData, error) + func (fm *Client) GetAddressByNameIPAndNetmask(adom, objectName, ip, netmask string) (*GetAddressData, error) + func (fm *Client) GetAddressesByMetafield(adom, key string, values []interface{}) ([]GetAddressData, error) + func (fm *Client) GetAddressesByName(objectNames []string, adom string) ([]GetAddressData, error) + func (fm *Client) GetPoliciesByID(pkg, adom string, ids []int) ([]GetPolicyData, error) + func (fm *Client) GetPoliciesByMetafield(adom, pkg, key string, values []interface{}) ([]GetPolicyData, error) + func (fm *Client) GetPolicyByMetafield(adom, pkg, key string, value interface{}) (*GetPolicyData, error) + func (fm *Client) GetServiceByMetafield(adom, key string, value interface{}) (*GetServiceData, error) + func (fm *Client) GetServiceByNamePortAndProtocol(adom, name, protocol string, minPort, maxPort int) (*GetServiceData, error) + func (fm *Client) GetServicesByMetafield(adom, key string, values []interface{}) ([]GetServiceData, error) + func (fm *Client) GetServicesByName(serviceNames []string, adom string) ([]GetServiceData, error) + func (fm *Client) Lock(adom string) error + func (fm *Client) Login() error + func (fm *Client) Logout() error + func (fm *Client) Unlock(adom string) error + func (fm *Client) UpdateServiceWithMetafields(adom, name string, metafields map[string]interface{}) error + func (fm *Client) UpdateSubnetAddressWithMetafields(adom, name string, metafields map[string]interface{}) error + type ClientOptions func(*Client) + func WithLog(l *slog.Logger) ClientOptions + type CommitParams struct + Url string + type CommitReq struct + Method string + Params []CommitParams + Session string + type CommitResp struct + Result []Result + type CreatePolicyParams struct + Data CreatePolicyReqData + Url string + type CreatePolicyReq struct + Method string + Params []CreatePolicyParams + Session string + type CreatePolicyReqData struct + Action string + Comments string + Dstaddr []string + Dstinft []string + Logtraffic string + Metafields map[string]interface{} + Schedule string + Service []string + Srcaddr []string + Srcintf []string + Status string + type CreatePolicyRespData struct + PolicyID int + type CreatePolicyResult struct + Data CreatePolicyRespData + Status Status + Url string + type DeleteParams struct + Data []string + Url string + type DeleteReq struct + Method string + Params DeleteParams + Session string + type DeleteResp struct + Result []Result + type DisableParams struct + Data DisableReqData + Url string + type DisableReq struct + Method string + Params []DisableParams + Session string + type DisableReqData struct + Status string + type DisableResp struct + Result []DisableResult + type DisableRespData struct + PolicyID int + type DisableResult struct + Data DisableRespData + Status Status + Url string + type GetAddressData struct + DynamicMapping []string + List []string + Metafields map[string]interface{} + Name string + Oid int + Subnet []string + Tagging []string + type GetAddressResp struct + Result []GetAddressResult + type GetAddressResult struct + Data GetAddressData + Status Status + Url string + type GetAddressesParams struct + Fields []string + Option []string + Url string + type GetAddressesReq struct + Method string + Params []GetAddressesParams + Session string + Verbose int + type GetAddressesResp struct + Result []GetAddressesResult + type GetAddressesResult struct + Data []GetAddressData + Status Status + Url string + type GetPoliciesParams struct + Fields []string + Option []string + Url string + type GetPoliciesReq struct + Method string + Params []GetPoliciesParams + Session string + Verbose int + type GetPoliciesResp struct + Result []GetPoliciesResult + type GetPoliciesResult struct + Data []GetPolicyData + Status Status + Url string + type GetPolicyData struct + Action string + Dstaddr []string + Metafields map[string]interface{} + Objseq int + PolicyID int + Service []string + Srcaddr []string + Status string + type GetPolicyResp struct + Result []GetPolicyResult + type GetPolicyResult struct + Data GetPolicyData + Status Status + Url string + type GetServiceData struct + Metafields map[string]interface{} + Name string + ObjSeq int + Oid int + Protocol string + TCPPortRange []string + UDPPortRange []string + type GetServiceResp struct + Result []GetServiceResult + type GetServiceResult struct + Data GetServiceData + Status Status + Url string + type GetServicesParams struct + Fields []string + Option []string + Url string + type GetServicesReq struct + Method string + Params []GetServicesParams + Session string + Verbose int + type GetServicesResp struct + Result []GetServicesResult + type GetServicesResult struct + Data []GetServiceData + Status Status + Url string + type LockReq struct + Method string + Params []UrlParam + Session string + type LockResp struct + Result []Result + type LoginData struct + Password string + User string + type LoginParams struct + Data LoginData + Url string + type LoginRequest struct + Method string + Params []LoginParams + type LoginResp struct + Result []Result + Session string + type LogoutParams struct + Url string + type LogoutReq struct + Method string + Params []LogoutParams + Session string + type LogoutResp struct + Result []Result + Session string + type PolicyOptions func(*CreatePolicyReqData) + func WithMetafields(metafields map[string]interface{}) PolicyOptions + type Result struct + Status Status + Url string + type ServiceOptions func(*ServiceReqData) + func WithServiceMetafields(metafields map[string]interface{}) ServiceOptions + type ServiceReq struct + Method string + Params []ServiceReqParams + Session string + type ServiceReqData struct + Comment string + Metafields map[string]interface{} + Name string + Protocol string + TCPPortRange []string + UDPPortRange []string + type ServiceReqParams struct + Data []ServiceReqData + Url string + type ServiceResp struct + Result []ServiceRespResult + type ServiceRespData struct + Name string + type ServiceRespResult struct + Data ServiceRespData + Status Status + Url string + type Status struct + Code int + Message string + type SubnetAddressReq struct + Method string + Params []SubnetAddressReqParams + Session string + type SubnetAddressReqData struct + Comment string + Metafields map[string]interface{} + Name string + Subnet string + Type string + type SubnetAddressReqParams struct + Data []SubnetAddressReqData + Url string + type SubnetAddressResp struct + Result []SubnetAddressRespResult + type SubnetAddressRespData struct + Name string + type SubnetAddressRespResult struct + Data SubnetAddressRespData + Status Status + Url string + type UnlockParams struct + Url string + type UnlockReq struct + Method string + Params []UnlockParams + Session string + type UnlockResp struct + Result []Result + type UrlParam struct + Url string