Documentation ¶
Index ¶
- func GetConfigFromEnv() (host, username, password string, tls bool, caCertificate string, insecure bool)
- func IsNotFoundError(err error) bool
- func Marshal(c string, s interface{}) []string
- func NewNotFound(text string) error
- func RandomString() string
- func SetupAndTestMainExec(m *testing.M, sysResources *SystemResources)
- func SkipIfRouterOSV6OrEarlier(t *testing.T, systemResources SystemResources)
- func SkipIfRouterOSV7OrLater(t *testing.T, systemResources SystemResources)
- func Unmarshal(reply routeros.Reply, v interface{}) error
- type Action
- type Adder
- type BgpInstance
- func (b *BgpInstance) ActionToCommand(a Action) string
- func (b *BgpInstance) AfterAddHook(r *routeros.Reply)
- func (b *BgpInstance) DeleteField() string
- func (b *BgpInstance) DeleteFieldValue() string
- func (b *BgpInstance) FindField() string
- func (b *BgpInstance) FindFieldValue() string
- func (b *BgpInstance) HandleError(err error) error
- func (b *BgpInstance) ID() string
- func (b *BgpInstance) IDField() string
- func (b *BgpInstance) SetID(id string)
- type BgpPeer
- func (b *BgpPeer) ActionToCommand(a Action) string
- func (b *BgpPeer) AfterAddHook(r *routeros.Reply)
- func (b *BgpPeer) DeleteField() string
- func (b *BgpPeer) DeleteFieldValue() string
- func (b *BgpPeer) FindField() string
- func (b *BgpPeer) FindFieldValue() string
- func (b *BgpPeer) ID() string
- func (b *BgpPeer) IDField() string
- func (b *BgpPeer) SetID(id string)
- type Bridge
- func (b *Bridge) ActionToCommand(a Action) string
- func (b *Bridge) AfterAddHook(r *routeros.Reply)
- func (b *Bridge) DeleteField() string
- func (b *Bridge) DeleteFieldValue() string
- func (b *Bridge) FindField() string
- func (b *Bridge) FindFieldValue() string
- func (b *Bridge) ID() string
- func (b *Bridge) IDField() string
- func (b *Bridge) SetID(id string)
- type BridgePort
- func (b *BridgePort) ActionToCommand(a Action) string
- func (b *BridgePort) AfterAddHook(r *routeros.Reply)
- func (b *BridgePort) DeleteField() string
- func (b *BridgePort) DeleteFieldValue() string
- func (b *BridgePort) ID() string
- func (b *BridgePort) IDField() string
- func (b *BridgePort) SetID(id string)
- type BridgeVlan
- type Deleter
- type DhcpLease
- type DhcpServer
- func (b *DhcpServer) ActionToCommand(a Action) string
- func (b *DhcpServer) AfterAddHook(r *routeros.Reply)
- func (b *DhcpServer) DeleteField() string
- func (b *DhcpServer) DeleteFieldValue() string
- func (b *DhcpServer) FindField() string
- func (b *DhcpServer) FindFieldValue() string
- func (b *DhcpServer) ID() string
- func (b *DhcpServer) IDField() string
- func (b *DhcpServer) SetID(id string)
- type DhcpServerNetwork
- type DnsRecord
- func (d *DnsRecord) ActionToCommand(action Action) string
- func (d *DnsRecord) AfterAddHook(r *routeros.Reply)
- func (d *DnsRecord) DeleteField() string
- func (d *DnsRecord) DeleteFieldValue() string
- func (d *DnsRecord) FindField() string
- func (d *DnsRecord) FindFieldValue() string
- func (d *DnsRecord) ID() string
- func (d *DnsRecord) IDField() string
- func (d *DnsRecord) SetID(id string)
- type ErrorHandler
- type Finder
- type FirewallFilterRule
- type InterfaceList
- func (b *InterfaceList) ActionToCommand(a Action) string
- func (b *InterfaceList) AfterAddHook(r *routeros.Reply)
- func (b *InterfaceList) DeleteField() string
- func (b *InterfaceList) DeleteFieldValue() string
- func (b *InterfaceList) FindField() string
- func (b *InterfaceList) FindFieldValue() string
- func (b *InterfaceList) ID() string
- func (b *InterfaceList) IDField() string
- func (b *InterfaceList) SetID(id string)
- type InterfaceListMember
- func (b *InterfaceListMember) ActionToCommand(a Action) string
- func (b *InterfaceListMember) AfterAddHook(r *routeros.Reply)
- func (b *InterfaceListMember) DeleteField() string
- func (b *InterfaceListMember) DeleteFieldValue() string
- func (b *InterfaceListMember) ID() string
- func (b *InterfaceListMember) IDField() string
- func (b *InterfaceListMember) SetID(id string)
- type InterfaceWireguard
- func (i *InterfaceWireguard) ActionToCommand(action Action) string
- func (i *InterfaceWireguard) AfterAddHook(r *routeros.Reply)
- func (i *InterfaceWireguard) DeleteField() string
- func (i *InterfaceWireguard) DeleteFieldValue() string
- func (i *InterfaceWireguard) FindField() string
- func (i *InterfaceWireguard) FindFieldValue() string
- func (i *InterfaceWireguard) ID() string
- func (i *InterfaceWireguard) IDField() string
- func (i *InterfaceWireguard) SetID(id string)
- type InterfaceWireguardPeer
- func (i *InterfaceWireguardPeer) ActionToCommand(action Action) string
- func (i *InterfaceWireguardPeer) AfterAddHook(r *routeros.Reply)
- func (i *InterfaceWireguardPeer) DeleteField() string
- func (i *InterfaceWireguardPeer) DeleteFieldValue() string
- func (i *InterfaceWireguardPeer) ID() string
- func (i *InterfaceWireguardPeer) IDField() string
- func (i *InterfaceWireguardPeer) SetID(id string)
- type IpAddress
- type Ipv6Address
- type LegacyBgpUnsupported
- type Marshaler
- type Mikrotik
- func (client Mikrotik) Add(d Resource) (Resource, error)
- func (c Mikrotik) AddBgpInstance(r *BgpInstance) (*BgpInstance, error)
- func (c Mikrotik) AddBgpPeer(r *BgpPeer) (*BgpPeer, error)
- func (c Mikrotik) AddBridge(r *Bridge) (*Bridge, error)
- func (c Mikrotik) AddBridgePort(r *BridgePort) (*BridgePort, error)
- func (c Mikrotik) AddBridgeVlan(r *BridgeVlan) (*BridgeVlan, error)
- func (c Mikrotik) AddDhcpLease(r *DhcpLease) (*DhcpLease, error)
- func (c Mikrotik) AddDhcpServer(r *DhcpServer) (*DhcpServer, error)
- func (c Mikrotik) AddDhcpServerNetwork(r *DhcpServerNetwork) (*DhcpServerNetwork, error)
- func (client Mikrotik) AddDnsRecord(d *DnsRecord) (*DnsRecord, error)
- func (c Mikrotik) AddFirewallFilterRule(r *FirewallFilterRule) (*FirewallFilterRule, error)
- func (c Mikrotik) AddInterfaceList(r *InterfaceList) (*InterfaceList, error)
- func (c Mikrotik) AddInterfaceListMember(r *InterfaceListMember) (*InterfaceListMember, error)
- func (client Mikrotik) AddInterfaceWireguard(i *InterfaceWireguard) (*InterfaceWireguard, error)
- func (client Mikrotik) AddInterfaceWireguardPeer(i *InterfaceWireguardPeer) (*InterfaceWireguardPeer, error)
- func (c Mikrotik) AddIpAddress(r *IpAddress) (*IpAddress, error)
- func (c Mikrotik) AddIpv6Address(r *Ipv6Address) (*Ipv6Address, error)
- func (c Mikrotik) AddPool(r *Pool) (*Pool, error)
- func (client Mikrotik) AddScheduler(s *Scheduler) (*Scheduler, error)
- func (c Mikrotik) AddScript(r *Script) (*Script, error)
- func (c Mikrotik) AddVlanInterface(r *VlanInterface) (*VlanInterface, error)
- func (client Mikrotik) CreateScheduler(s *Scheduler) (*Scheduler, error)
- func (client Mikrotik) Delete(d Resource) error
- func (c Mikrotik) DeleteBgpInstance(name string) error
- func (c Mikrotik) DeleteBgpPeer(name string) error
- func (c Mikrotik) DeleteBridge(name string) error
- func (c Mikrotik) DeleteBridgePort(id string) error
- func (c Mikrotik) DeleteBridgeVlan(id string) error
- func (c Mikrotik) DeleteDhcpLease(id string) error
- func (c Mikrotik) DeleteDhcpServer(name string) error
- func (c Mikrotik) DeleteDhcpServerNetwork(id string) error
- func (client Mikrotik) DeleteDnsRecord(id string) error
- func (c Mikrotik) DeleteFirewallFilterRule(id string) error
- func (c Mikrotik) DeleteInterfaceList(name string) error
- func (c Mikrotik) DeleteInterfaceListMember(id string) error
- func (client Mikrotik) DeleteInterfaceWireguard(name string) error
- func (client Mikrotik) DeleteInterfaceWireguardPeer(id string) error
- func (c Mikrotik) DeleteIpAddress(id string) error
- func (c Mikrotik) DeleteIpv6Address(id string) error
- func (c Mikrotik) DeletePool(id string) error
- func (client Mikrotik) DeleteScheduler(name string) error
- func (c Mikrotik) DeleteScript(id string) error
- func (c Mikrotik) DeleteVlanInterface(name string) error
- func (client Mikrotik) Find(d Resource) (Resource, error)
- func (c Mikrotik) FindBgpInstance(name string) (*BgpInstance, error)
- func (c Mikrotik) FindBgpPeer(name string) (*BgpPeer, error)
- func (c Mikrotik) FindBridge(name string) (*Bridge, error)
- func (c Mikrotik) FindBridgePort(id string) (*BridgePort, error)
- func (c Mikrotik) FindBridgeVlan(id string) (*BridgeVlan, error)
- func (c Mikrotik) FindDhcpLease(id string) (*DhcpLease, error)
- func (c Mikrotik) FindDhcpServer(name string) (*DhcpServer, error)
- func (c Mikrotik) FindDhcpServerNetwork(id string) (*DhcpServerNetwork, error)
- func (client Mikrotik) FindDnsRecord(name string) (*DnsRecord, error)
- func (c Mikrotik) FindFirewallFilterRule(id string) (*FirewallFilterRule, error)
- func (c Mikrotik) FindInterfaceList(name string) (*InterfaceList, error)
- func (c Mikrotik) FindInterfaceListMember(id string) (*InterfaceListMember, error)
- func (client Mikrotik) FindInterfaceWireguard(name string) (*InterfaceWireguard, error)
- func (client Mikrotik) FindInterfaceWireguardPeer(id string) (*InterfaceWireguardPeer, error)
- func (c Mikrotik) FindIpAddress(id string) (*IpAddress, error)
- func (c Mikrotik) FindIpv6Address(id string) (*Ipv6Address, error)
- func (c Mikrotik) FindPool(id string) (*Pool, error)
- func (c Mikrotik) FindPoolByName(name string) (*Pool, error)
- func (client Mikrotik) FindScheduler(name string) (*Scheduler, error)
- func (c Mikrotik) FindScript(name string) (*Script, error)
- func (c Mikrotik) FindVlanInterface(name string) (*VlanInterface, error)
- func (client Mikrotik) GetSystemResources() (*SystemResources, error)
- func (c Mikrotik) InspectConsoleCommand(command string) (consoleinspected.ConsoleItem, error)
- func (client Mikrotik) List(d Resource) ([]Resource, error)
- func (client Mikrotik) ListDhcpLease() ([]DhcpLease, error)
- func (client Mikrotik) ListDhcpLeases() ([]DhcpLease, error)
- func (client Mikrotik) ListIpAddress() ([]IpAddress, error)
- func (c Mikrotik) ListIpv6Address() ([]Ipv6Address, error)
- func (c Mikrotik) ListPools() ([]Pool, error)
- func (c Mikrotik) ListVlanInterface() ([]VlanInterface, error)
- func (client Mikrotik) Update(resource Resource) (Resource, error)
- func (c Mikrotik) UpdateBgpInstance(r *BgpInstance) (*BgpInstance, error)
- func (c Mikrotik) UpdateBgpPeer(r *BgpPeer) (*BgpPeer, error)
- func (c Mikrotik) UpdateBridge(r *Bridge) (*Bridge, error)
- func (c Mikrotik) UpdateBridgePort(r *BridgePort) (*BridgePort, error)
- func (c Mikrotik) UpdateBridgeVlan(r *BridgeVlan) (*BridgeVlan, error)
- func (c Mikrotik) UpdateDhcpLease(r *DhcpLease) (*DhcpLease, error)
- func (c Mikrotik) UpdateDhcpServer(r *DhcpServer) (*DhcpServer, error)
- func (c Mikrotik) UpdateDhcpServerNetwork(r *DhcpServerNetwork) (*DhcpServerNetwork, error)
- func (client Mikrotik) UpdateDnsRecord(d *DnsRecord) (*DnsRecord, error)
- func (c Mikrotik) UpdateFirewallFilterRule(r *FirewallFilterRule) (*FirewallFilterRule, error)
- func (c Mikrotik) UpdateInterfaceList(r *InterfaceList) (*InterfaceList, error)
- func (c Mikrotik) UpdateInterfaceListMember(r *InterfaceListMember) (*InterfaceListMember, error)
- func (client Mikrotik) UpdateInterfaceWireguard(i *InterfaceWireguard) (*InterfaceWireguard, error)
- func (client Mikrotik) UpdateInterfaceWireguardPeer(i *InterfaceWireguardPeer) (*InterfaceWireguardPeer, error)
- func (c Mikrotik) UpdateIpAddress(r *IpAddress) (*IpAddress, error)
- func (c Mikrotik) UpdateIpv6Address(r *Ipv6Address) (*Ipv6Address, error)
- func (c Mikrotik) UpdatePool(r *Pool) (*Pool, error)
- func (client Mikrotik) UpdateScheduler(s *Scheduler) (*Scheduler, error)
- func (c Mikrotik) UpdateScript(r *Script) (*Script, error)
- func (c Mikrotik) UpdateVlanInterface(r *VlanInterface) (*VlanInterface, error)
- type NotFound
- type Pool
- type Resource
- type Scheduler
- func (b *Scheduler) ActionToCommand(a Action) string
- func (b *Scheduler) AfterAddHook(r *routeros.Reply)
- func (b *Scheduler) DeleteField() string
- func (b *Scheduler) DeleteFieldValue() string
- func (b *Scheduler) FindField() string
- func (b *Scheduler) FindFieldValue() string
- func (b *Scheduler) ID() string
- func (b *Scheduler) IDField() string
- func (b *Scheduler) SetID(id string)
- type Script
- func (b *Script) ActionToCommand(a Action) string
- func (b *Script) AfterAddHook(r *routeros.Reply)
- func (b *Script) DeleteField() string
- func (b *Script) DeleteFieldValue() string
- func (b *Script) FindField() string
- func (b *Script) FindFieldValue() string
- func (b *Script) ID() string
- func (b *Script) IDField() string
- func (b *Script) SetID(id string)
- type SystemResources
- type Unmarshaler
- type VlanInterface
- func (b *VlanInterface) ActionToCommand(a Action) string
- func (b *VlanInterface) AfterAddHook(r *routeros.Reply)
- func (b *VlanInterface) DeleteField() string
- func (b *VlanInterface) DeleteFieldValue() string
- func (b *VlanInterface) FindField() string
- func (b *VlanInterface) FindFieldValue() string
- func (b *VlanInterface) ID() string
- func (b *VlanInterface) IDField() string
- func (b *VlanInterface) SetID(id string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigFromEnv ¶
func IsNotFoundError ¶
func NewNotFound ¶
func SetupAndTestMainExec ¶
func SetupAndTestMainExec(m *testing.M, sysResources *SystemResources)
func SkipIfRouterOSV6OrEarlier ¶
func SkipIfRouterOSV6OrEarlier(t *testing.T, systemResources SystemResources)
func SkipIfRouterOSV7OrLater ¶
func SkipIfRouterOSV7OrLater(t *testing.T, systemResources SystemResources)
Types ¶
type Adder ¶
type Adder interface { // AfterAddHook is called right after the resource successfully added. // This hook is mainly used to set resource's ID field based on reply from RouterOS. AfterAddHook(r *routeros.Reply) }
Adder defines contract for resources which require custom behaviour during resource creation.
type BgpInstance ¶
type BgpInstance struct { Id string `mikrotik:".id" codegen:"id,mikrotikID"` Name string `mikrotik:"name" codegen:"name,required,terraformID"` As int `mikrotik:"as" codegen:"as,required"` ClientToClientReflection bool `mikrotik:"client-to-client-reflection" codegen:"client_to_client_reflection"` Comment string `mikrotik:"comment" codegen:"comment"` ConfederationPeers string `mikrotik:"confederation-peers" codegen:"confederation_peers"` Disabled bool `mikrotik:"disabled" codegen:"disabled"` IgnoreAsPathLen bool `mikrotik:"ignore-as-path-len" codegen:"ignore_as_path_len"` OutFilter string `mikrotik:"out-filter" codegen:"out_filter"` RedistributeConnected bool `mikrotik:"redistribute-connected" codegen:"redistribute_connected"` RedistributeOspf bool `mikrotik:"redistribute-ospf" codegen:"redistribute_ospf"` RedistributeOtherBgp bool `mikrotik:"redistribute-other-bgp" codegen:"redistribute_other_bgp"` RedistributeRip bool `mikrotik:"redistribute-rip" codegen:"redistribute_rip"` RedistributeStatic bool `mikrotik:"redistribute-static" codegen:"redistribute_static"` RouterID string `mikrotik:"router-id" codegen:"router_id,required"` RoutingTable string `mikrotik:"routing-table" codegen:"routing_table"` ClusterID string `mikrotik:"cluster-id" codegen:"cluster_id"` Confederation int `mikrotik:"confederation" codegen:"confederation"` }
BgpInstance Mikrotik resource
func (*BgpInstance) ActionToCommand ¶
func (b *BgpInstance) ActionToCommand(a Action) string
func (*BgpInstance) AfterAddHook ¶
func (b *BgpInstance) AfterAddHook(r *routeros.Reply)
func (*BgpInstance) DeleteField ¶
func (b *BgpInstance) DeleteField() string
func (*BgpInstance) DeleteFieldValue ¶
func (b *BgpInstance) DeleteFieldValue() string
func (*BgpInstance) FindField ¶
func (b *BgpInstance) FindField() string
func (*BgpInstance) FindFieldValue ¶
func (b *BgpInstance) FindFieldValue() string
func (*BgpInstance) HandleError ¶
func (b *BgpInstance) HandleError(err error) error
HandleError intercepts errors during CRUD operations. It is used to catch "no such command prefix" on RouterOS >= v7.0
func (*BgpInstance) ID ¶
func (b *BgpInstance) ID() string
func (*BgpInstance) IDField ¶
func (b *BgpInstance) IDField() string
func (*BgpInstance) SetID ¶
func (b *BgpInstance) SetID(id string)
type BgpPeer ¶
type BgpPeer struct { Id string `mikrotik:".id" codegen:"id,mikrotikID"` Name string `mikrotik:"name" codegen:"name,required,terraformID"` AddressFamilies string `mikrotik:"address-families" codegen:"address_families,optional,computed"` AllowAsIn int `mikrotik:"allow-as-in" codegen:"allow_as_in"` AsOverride bool `mikrotik:"as-override" codegen:"as_override"` CiscoVplsNlriLenFmt string `mikrotik:"cisco-vpls-nlri-len-fmt" codegen:"cisco_vpls_nlri_len_fmt"` Comment string `mikrotik:"comment" codegen:"comment"` DefaultOriginate string `mikrotik:"default-originate" codegen:"default_originate,optional,computed"` Disabled bool `mikrotik:"disabled" codegen:"disabled"` HoldTime string `mikrotik:"hold-time" codegen:"hold_time,optional,computed"` InFilter string `mikrotik:"in-filter" codegen:"in_filter"` Instance string `mikrotik:"instance" codegen:"instance"` KeepAliveTime string `mikrotik:"keepalive-time" codegen:"keepalive_time"` MaxPrefixLimit int `mikrotik:"max-prefix-limit" codegen:"max_prefix_limit"` MaxPrefixRestartTime string `mikrotik:"max-prefix-restart-time" codegen:"max_prefix_restart_time"` Multihop bool `mikrotik:"multihop" codegen:"multihop"` NexthopChoice string `mikrotik:"nexthop-choice" codegen:"nexthop_choice,optional,computed"` OutFilter string `mikrotik:"out-filter" codegen:"out_filter"` Passive bool `mikrotik:"passive" codegen:"passive"` RemoteAddress string `mikrotik:"remote-address" codegen:"remote_address,required"` RemoteAs int `mikrotik:"remote-as" codegen:"remote_as,required"` RemotePort int `mikrotik:"remote-port" codegen:"remote_port"` RemovePrivateAs bool `mikrotik:"remove-private-as" codegen:"remove_private_as"` RouteReflect bool `mikrotik:"route-reflect" codegen:"route_reflect"` TCPMd5Key string `mikrotik:"tcp-md5-key" codegen:"tcp_md5_key"` TTL string `mikrotik:"ttl" codegen:"ttl,optional,computed"` UpdateSource string `mikrotik:"update-source" codegen:"update_source"` UseBfd bool `mikrotik:"use-bfd" codegen:"use_bfd"` }
BgpPeer Mikrotik resource
func (*BgpPeer) ActionToCommand ¶
func (*BgpPeer) AfterAddHook ¶
func (*BgpPeer) DeleteField ¶
func (*BgpPeer) DeleteFieldValue ¶
func (*BgpPeer) FindFieldValue ¶
type Bridge ¶
type Bridge struct { Id string `mikrotik:".id" codegen:"id,mikrotikID"` Name string `mikrotik:"name" codegen:"name,required,terraformID"` FastForward bool `mikrotik:"fast-forward" codegen:"fast_forward"` VlanFiltering bool `mikrotik:"vlan-filtering" codegen:"vlan_filtering"` Comment string `mikrotik:"comment" codegen:"comment"` }
Bridge defines /bridge resource
func (*Bridge) ActionToCommand ¶
func (*Bridge) AfterAddHook ¶
func (*Bridge) DeleteField ¶
func (*Bridge) DeleteFieldValue ¶
func (*Bridge) FindFieldValue ¶
type BridgePort ¶
type BridgePort struct { Id string `mikrotik:".id" codegen:"id,mikrotikID"` Bridge string `mikrotik:"bridge" codegen:"bridge"` Interface string `mikrotik:"interface" codegen:"interface"` PVId int `mikrotik:"pvid" codegen:"pvid"` Comment string `mikrotik:"comment" codegen:"comment"` }
BridgePort defines port-in-bridge association
func (*BridgePort) ActionToCommand ¶
func (b *BridgePort) ActionToCommand(a Action) string
func (*BridgePort) AfterAddHook ¶
func (b *BridgePort) AfterAddHook(r *routeros.Reply)
func (*BridgePort) DeleteField ¶
func (b *BridgePort) DeleteField() string
func (*BridgePort) DeleteFieldValue ¶
func (b *BridgePort) DeleteFieldValue() string
func (*BridgePort) ID ¶
func (b *BridgePort) ID() string
func (*BridgePort) IDField ¶
func (b *BridgePort) IDField() string
func (*BridgePort) SetID ¶
func (b *BridgePort) SetID(id string)
type BridgeVlan ¶
type BridgeVlan struct { Id string `mikrotik:".id" codegen:"id,mikrotikID"` Bridge string `mikrotik:"bridge" codegen:"bridge,required"` Tagged types.MikrotikList `mikrotik:"tagged" codegen:"tagged,elemType=String"` Untagged types.MikrotikList `mikrotik:"untagged" codegen:"untagged,elemType=String"` VlanIds types.MikrotikIntList `mikrotik:"vlan-ids" codegen:"vlan_ids,elemType=Int64"` }
BridgeVlan defines vlan filtering in bridge resource
func (*BridgeVlan) ActionToCommand ¶
func (b *BridgeVlan) ActionToCommand(a Action) string
func (*BridgeVlan) AfterAddHook ¶
func (b *BridgeVlan) AfterAddHook(r *routeros.Reply)
func (*BridgeVlan) ID ¶
func (b *BridgeVlan) ID() string
func (*BridgeVlan) IDField ¶
func (b *BridgeVlan) IDField() string
func (*BridgeVlan) SetID ¶
func (b *BridgeVlan) SetID(id string)
type Deleter ¶
type Deleter interface { // DeleteField retrieves a name of a field which is used for resource deletion. DeleteField() string // DeleteFieldValue retrieves a value for DeleteField field. DeleteFieldValue() string }
Deleter defines contract for resources which require custom behaviour during resource deletion.
type DhcpLease ¶
type DhcpLease struct { Id string `mikrotik:".id" codegen:"id,mikrotikID,terraformID"` Address string `mikrotik:"address" codegen:"address,required"` MacAddress string `mikrotik:"mac-address" codegen:"macaddress,required"` Comment string `mikrotik:"comment" codegen:"comment"` BlockAccess bool `mikrotik:"block-access" codegen:"blocked"` Dynamic bool `mikrotik:"dynamic,readonly" codegen:"dynamic,computed"` // TODO: don't see this listed as a param https://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Server, but our docs list it as one Hostname string `mikrotik:"host-name,readonly" codegen:"hostname,computed"` }
func (*DhcpLease) ActionToCommand ¶
func (*DhcpLease) AfterAddHook ¶
type DhcpServer ¶
type DhcpServer struct { Id string `mikrotik:".id" codegen:"id,mikrotikID"` Name string `mikrotik:"name" codegen:"name,terraformID,required"` Disabled bool `mikrotik:"disabled" codegen:"disabled"` AddArp bool `mikrotik:"add-arp" codegen:"add_arp"` AddressPool string `mikrotik:"address-pool" codegen:"address_pool"` Authoritative string `mikrotik:"authoritative" codegen:"authoritative"` Interface string `mikrotik:"interface" codegen:"interface"` LeaseScript string `mikrotik:"lease-script" codegen:"lease_script"` }
DhcpServer represents DHCP server resource
func (*DhcpServer) ActionToCommand ¶
func (b *DhcpServer) ActionToCommand(a Action) string
func (*DhcpServer) AfterAddHook ¶
func (b *DhcpServer) AfterAddHook(r *routeros.Reply)
func (*DhcpServer) DeleteField ¶
func (b *DhcpServer) DeleteField() string
func (*DhcpServer) DeleteFieldValue ¶
func (b *DhcpServer) DeleteFieldValue() string
func (*DhcpServer) FindField ¶
func (b *DhcpServer) FindField() string
func (*DhcpServer) FindFieldValue ¶
func (b *DhcpServer) FindFieldValue() string
func (*DhcpServer) ID ¶
func (b *DhcpServer) ID() string
func (*DhcpServer) IDField ¶
func (b *DhcpServer) IDField() string
func (*DhcpServer) SetID ¶
func (b *DhcpServer) SetID(id string)
type DhcpServerNetwork ¶
type DhcpServerNetwork struct { Id string `mikrotik:".id" codegen:"id,mikrotikID"` Comment string `mikrotik:"comment" codegen:"comment"` Address string `mikrotik:"address" codegen:"address"` Netmask string `mikrotik:"netmask" codegen:"netmask"` Gateway string `mikrotik:"gateway" codegen:"gateway"` DnsServer string `mikrotik:"dns-server" codegen:"dns_server"` }
DhcpServerNetwork describes network configuration for DHCP server
func (*DhcpServerNetwork) ActionToCommand ¶
func (b *DhcpServerNetwork) ActionToCommand(a Action) string
func (*DhcpServerNetwork) AfterAddHook ¶
func (b *DhcpServerNetwork) AfterAddHook(r *routeros.Reply)
func (*DhcpServerNetwork) ID ¶
func (b *DhcpServerNetwork) ID() string
func (*DhcpServerNetwork) IDField ¶
func (b *DhcpServerNetwork) IDField() string
func (*DhcpServerNetwork) SetID ¶
func (b *DhcpServerNetwork) SetID(id string)
type DnsRecord ¶
type DnsRecord struct { Id string `mikrotik:".id" codegen:"id,mikrotikID"` Name string `mikrotik:"name" codegen:"name,terraformID,required"` Ttl types.MikrotikDuration `mikrotik:"ttl" codegen:"ttl"` Address string `mikrotik:"address" codegen:"address,required"` Comment string `mikrotik:"comment" codegen:"comment"` }
func (*DnsRecord) ActionToCommand ¶
func (*DnsRecord) AfterAddHook ¶
func (*DnsRecord) DeleteField ¶
func (*DnsRecord) DeleteFieldValue ¶
func (*DnsRecord) FindFieldValue ¶
type ErrorHandler ¶
ErrorHandler Defines contract to handle errors returned by RouterOS. It can either return another error, or supress original error by returning nil.
type Finder ¶
type Finder interface { // FindField retrieves a name of a field to use as key for resource retrieval. FindField() string // FindFieldValue retrieves a value to use for resource retrieval. FindFieldValue() string }
Finder defines contract for resources which provide custom behaviour during resource retrieval.
type FirewallFilterRule ¶
type FirewallFilterRule struct { Id string `mikrotik:".id" codegen:"id,mikrotikID,terraformID"` Action string `mikrotik:"action" codegen:"action"` Chain string `mikrotik:"chain" codegen:"chain,required"` Comment string `mikrotik:"comment" codegen:"comment"` ConnectionState types.MikrotikList `mikrotik:"connection-state" codegen:"connection_state"` DestPort string `mikrotik:"dst-port" codegen:"dst_port"` InInterface string `mikrotik:"in-interface" codegen:"in_interface"` InInterfaceList string `mikrotik:"in-interface-list" codegen:"in_interface_list"` OutInterfaceList string `mikrotik:"out-interface-list" codegen:"out_interface_list"` Protocol string `mikrotik:"protocol" codegen:"protocol"` }
FirewallFilterRule defines /ip/firewall/filter rule
func (*FirewallFilterRule) ActionToCommand ¶
func (b *FirewallFilterRule) ActionToCommand(a Action) string
func (*FirewallFilterRule) AfterAddHook ¶
func (b *FirewallFilterRule) AfterAddHook(r *routeros.Reply)
func (*FirewallFilterRule) ID ¶
func (b *FirewallFilterRule) ID() string
func (*FirewallFilterRule) IDField ¶
func (b *FirewallFilterRule) IDField() string
func (*FirewallFilterRule) SetID ¶
func (b *FirewallFilterRule) SetID(id string)
type InterfaceList ¶
type InterfaceList struct { Id string `mikrotik:".id" codegen:"id,mikrotikID"` Comment string `mikrotik:"comment" codegen:"comment"` Name string `mikrotik:"name" codegen:"name,terraformID,required"` }
InterfaceList manages a list of interfaces
func (*InterfaceList) ActionToCommand ¶
func (b *InterfaceList) ActionToCommand(a Action) string
func (*InterfaceList) AfterAddHook ¶
func (b *InterfaceList) AfterAddHook(r *routeros.Reply)
func (*InterfaceList) DeleteField ¶
func (b *InterfaceList) DeleteField() string
func (*InterfaceList) DeleteFieldValue ¶
func (b *InterfaceList) DeleteFieldValue() string
func (*InterfaceList) FindField ¶
func (b *InterfaceList) FindField() string
func (*InterfaceList) FindFieldValue ¶
func (b *InterfaceList) FindFieldValue() string
func (*InterfaceList) ID ¶
func (b *InterfaceList) ID() string
func (*InterfaceList) IDField ¶
func (b *InterfaceList) IDField() string
func (*InterfaceList) SetID ¶
func (b *InterfaceList) SetID(id string)
type InterfaceListMember ¶
type InterfaceListMember struct { Id string `mikrotik:".id" codegen:"id,mikrotikID"` Interface string `mikrotik:"interface" codegen:"interface,required"` List string `mikrotik:"list" codegen:"list,required"` }
InterfaceListMember manages an interface list's members
func (*InterfaceListMember) ActionToCommand ¶
func (b *InterfaceListMember) ActionToCommand(a Action) string
func (*InterfaceListMember) AfterAddHook ¶
func (b *InterfaceListMember) AfterAddHook(r *routeros.Reply)
func (*InterfaceListMember) DeleteField ¶
func (b *InterfaceListMember) DeleteField() string
func (*InterfaceListMember) DeleteFieldValue ¶
func (b *InterfaceListMember) DeleteFieldValue() string
func (*InterfaceListMember) ID ¶
func (b *InterfaceListMember) ID() string
func (*InterfaceListMember) IDField ¶
func (b *InterfaceListMember) IDField() string
func (*InterfaceListMember) SetID ¶
func (b *InterfaceListMember) SetID(id string)
type InterfaceWireguard ¶
type InterfaceWireguard struct { Id string `mikrotik:".id"` Name string `mikrotik:"name"` Comment string `mikrotik:"comment"` Disabled bool `mikrotik:"disabled"` ListenPort int `mikrotik:"listen-port"` Mtu int `mikrotik:"mtu"` PrivateKey string `mikrotik:"private-key"` PublicKey string `mikrotik:"public-key,readonly"` //read only property Running bool `mikrotik:"running,readonly"` //read only property }
func (*InterfaceWireguard) ActionToCommand ¶
func (i *InterfaceWireguard) ActionToCommand(action Action) string
func (*InterfaceWireguard) AfterAddHook ¶
func (i *InterfaceWireguard) AfterAddHook(r *routeros.Reply)
func (*InterfaceWireguard) DeleteField ¶
func (i *InterfaceWireguard) DeleteField() string
func (*InterfaceWireguard) DeleteFieldValue ¶
func (i *InterfaceWireguard) DeleteFieldValue() string
func (*InterfaceWireguard) FindField ¶
func (i *InterfaceWireguard) FindField() string
func (*InterfaceWireguard) FindFieldValue ¶
func (i *InterfaceWireguard) FindFieldValue() string
func (*InterfaceWireguard) ID ¶
func (i *InterfaceWireguard) ID() string
func (*InterfaceWireguard) IDField ¶
func (i *InterfaceWireguard) IDField() string
func (*InterfaceWireguard) SetID ¶
func (i *InterfaceWireguard) SetID(id string)
type InterfaceWireguardPeer ¶
type InterfaceWireguardPeer struct { Id string `mikrotik:".id"` AllowedAddress string `mikrotik:"allowed-address"` Comment string `mikrotik:"comment"` Disabled bool `mikrotik:"disabled"` EndpointAddress string `mikrotik:"endpoint-address"` EndpointPort int64 `mikrotik:"endpoint-port"` Interface string `mikrotik:"interface"` PersistentKeepalive int64 `mikrotik:"persistent-keepalive"` PublicKey string `mikrotik:"public-key"` }
func (*InterfaceWireguardPeer) ActionToCommand ¶
func (i *InterfaceWireguardPeer) ActionToCommand(action Action) string
func (*InterfaceWireguardPeer) AfterAddHook ¶
func (i *InterfaceWireguardPeer) AfterAddHook(r *routeros.Reply)
func (*InterfaceWireguardPeer) DeleteField ¶
func (i *InterfaceWireguardPeer) DeleteField() string
func (*InterfaceWireguardPeer) DeleteFieldValue ¶
func (i *InterfaceWireguardPeer) DeleteFieldValue() string
func (*InterfaceWireguardPeer) ID ¶
func (i *InterfaceWireguardPeer) ID() string
func (*InterfaceWireguardPeer) IDField ¶
func (i *InterfaceWireguardPeer) IDField() string
func (*InterfaceWireguardPeer) SetID ¶
func (i *InterfaceWireguardPeer) SetID(id string)
type IpAddress ¶
type IpAddress struct { Id string `mikrotik:".id" codegen:"id,mikrotikID"` Address string `mikrotik:"address" codegen:"address,required"` Comment string `mikrotik:"comment" codegen:"comment"` Disabled bool `mikrotik:"disabled" codegen:"disabled"` Interface string `mikrotik:"interface" codegen:"interface,required"` Network string `mikrotik:"network" codegen:"network,computed"` }
func (*IpAddress) ActionToCommand ¶
func (*IpAddress) AfterAddHook ¶
type Ipv6Address ¶
type Ipv6Address struct { Id string `mikrotik:".id" codegen:"id,mikrotikID,terraformID"` Address string `mikrotik:"address" codegen:"address,required"` Advertise bool `mikrotik:"advertise" codegen:"advertise"` Comment string `mikrotik:"comment" codegen:"comment"` Disabled bool `mikrotik:"disabled" codegen:"disabled"` Eui64 bool `mikrotik:"eui-64" codegen:"eui_64"` FromPool string `mikrotik:"from-pool" codegen:"from_pool"` Interface string `mikrotik:"interface" codegen:"interface,required"` NoDad bool `mikrotik:"no-dad" codegen:"no_dad"` }
Ipv6Address defines resource
func (*Ipv6Address) ActionToCommand ¶
func (b *Ipv6Address) ActionToCommand(a Action) string
func (*Ipv6Address) AfterAddHook ¶
func (b *Ipv6Address) AfterAddHook(r *routeros.Reply)
func (*Ipv6Address) ID ¶
func (b *Ipv6Address) ID() string
func (*Ipv6Address) IDField ¶
func (b *Ipv6Address) IDField() string
func (*Ipv6Address) SetID ¶
func (b *Ipv6Address) SetID(id string)
type LegacyBgpUnsupported ¶
type LegacyBgpUnsupported struct{}
func (LegacyBgpUnsupported) Error ¶
func (LegacyBgpUnsupported) Error() string
type Marshaler ¶
type Marshaler interface { // MarshalMikrotik serializes Go type value as RouterOS field value MarshalMikrotik() string }
Marshaler interface will be used to serialize struct to RouterOS sentence
type Mikrotik ¶
type Mikrotik struct { Host string Username string Password string TLS bool CA string Insecure bool // contains filtered or unexported fields }
Mikrotik struct defines connection parameters for RouterOS client
func NewClient ¶
func NewClient(host, username, password string, tls bool, caCertificate string, insecure bool) *Mikrotik
NewClient initializes new Mikrotik client object
func (Mikrotik) AddBgpInstance ¶
func (c Mikrotik) AddBgpInstance(r *BgpInstance) (*BgpInstance, error)
Typed wrappers
func (Mikrotik) AddBgpPeer ¶
Typed wrappers
func (Mikrotik) AddBridgePort ¶
func (c Mikrotik) AddBridgePort(r *BridgePort) (*BridgePort, error)
Typed wrappers
func (Mikrotik) AddBridgeVlan ¶
func (c Mikrotik) AddBridgeVlan(r *BridgeVlan) (*BridgeVlan, error)
func (Mikrotik) AddDhcpLease ¶
Typed wrappers
func (Mikrotik) AddDhcpServer ¶
func (c Mikrotik) AddDhcpServer(r *DhcpServer) (*DhcpServer, error)
Typed wrappers
func (Mikrotik) AddDhcpServerNetwork ¶
func (c Mikrotik) AddDhcpServerNetwork(r *DhcpServerNetwork) (*DhcpServerNetwork, error)
Typed wrappers
func (Mikrotik) AddDnsRecord ¶
func (Mikrotik) AddFirewallFilterRule ¶
func (c Mikrotik) AddFirewallFilterRule(r *FirewallFilterRule) (*FirewallFilterRule, error)
func (Mikrotik) AddInterfaceList ¶
func (c Mikrotik) AddInterfaceList(r *InterfaceList) (*InterfaceList, error)
Typed wrappers
func (Mikrotik) AddInterfaceListMember ¶
func (c Mikrotik) AddInterfaceListMember(r *InterfaceListMember) (*InterfaceListMember, error)
Typed wrappers
func (Mikrotik) AddInterfaceWireguard ¶
func (client Mikrotik) AddInterfaceWireguard(i *InterfaceWireguard) (*InterfaceWireguard, error)
func (Mikrotik) AddInterfaceWireguardPeer ¶
func (client Mikrotik) AddInterfaceWireguardPeer(i *InterfaceWireguardPeer) (*InterfaceWireguardPeer, error)
func (Mikrotik) AddIpAddress ¶
Typed wrappers
func (Mikrotik) AddIpv6Address ¶
func (c Mikrotik) AddIpv6Address(r *Ipv6Address) (*Ipv6Address, error)
Typed wrappers
func (Mikrotik) AddScheduler ¶
typed wrappers
func (Mikrotik) AddVlanInterface ¶
func (c Mikrotik) AddVlanInterface(r *VlanInterface) (*VlanInterface, error)
Typed wrappers
func (Mikrotik) CreateScheduler ¶
func (Mikrotik) DeleteBgpInstance ¶
func (Mikrotik) DeleteBgpPeer ¶
func (Mikrotik) DeleteBridge ¶
func (Mikrotik) DeleteBridgePort ¶
func (Mikrotik) DeleteBridgeVlan ¶
func (Mikrotik) DeleteDhcpLease ¶
func (Mikrotik) DeleteDhcpServer ¶
func (Mikrotik) DeleteDhcpServerNetwork ¶
func (Mikrotik) DeleteDnsRecord ¶
func (Mikrotik) DeleteFirewallFilterRule ¶
func (Mikrotik) DeleteInterfaceList ¶
func (Mikrotik) DeleteInterfaceListMember ¶
func (Mikrotik) DeleteInterfaceWireguard ¶
func (Mikrotik) DeleteInterfaceWireguardPeer ¶
func (Mikrotik) DeleteIpAddress ¶
func (Mikrotik) DeleteIpv6Address ¶
func (Mikrotik) DeletePool ¶
func (Mikrotik) DeleteScheduler ¶
func (Mikrotik) DeleteScript ¶
func (Mikrotik) DeleteVlanInterface ¶
func (Mikrotik) FindBgpInstance ¶
func (c Mikrotik) FindBgpInstance(name string) (*BgpInstance, error)
func (Mikrotik) FindBridgePort ¶
func (c Mikrotik) FindBridgePort(id string) (*BridgePort, error)
func (Mikrotik) FindBridgeVlan ¶
func (c Mikrotik) FindBridgeVlan(id string) (*BridgeVlan, error)
func (Mikrotik) FindDhcpServer ¶
func (c Mikrotik) FindDhcpServer(name string) (*DhcpServer, error)
func (Mikrotik) FindDhcpServerNetwork ¶
func (c Mikrotik) FindDhcpServerNetwork(id string) (*DhcpServerNetwork, error)
func (Mikrotik) FindDnsRecord ¶
func (Mikrotik) FindFirewallFilterRule ¶
func (c Mikrotik) FindFirewallFilterRule(id string) (*FirewallFilterRule, error)
func (Mikrotik) FindInterfaceList ¶
func (c Mikrotik) FindInterfaceList(name string) (*InterfaceList, error)
func (Mikrotik) FindInterfaceListMember ¶
func (c Mikrotik) FindInterfaceListMember(id string) (*InterfaceListMember, error)
func (Mikrotik) FindInterfaceWireguard ¶
func (client Mikrotik) FindInterfaceWireguard(name string) (*InterfaceWireguard, error)
func (Mikrotik) FindInterfaceWireguardPeer ¶
func (client Mikrotik) FindInterfaceWireguardPeer(id string) (*InterfaceWireguardPeer, error)
func (Mikrotik) FindIpv6Address ¶
func (c Mikrotik) FindIpv6Address(id string) (*Ipv6Address, error)
func (Mikrotik) FindScheduler ¶
func (Mikrotik) FindVlanInterface ¶
func (c Mikrotik) FindVlanInterface(name string) (*VlanInterface, error)
func (Mikrotik) GetSystemResources ¶
func (client Mikrotik) GetSystemResources() (*SystemResources, error)
func (Mikrotik) InspectConsoleCommand ¶
func (c Mikrotik) InspectConsoleCommand(command string) (consoleinspected.ConsoleItem, error)
func (Mikrotik) ListDhcpLease ¶
func (Mikrotik) ListDhcpLeases ¶
func (Mikrotik) ListIpAddress ¶
func (Mikrotik) ListIpv6Address ¶
func (c Mikrotik) ListIpv6Address() ([]Ipv6Address, error)
func (Mikrotik) ListVlanInterface ¶
func (c Mikrotik) ListVlanInterface() ([]VlanInterface, error)
func (Mikrotik) UpdateBgpInstance ¶
func (c Mikrotik) UpdateBgpInstance(r *BgpInstance) (*BgpInstance, error)
func (Mikrotik) UpdateBridgePort ¶
func (c Mikrotik) UpdateBridgePort(r *BridgePort) (*BridgePort, error)
func (Mikrotik) UpdateBridgeVlan ¶
func (c Mikrotik) UpdateBridgeVlan(r *BridgeVlan) (*BridgeVlan, error)
func (Mikrotik) UpdateDhcpLease ¶
func (Mikrotik) UpdateDhcpServer ¶
func (c Mikrotik) UpdateDhcpServer(r *DhcpServer) (*DhcpServer, error)
func (Mikrotik) UpdateDhcpServerNetwork ¶
func (c Mikrotik) UpdateDhcpServerNetwork(r *DhcpServerNetwork) (*DhcpServerNetwork, error)
func (Mikrotik) UpdateDnsRecord ¶
func (Mikrotik) UpdateFirewallFilterRule ¶
func (c Mikrotik) UpdateFirewallFilterRule(r *FirewallFilterRule) (*FirewallFilterRule, error)
func (Mikrotik) UpdateInterfaceList ¶
func (c Mikrotik) UpdateInterfaceList(r *InterfaceList) (*InterfaceList, error)
func (Mikrotik) UpdateInterfaceListMember ¶
func (c Mikrotik) UpdateInterfaceListMember(r *InterfaceListMember) (*InterfaceListMember, error)
func (Mikrotik) UpdateInterfaceWireguard ¶
func (client Mikrotik) UpdateInterfaceWireguard(i *InterfaceWireguard) (*InterfaceWireguard, error)
func (Mikrotik) UpdateInterfaceWireguardPeer ¶
func (client Mikrotik) UpdateInterfaceWireguardPeer(i *InterfaceWireguardPeer) (*InterfaceWireguardPeer, error)
func (Mikrotik) UpdateIpAddress ¶
func (Mikrotik) UpdateIpv6Address ¶
func (c Mikrotik) UpdateIpv6Address(r *Ipv6Address) (*Ipv6Address, error)
func (Mikrotik) UpdateScheduler ¶
func (Mikrotik) UpdateVlanInterface ¶
func (c Mikrotik) UpdateVlanInterface(r *VlanInterface) (*VlanInterface, error)
type Pool ¶
type Pool struct { Id string `mikrotik:".id" codegen:"id,mikrotikID,terraformID"` Name string `mikrotik:"name" codegen:"name,required"` Ranges string `mikrotik:"ranges" codegen:"ranges,required"` NextPool string `mikrotik:"next-pool" codegen:"next_pool,optiona,computed"` Comment string `mikrotik:"comment" codegen:"comment,optional,computed"` }
func (*Pool) ActionToCommand ¶
func (*Pool) AfterAddHook ¶
type Resource ¶
type Resource interface { // ActionToCommand translates CRUD action to RouterOS command path. ActionToCommand(Action) string // IDField reveals name of ID field to use in requests to MikroTik router. // It is used in operations like Find. IDField() string // ID returns value of the ID field. ID() string // SetID updates a value of the ID field. SetID(string) }
Resource interface defines a contract for abstract RouterOS resource.
type Scheduler ¶
type Scheduler struct { Id string `mikrotik:".id"` Name string `mikrotik:"name"` OnEvent string `mikrotik:"on-event"` StartDate string `mikrotik:"start-date"` StartTime string `mikrotik:"start-time"` Interval types.MikrotikDuration `mikrotik:"interval"` }
func (*Scheduler) ActionToCommand ¶
func (*Scheduler) AfterAddHook ¶
func (*Scheduler) DeleteField ¶
func (*Scheduler) DeleteFieldValue ¶
func (*Scheduler) FindFieldValue ¶
type Script ¶
type Script struct { Id string `mikrotik:".id" codegen:"id,deleteID"` Name string `mikrotik:"name" codegen:"name,required,mikrotikID"` Owner string `mikrotik:"owner" codegen:"owner,required"` Policy types.MikrotikList `mikrotik:"policy" codegen:"policy,required"` DontRequirePermissions bool `mikrotik:"dont-require-permissions" codegen:"dont_require_permissions"` Source string `mikrotik:"source" codegen:"source,required"` }
func (*Script) ActionToCommand ¶
func (*Script) AfterAddHook ¶
func (*Script) DeleteField ¶
func (*Script) DeleteFieldValue ¶
func (*Script) FindFieldValue ¶
type SystemResources ¶
type SystemResources struct { Uptime types.MikrotikDuration `mikrotik:"uptime"` Version string `mikrotik:"version"` }
func (*SystemResources) ActionToCommand ¶
func (d *SystemResources) ActionToCommand(action Action) string
type Unmarshaler ¶
type Unmarshaler interface { // UnmarshalMikrotik de-serializes RouterOS field into Go type value UnmarshalMikrotik(string) error }
Unmarshaler interface will be used to de-serialize reply from RouterOS into Go struct
type VlanInterface ¶
type VlanInterface struct { Id string `mikrotik:".id" codegen:"id,mikrotikID"` Interface string `mikrotik:"interface" codegen:"interface"` Mtu int `mikrotik:"mtu" codegen:"mtu"` Name string `mikrotik:"name" codegen:"name,required,terraformID"` Disabled bool `mikrotik:"disabled" codegen:"disabled"` UseServiceTag bool `mikrotik:"use-service-tag" codegen:"use_service_tag"` VlanId int `mikrotik:"vlan-id" codegen:"vlan_id"` }
VlanInterface represents vlan interface resource
func (*VlanInterface) ActionToCommand ¶
func (b *VlanInterface) ActionToCommand(a Action) string
func (*VlanInterface) AfterAddHook ¶
func (b *VlanInterface) AfterAddHook(r *routeros.Reply)
func (*VlanInterface) DeleteField ¶
func (b *VlanInterface) DeleteField() string
func (*VlanInterface) DeleteFieldValue ¶
func (b *VlanInterface) DeleteFieldValue() string
func (*VlanInterface) FindField ¶
func (b *VlanInterface) FindField() string
func (*VlanInterface) FindFieldValue ¶
func (b *VlanInterface) FindFieldValue() string
func (*VlanInterface) ID ¶
func (b *VlanInterface) ID() string
func (*VlanInterface) IDField ¶
func (b *VlanInterface) IDField() string
func (*VlanInterface) SetID ¶
func (b *VlanInterface) SetID(id string)
Source Files ¶
- bgp_instance.go
- bgp_peer.go
- bridge.go
- bridge_port.go
- bridge_vlan.go
- client.go
- client_crud.go
- console_inspect.go
- dhcp_server.go
- dhcp_server_network.go
- dns.go
- errors.go
- firewall_filter.go
- helpers.go
- interface_list.go
- interface_list_member.go
- interface_wireguard.go
- interface_wireguard_peer.go
- ip_addr.go
- ipv6_addr.go
- lease.go
- pool.go
- scheduler.go
- script.go
- setup.go
- system_resources.go
- vlan_interface.go